Class RbacUtils
java.lang.Object
de.iip_ecosphere.platform.support.aas.basyx2.server.apps.security.RbacUtils
RBAC utility (translation) functions.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classRbacUtils.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 classRbacUtils.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
FieldsModifier and TypeFieldDescriptionprivate static final Map<de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor.RbacAction, org.eclipse.digitaltwin.basyx.authorization.rbac.Action> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> booleancontainsByRef(T[] array, T element) Returns whetherelementis contained by reference equality inarray.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.
-
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 withAuthenticationDescriptor.enableRbac()).infoHandler- the target information object handlerverifierCreator- the target permission verifier creatorcomponents- 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 whetherelementis contained by reference equality inarray.- Type Parameters:
T- the element type- Parameters:
array- the arrayelement- 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 withAuthenticationDescriptor.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 withAuthenticationDescriptor.enableRbac()).- Returns:
- the created permission resolver
-