Class SecurityAllowEverythingService
java.lang.Object
net.datenwerke.security.service.security.dummyservice.SecurityAllowEverythingService
- All Implemented Interfaces:
SecurityService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassertActions(Object target, Class<? extends SecurityAction>... actions) voidassertRights(Object target, Class<? extends Right>... rights) voidassertRights(Collection<User> users, Object target, Class<? extends Right>... rights) voidbooleancheckActions(Class<?> target, Class<? extends SecurityAction>... actions) booleancheckActions(SecurityTarget target, Class<? extends SecurityAction>... actions) Tests whether the givenSecurityActions are allowed to be performed by the givenSecurityTargetor not.booleancheckActions(User user, Class<?> target, Class<? extends SecurityAction>... actions) booleancheckActions(User user, SecurityTarget target, Class<? extends SecurityAction>... actions) booleancheckRights(Class<?> target, Class<? extends Right>... rights) booleanTests whether the target has the specified rights.booleancheckRights(Object target, Class<? extends Right>... rights) booleancheckRights(SecurityTarget target, boolean requireInheritance, Class<? extends Securee> securee, Class<? extends Right>... rights) booleancheckRights(SecurityTarget target, Class<? extends Right>... rights) Tests whether theSecurityTargethas the givenRights or not.booleancheckRights(SecurityTarget target, Class<? extends Securee> securee, Class<? extends Right>... rights) Tests whether the target has the specified rights.booleancheckRights(User user, Class<?> target, Class<? extends Securee> securee, Class<? extends Right>... rights) booleancheckRights(User user, SecurityTarget target, boolean requireInheritance, Class<? extends Securee> securee, Class<? extends Right>... rights) booleancheckRights(User user, SecurityTarget target, Class<? extends Securee> securee, Class<? extends Right>... rights) Tests whether the target has the specified rights.Creates a newAceand configures it with the given targetcreateACE(GenericSecurityTargetEntity entity) Creates a newAceand configures it with the given targetcreateGenericSecurityTargetEntity(Class<?> type) Creates and returns a new instance ofGenericSecurityTargetEntitywith the generic target identifier of the givenClass.createHierarchicalACE(Class<?> target) Creates a newHierarchicalAceand configures it with the given targetReturns aCollectionof all registeredSecureesClass<?> Returns the corresponding marker class.getKnownHostsFile(boolean appendFileCheck) Collection<Class<?>> Returns aCollectionofClasses of registered generic security targetsgetRegisteredSecureesForTarget(Class<?> target) Returns aCollectionofSecurees matching the given targetCollection<Class<? extends SecurityTarget>> Returs aCollectionof all registeredSecurityTargetsbooleanisEntitySecurityTarget(Class<?> type) Tests if the givenClassis aSecurityTargetbooleanisGenericTarget(Class<?> type) Tests if the givenClassis aGenericSecurityTargetbooleanisTypeSecured(Class<?> type) Tests whether theClasshas been registered.loadGenericTarget(Class<?> type) Loads aGenericSecurityTargetEntityby the generic target identifier of the givenClassLoads aGenericSecurityTargetEntityby the given generic target identifierMerges the givenAcewith the representation in the database and returns the result.Merges the givenAclwith the representation in the database and returns the result.merge(GenericSecurityTargetEntity targetEntity) Merges the givenGenericSecurityTargetEntitywith the representation in the database and returns the result.voidPersists the givenAcevoidPersists the givenAcl.voidregisterSecuree(Securee securee) Registers the givenSecureewith the systemvoidregisterSecurityTarget(Class<?>... types) Registers a new type as a security target adding only the default rights.voidregisterSecurityTarget(Class<?> type, Securee securee) voidregisterSecurityTarget(SecurityTargetConfiguration... configs) Allows a module to register one or more security targets.voidRemoves the givenAcefrom the databasevoidRemoves the givenAclfrom the database.
-
Constructor Details
-
SecurityAllowEverythingService
public SecurityAllowEverythingService()
-
-
Method Details
-
registerSecuree
Description copied from interface:SecurityServiceRegisters the givenSecureewith the system- Specified by:
registerSecureein interfaceSecurityService- Parameters:
securee- TheSecuree
-
getAllRegisteredSecurees
Description copied from interface:SecurityServiceReturns aCollectionof all registeredSecurees- Specified by:
getAllRegisteredSecureesin interfaceSecurityService- Returns:
- A
CollectionofSecurees
-
registerSecurityTarget
Description copied from interface:SecurityServiceAllows a module to register one or more security targets.- Specified by:
registerSecurityTargetin interfaceSecurityService- Parameters:
configs- One or more instances ofSecurityTargetConfiguration
-
registerSecurityTarget
Description copied from interface:SecurityService- Specified by:
registerSecurityTargetin interfaceSecurityService- Parameters:
type- TheClasssecuree- TheSecuree
-
registerSecurityTarget
Description copied from interface:SecurityServiceRegisters a new type as a security target adding only the default rights.- Specified by:
registerSecurityTargetin interfaceSecurityService- Parameters:
types- One or moreClasses to be registered
-
getRegisteredSecureesForTarget
Description copied from interface:SecurityServiceReturns aCollectionofSecurees matching the given target- Specified by:
getRegisteredSecureesForTargetin interfaceSecurityService- Parameters:
target- AClassdefining the type of the target- Returns:
- A
CollectionofSecurees
-
getRegisteredGenericSecurityTargets
Description copied from interface:SecurityServiceReturns aCollectionofClasses of registered generic security targets- Specified by:
getRegisteredGenericSecurityTargetsin interfaceSecurityService- Returns:
- A
CollectionofClasses
-
getRegisteredSecurityTargets
Description copied from interface:SecurityServiceReturs aCollectionof all registeredSecurityTargets- Specified by:
getRegisteredSecurityTargetsin interfaceSecurityService- Returns:
- A
CollectionofSecurityTargets
-
checkRights
Description copied from interface:SecurityServiceTests whether theSecurityTargethas the givenRights or not.- Specified by:
checkRightsin interfaceSecurityService- Parameters:
target- TheSecurityTargetrights- A list ofRights to test- Returns:
- true if the tests passed; false otherwise
-
checkRights
public boolean checkRights(SecurityTarget target, Class<? extends Securee> securee, Class<? extends Right>... rights) Description copied from interface:SecurityServiceTests whether the target has the specified rights.- Specified by:
checkRightsin interfaceSecurityService- Parameters:
target- TheSecurityTargetsecuree- TheSecureerights- A list ofRights to test- Returns:
- true if the tests passed; false otherwise
-
checkActions
Description copied from interface:SecurityServiceTests whether the givenSecurityActions are allowed to be performed by the givenSecurityTargetor not.- Specified by:
checkActionsin interfaceSecurityService- Parameters:
target- TheSecurityTargetactions- A list ofSecurityActions- Returns:
- true if the tests passed; false otherwise
-
checkRights
public boolean checkRights(User user, SecurityTarget target, Class<? extends Securee> securee, Class<? extends Right>... rights) Description copied from interface:SecurityServiceTests whether the target has the specified rights.- Specified by:
checkRightsin interfaceSecurityService- Parameters:
user- TheUsertarget-securee-rights-
-
checkActions
public boolean checkActions(User user, SecurityTarget target, Class<? extends SecurityAction>... actions) - Specified by:
checkActionsin interfaceSecurityService
-
checkRights
public boolean checkRights(Class<?> target, Class<? extends Securee> securee, Class<? extends Right>... rights) Description copied from interface:SecurityServiceTests whether the target has the specified rights.- Specified by:
checkRightsin interfaceSecurityService- Parameters:
target-rights-
-
checkRights
- Specified by:
checkRightsin interfaceSecurityService
-
checkActions
- Specified by:
checkActionsin interfaceSecurityService
-
checkRights
public boolean checkRights(User user, Class<?> target, Class<? extends Securee> securee, Class<? extends Right>... rights) - Specified by:
checkRightsin interfaceSecurityService
-
checkActions
- Specified by:
checkActionsin interfaceSecurityService
-
isTypeSecured
Description copied from interface:SecurityServiceTests whether theClasshas been registered.- Specified by:
isTypeSecuredin interfaceSecurityService- Parameters:
type- TheClassto test- Returns:
- true if the
Classhas been registered; false otherwise
-
isGenericTarget
Description copied from interface:SecurityServiceTests if the givenClassis aGenericSecurityTarget- Specified by:
isGenericTargetin interfaceSecurityService- Parameters:
type- TheClassto test- Returns:
- true if the given
Classis aGenericSecurityTarget; false otherwise
-
isEntitySecurityTarget
Description copied from interface:SecurityServiceTests if the givenClassis aSecurityTarget- Specified by:
isEntitySecurityTargetin interfaceSecurityService- Parameters:
type- TheClassto test- Returns:
- true if the given
Classis aSecurityTarget; false otherwise
-
createGenericSecurityTargetEntity
Description copied from interface:SecurityServiceCreates and returns a new instance ofGenericSecurityTargetEntitywith the generic target identifier of the givenClass.- Specified by:
createGenericSecurityTargetEntityin interfaceSecurityService- Parameters:
type- TheClassto use the generic target identifier from- Returns:
- A new instance of
GenericSecurityTargetEntity
-
merge
Description copied from interface:SecurityServiceMerges the givenGenericSecurityTargetEntitywith the representation in the database and returns the result.- Specified by:
mergein interfaceSecurityService- Parameters:
targetEntity- TheGenericSecurityTargetEntitywith the new data- Returns:
- The merged
GenericSecurityTargetEntity
-
loadGenericTarget
Description copied from interface:SecurityServiceLoads aGenericSecurityTargetEntityby the generic target identifier of the givenClass- Specified by:
loadGenericTargetin interfaceSecurityService- Parameters:
type- TheClassto get the generic target identifier- Returns:
- The loaded
GenericSecurityTargetEntity
-
loadGenericTargetByIdentifier
Description copied from interface:SecurityServiceLoads aGenericSecurityTargetEntityby the given generic target identifier- Specified by:
loadGenericTargetByIdentifierin interfaceSecurityService- Parameters:
id- The generic target identifier- Returns:
- The loaded
GenericSecurityTargetEntity
-
getGenericTargetMarkerById
Description copied from interface:SecurityServiceReturns the corresponding marker class.- Specified by:
getGenericTargetMarkerByIdin interfaceSecurityService- Parameters:
id- The id to identify the marker class- Returns:
- The marker class
- See Also:
-
persist
Description copied from interface:SecurityServicePersists the givenAcl.- Specified by:
persistin interfaceSecurityService- Parameters:
acl- TheAclto persist
-
merge
Description copied from interface:SecurityServiceMerges the givenAclwith the representation in the database and returns the result.- Specified by:
mergein interfaceSecurityService- Parameters:
acl- TheAclwith the new data- Returns:
- The merged
Acl
-
remove
Description copied from interface:SecurityServiceRemoves the givenAclfrom the database.- Specified by:
removein interfaceSecurityService- Parameters:
acl- TheAclto remove
-
persist
Description copied from interface:SecurityServicePersists the givenAce- Specified by:
persistin interfaceSecurityService- Parameters:
ace- TheAceto persist
-
merge
Description copied from interface:SecurityServiceMerges the givenAcewith the representation in the database and returns the result.- Specified by:
mergein interfaceSecurityService- Parameters:
ace- TheAcewith the new data- Returns:
- The merged
Ace
-
remove
Description copied from interface:SecurityServiceRemoves the givenAcefrom the database- Specified by:
removein interfaceSecurityService- Parameters:
ace- TheAceto remove from the database
-
createACE
Description copied from interface:SecurityServiceCreates a newAceand configures it with the given target- Specified by:
createACEin interfaceSecurityService- Parameters:
target- The targetClass- Returns:
- The newly created
Ace
-
createACE
Description copied from interface:SecurityServiceCreates a newAceand configures it with the given target- Specified by:
createACEin interfaceSecurityService- Parameters:
entity- AGenericSecurityTargetEntityholding the target marker id- Returns:
- The newly created
Ace
-
createHierarchicalACE
Description copied from interface:SecurityServiceCreates a newHierarchicalAceand configures it with the given target- Specified by:
createHierarchicalACEin interfaceSecurityService- Parameters:
target- The targetClass- Returns:
- The newly created
HierarchicalAce
-
checkRights
public boolean checkRights(User user, SecurityTarget target, boolean requireInheritance, Class<? extends Securee> securee, Class<? extends Right>... rights) - Specified by:
checkRightsin interfaceSecurityService
-
checkRights
public boolean checkRights(SecurityTarget target, boolean requireInheritance, Class<? extends Securee> securee, Class<? extends Right>... rights) - Specified by:
checkRightsin interfaceSecurityService
-
assertRights
- Specified by:
assertRightsin interfaceSecurityService
-
assertActions
- Specified by:
assertActionsin interfaceSecurityService
-
assertUserLoggedIn
public void assertUserLoggedIn()- Specified by:
assertUserLoggedInin interfaceSecurityService
-
assertRights
- Specified by:
assertRightsin interfaceSecurityService
-
checkRights
- Specified by:
checkRightsin interfaceSecurityService
-
getSupportedSslProtocols
- Specified by:
getSupportedSslProtocolsin interfaceSecurityService
-
getDefaultSslProtocols
- Specified by:
getDefaultSslProtocolsin interfaceSecurityService
-
getEnabledSslProtocols
- Specified by:
getEnabledSslProtocolsin interfaceSecurityService
-
getKnownHostsFile
- Specified by:
getKnownHostsFilein interfaceSecurityService
-
getStrictHostKeyChecking
- Specified by:
getStrictHostKeyCheckingin interfaceSecurityService
-