Interface SecurityPropertiesService
- All Known Implementing Classes:
DefaultSecurityPropertiesService
public interface SecurityPropertiesService
SecurityPropertiesService provides cached access to persistent properties, which are supposed to serve
security related aspects.
See the only, so far, implementation
DefaultSecurityPropertiesService
for more info.-
Method Summary
Modifier and TypeMethodDescriptiongets a security property of key,void
invalidates all cache entriesvoid
invalidate
(String key) invalidates cache entry for key
-
Method Details
-
getSecret
gets a security property of key,- Parameters:
key
-- Returns:
- if the property is present - return it (wrapped in Optional) if the property is missing and it's safe to create (e.g. not in ZDU) it will create, persist and return a newly generated random base64-encoded value, if it's not possible to create the value at the time (e.g. in ZDU) - returns Optional.empty() - in such case the security feature relying on the property should get temporarily disabled, but the client should keep trying to get non-empty value periodically, as eventually (e.g. after ZDU completed) it should return non-empty one.
-
invalidate
invalidates cache entry for key- Parameters:
key
-
-
invalidate
void invalidate()invalidates all cache entries
-