Class AccessByCloudWhitelist

  • All Implemented Interfaces:
    AccessPolicy

    public class AccessByCloudWhitelist
    extends java.lang.Object
    implements AccessPolicy
    Same-cloud and whitelist access policy.

    A consuming system is granted access only if it can (1) present a certificate issued by the same local cloud certificate as the system using this policy, as well as (2) the system name of the consuming system exists in the white-list of this instance.

    Note that access policy instances of this type can be shared by multiple services.

    • Constructor Detail

      • AccessByCloudWhitelist

        public AccessByCloudWhitelist​(java.util.Collection<java.lang.String> whitelist)
        Creates new same-cloud and whitelist access policy.
        Parameters:
        whitelist - Collection of names of systems to be allowed access.
    • Method Detail

      • whitelist

        public java.util.Set<java.lang.String> whitelist()
        Returns:
        Modifiable and synchronized set containing white-listed system names.
      • isAuthorized

        public boolean isAuthorized​(SystemIdentityDescription consumer,
                                    ArSystem provider,
                                    ServiceDescription service,
                                    java.lang.String token)
        Description copied from interface: AccessPolicy
        Determines whether or not the described system may consume the described service using the given access token, if any.
        Specified by:
        isAuthorized in interface AccessPolicy
        Parameters:
        consumer - Description of system attempting to consume the service in question.
        provider - The system providing the consumed service.
        service - Description of service that the consumer attempts to consume.
        token - Access token presented by the consumer, if any.
        Returns:
        true only if consumer is permitted to consume service.