org.systinet.wasp.mgmt
Interface ServiceSecurity

All Known Subinterfaces:
AdminService

public interface ServiceSecurity

This interface represents component which is able manage security settings for specified service endpoint.

For specified service endpoint is possible to set security mechanisms, automatic web service authentication, automatic authorization checks per web service method and identity association.

Since:
4.5
Component:
Mgmt-Services

Method Summary
 void addAcceptingSecurityProvider(ServiceEndpoint serviceEndpoint, java.lang.String providerName)
          Add a name of the security providers which have to be activated for this service implementation for incoming requests.
 void addAcceptingSecurityProviders(ServiceEndpoint serviceEndpoint, java.lang.String[] providerNames)
          Adds array of names of the security providers which have to be activated for this service implementation for incoming requests.
 void addIdentityAssociation(ServiceEndpoint serviceEndpoint, IdentityAssociationImpl identityAssociation)
          Adds identity association for particular service endpoint.
 java.lang.String[] getAcceptingSecurityProviders(ServiceEndpoint serviceEndpoint)
          Returns array of names of the security providers which have to be activated for this service implementation for incoming requests.
 org.w3c.dom.Element getEndpointPreferences(PrefsMetadata beanMetadata, ServiceEndpoint endpoint)
          Gets particular endpoint configuration as DOM.
 PrefsMetadata[] getEndpointPrefsMetadata()
          Gets endpoint preferences metadatas.
 IdentityAssociationImpl[] getIdentityAssociations(ServiceEndpoint serviceEndpoint)
          Gets identity associations for particular service endpoint.
 java.lang.String getInitiatingSecurityProvider(ServiceEndpoint serviceEndpoint)
          Returns name of the security provider to be used for outgoing calls from given web service endpoint.
 boolean isAuthorizationRequired(ServiceEndpoint serviceEndpoint)
          It determines whether automatic authorization for given web service endpoint is on.
 void removeIdentityAssociation(ServiceEndpoint serviceEndpoint, IdentityAssociationImpl identityAssociation)
          Removes identity association for particular service endpoint.
 void setAcceptingSecurityProviders(ServiceEndpoint serviceEndpoint, java.lang.String[] providerNames)
          Sets array of names of the security providers which have to be activated for this service implementation for incoming requests.
 void setAuthorizationRequired(ServiceEndpoint serviceEndpoint, boolean authorizationRequired)
          Turns on or off automatic authorization for specified service endpoint.
 java.lang.String[] setEndpointPreferences(PrefsMetadata beanMetadata, org.w3c.dom.Element beanDOM, ServiceEndpoint endpoint)
          Sets particular preferences for endpoint configuration.
 void setInitiatingSecurityProvider(ServiceEndpoint serviceEndpoint, java.lang.String providerName)
          Sets the security provider to be used for outgoing calls from given web service endpoint.
 

Method Detail

setAuthorizationRequired

public void setAuthorizationRequired(ServiceEndpoint serviceEndpoint,
                                     boolean authorizationRequired)
                              throws AdminServiceException
Turns on or off automatic authorization for specified service endpoint.
Secure mode: you must have WSSecurityMechsPermission/set permission for target service endpoint to perform this operation.

Parameters:
serviceEndpoint - service endpoint for which to set
authorizationRequired - true, if authorization is required, false is it is not
Throws:
AdminServiceException - cannot set the value

isAuthorizationRequired

public boolean isAuthorizationRequired(ServiceEndpoint serviceEndpoint)
                                throws AdminServiceException
It determines whether automatic authorization for given web service endpoint is on.
Secure mode: you must have WSSecurityMechsPermission/get permission for target service endpoint to perform this operation.

Parameters:
serviceEndpoint - service endpoint for which to test
Returns:
authorizationRequired true if authorization is required, false otherwise
Throws:
AdminServiceException - cannot set the value

getIdentityAssociations

public IdentityAssociationImpl[] getIdentityAssociations(ServiceEndpoint serviceEndpoint)
                                                  throws AdminServiceException
Gets identity associations for particular service endpoint.
Secure mode: you must have WSSecurityMechsPermission/get permission for target service endpoint to perform this operation.

Parameters:
serviceEndpoint - service endpoint
Returns:
identity associations array (can be null)
Throws:
AdminServiceException - cannot get identity associations

addIdentityAssociation

public void addIdentityAssociation(ServiceEndpoint serviceEndpoint,
                                   IdentityAssociationImpl identityAssociation)
                            throws AdminServiceException
Adds identity association for particular service endpoint.
Secure mode: you must have WSSecurityMechsPermission/set permission for target service endpoint to perform this operation.

Parameters:
serviceEndpoint - service endpoint
identityAssociation - identity association to add
Throws:
AdminServiceException - cannot get identity associations

removeIdentityAssociation

public void removeIdentityAssociation(ServiceEndpoint serviceEndpoint,
                                      IdentityAssociationImpl identityAssociation)
                               throws AdminServiceException
Removes identity association for particular service endpoint.
Secure mode: you must have WSSecurityMechsPermission/set permission for target service endpoint to perform this operation.

Parameters:
serviceEndpoint - service endpoint
identityAssociation - identity association to add
Throws:
AdminServiceException - cannot get identity associations

getInitiatingSecurityProvider

public java.lang.String getInitiatingSecurityProvider(ServiceEndpoint serviceEndpoint)
                                               throws AdminServiceException
Returns name of the security provider to be used for outgoing calls from given web service endpoint.
Secure mode: you must have WSSecurityMechsPermission/get permission for target service endpoint to perform this operation.

Parameters:
serviceEndpoint - target service endpoint.
Returns:
name of the security provider for outgoing calls,
null if service uses default security provider or
"no" service has disabled security provider for outgoing calls.
Throws:
AdminServiceException

setInitiatingSecurityProvider

public void setInitiatingSecurityProvider(ServiceEndpoint serviceEndpoint,
                                          java.lang.String providerName)
                                   throws AdminServiceException
Sets the security provider to be used for outgoing calls from given web service endpoint.
Secure mode: you must have WSSecurityMechsPermission/set permission for target service endpoint to perform this operation.

Parameters:
serviceEndpoint - target service endpoint.
providerName - name of the security provider for outgoing calls.

Note that provider name can be following special value:

  • null - Default security providers will be used for outgoing calls
    (needs restarting server)
  • "no" - service will use no security provider for outgoing calls.

Throws:
AdminServiceException

getAcceptingSecurityProviders

public java.lang.String[] getAcceptingSecurityProviders(ServiceEndpoint serviceEndpoint)
                                                 throws AdminServiceException
Returns array of names of the security providers which have to be activated for this service implementation for incoming requests.
Secure mode: you must have WSSecurityMechsPermission/get permission for target service endpoint to perform this operation.

Parameters:
serviceEndpoint - target service endpoint.
Returns:
array of security provider names for incoming requests,
empty String[0] if service has disabled security providers for incoming requests.
or null if service uses default accepting security providers.
Throws:
AdminServiceException

setAcceptingSecurityProviders

public void setAcceptingSecurityProviders(ServiceEndpoint serviceEndpoint,
                                          java.lang.String[] providerNames)
                                   throws AdminServiceException
Sets array of names of the security providers which have to be activated for this service implementation for incoming requests.
Secure mode: you must have WSSecurityMechsPermission/set permission for target service endpoint to perform this operation.
Note:Changes in service endpoint configuration are persistent.

Parameters:
serviceEndpoint - target service endpoint.
providerNames - array of security provider names for incoming requests.

providerNames array can contain following special values:

  • null - Default accepting security providers will be used.
    (needs restarting server)
  • providerNames[0] is "no" - service will use no accepting security providers.

Throws:
AdminServiceException

addAcceptingSecurityProvider

public void addAcceptingSecurityProvider(ServiceEndpoint serviceEndpoint,
                                         java.lang.String providerName)
                                  throws AdminServiceException
Add a name of the security providers which have to be activated for this service implementation for incoming requests.
Secure mode: you must have WSSecurityMechsPermission/set permission for target service endpoint to perform this operation.

Parameters:
serviceEndpoint - target service endpoint.
providerName - security provider name for incoming requests.
Throws:
AdminServiceException

addAcceptingSecurityProviders

public void addAcceptingSecurityProviders(ServiceEndpoint serviceEndpoint,
                                          java.lang.String[] providerNames)
                                   throws AdminServiceException
Adds array of names of the security providers which have to be activated for this service implementation for incoming requests.
Secure mode: you must have WSSecurityMechsPermission/set permission for target service endpoint to perform this operation.

Parameters:
serviceEndpoint - target service endpoint.
providerNames - array of security provider names for incoming requests.
Throws:
AdminServiceException

setEndpointPreferences

public java.lang.String[] setEndpointPreferences(PrefsMetadata beanMetadata,
                                                 org.w3c.dom.Element beanDOM,
                                                 ServiceEndpoint endpoint)
                                          throws AdminServiceException
Sets particular preferences for endpoint configuration. For obtaining information about endpoint preferences see getEndpointPrefsMetadata()
List of all known preferences
preference namepreference typepreference subtypeJava Proxy bean interface
endpoint_sprovider_HttpDigestsecurityProviderPreferencesHttpDigestorg.idoox.wasp.security.http.digest.HttpDigestConfig
endpoint_sprovider_KerberossecurityProviderPreferencesKerberosorg.idoox.wasp.security.kerberos.KerberosConfig
endpoint_sprovider_WS-SecuritysecurityProviderPreferencesWS-Securityorg.systinet.wasp.security.ws.conf.WSSEProviderConf

Secure mode: you must have WSSecurityMechsPermission/set permission for target service endpoint to perform this operation.

Parameters:
beanMetadata - metadata describing
beanDOM - configuration represented as XML
endpoint - target service endpoint
Returns:
returns an array of Strings, each string contains a warning
Throws:
AdminServiceException - when new configuration cannot be saved.
Since:
4.6

getEndpointPreferences

public org.w3c.dom.Element getEndpointPreferences(PrefsMetadata beanMetadata,
                                                  ServiceEndpoint endpoint)
                                           throws AdminServiceException
Gets particular endpoint configuration as DOM. For obtaining information (PrefsMetadata) about endpoint preferences see getEndpointPrefsMetadata().
Secure mode: you must have WSSecurityMechsPermission/get permission for target service endpoint to perform this operation.

Parameters:
beanMetadata -
endpoint -
Returns:
Throws:
AdminServiceException
Since:
4.6

getEndpointPrefsMetadata

public PrefsMetadata[] getEndpointPrefsMetadata()
                                         throws AdminServiceException
Gets endpoint preferences metadatas.
List of all known preferences
preference namepreference typepreference subtypeJava Proxy bean interface
endpoint_sprovider_HttpDigestsecurityProviderPreferencesHttpDigestHttpDigestConfig
endpoint_sprovider_KerberossecurityProviderPreferencesKerberosKerberosConfig
endpoint_sprovider_WS-SecuritysecurityProviderPreferencesWS-SecurityWSSEProviderConf

Returns:
Throws:
AdminServiceException
Since:
4.6