java.lang.Object
de.iip_ecosphere.platform.support.aas.basyx2.server.apps.security.RbacUtils

public class RbacUtils extends Object
RBAC utility (translation) functions.
Author:
Holger Eichelberger, SSE
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    private static class 
    RbacUtils.PreliminaryRbacRule<T extends org.eclipse.digitaltwin.basyx.authorization.rbac.TargetInformation>
    A preliminary RBAC rule that potentially needs to be joined with further, so far unknown rules.
    private static class 
    RbacUtils.PreliminaryRbacRules<T extends org.eclipse.digitaltwin.basyx.authorization.rbac.TargetInformation>
    A preliminary set of RBAC rules that potentially need to be joined with further, so far unknown rules.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final Map<de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor.RbacAction,org.eclipse.digitaltwin.basyx.authorization.rbac.Action>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static <T> boolean
    containsByRef(T[] array, T element)
    Returns whether element is contained by reference equality in array.
    static org.eclipse.digitaltwin.basyx.authorization.rbac.RbacPermissionResolver<org.eclipse.digitaltwin.basyx.aasrepository.feature.authorization.AasTargetInformation>
    createAasPermissionResolver(de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor authDesc)
    Creates an AAS permission resolver from an authentication descriptor.
    static <T extends org.eclipse.digitaltwin.basyx.authorization.rbac.TargetInformation>
    org.eclipse.digitaltwin.basyx.authorization.rbac.RbacPermissionResolver<T>
    createPermissionResolver(de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor authDesc, TargetInfoHandler<T> infoHandler, com.google.common.base.Supplier<org.eclipse.digitaltwin.basyx.authorization.rbac.TargetPermissionVerifier<T>> verifierCreator, de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor.RbacAasComponent... components)
    Creates a permission resolver from an authentication descriptor.
    static org.eclipse.digitaltwin.basyx.authorization.rbac.RbacPermissionResolver<org.eclipse.digitaltwin.basyx.submodelrepository.feature.authorization.SubmodelTargetInformation>
    createSubmodelPermissionResolver(de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor authDesc)
    Creates a submodel permission resolver from an authentication descriptor.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ACTION_MAPPING

      private static final Map<de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor.RbacAction,org.eclipse.digitaltwin.basyx.authorization.rbac.Action> ACTION_MAPPING
  • Constructor Details

    • RbacUtils

      public RbacUtils()
  • Method Details

    • createPermissionResolver

      public static <T extends org.eclipse.digitaltwin.basyx.authorization.rbac.TargetInformation> org.eclipse.digitaltwin.basyx.authorization.rbac.RbacPermissionResolver<T> createPermissionResolver(de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor authDesc, TargetInfoHandler<T> infoHandler, com.google.common.base.Supplier<org.eclipse.digitaltwin.basyx.authorization.rbac.TargetPermissionVerifier<T>> verifierCreator, de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor.RbacAasComponent... components)
      Creates a permission resolver from an authentication descriptor.
      Type Parameters:
      T - the type of target information
      Parameters:
      authDesc - the authentication descriptor (must comply with AuthenticationDescriptor.enableRbac()).
      infoHandler - the target information object handler
      verifierCreator - the target permission verifier creator
      components - the AAS components to create the resolver for (as filter)
      Returns:
      the created permission resolver
    • containsByRef

      private static <T> boolean containsByRef(T[] array, T element)
      Returns whether element is contained by reference equality in array.
      Type Parameters:
      T - the element type
      Parameters:
      array - the array
      element - the element to look for
      Returns:
      whether element is contained or not
    • createSubmodelPermissionResolver

      public static org.eclipse.digitaltwin.basyx.authorization.rbac.RbacPermissionResolver<org.eclipse.digitaltwin.basyx.submodelrepository.feature.authorization.SubmodelTargetInformation> createSubmodelPermissionResolver(de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor authDesc)
      Creates a submodel permission resolver from an authentication descriptor.
      Parameters:
      authDesc - the authentication descriptor (must comply with AuthenticationDescriptor.enableRbac()).
      Returns:
      the created permission resolver
    • createAasPermissionResolver

      public static org.eclipse.digitaltwin.basyx.authorization.rbac.RbacPermissionResolver<org.eclipse.digitaltwin.basyx.aasrepository.feature.authorization.AasTargetInformation> createAasPermissionResolver(de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor authDesc)
      Creates an AAS permission resolver from an authentication descriptor.
      Parameters:
      authDesc - the authentication descriptor (must comply with AuthenticationDescriptor.enableRbac()).
      Returns:
      the created permission resolver