de.smartics.properties.api.core.annotations
Annotation Type PropertyValueSecured


@Documented
@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface PropertyValueSecured

Defines that the property value is secured. The mechanism of making the value secure is not specified at design time, since it is an implementation detail. Tagging the property allows to state there there is some form of encoding or encryption. The deployer is responsible that the mechanism of securing the values matches the mechanism deployed to the runtime.

 
   
   

Example

public interface MyProperties {
...
  @PropertyValueSecured
  String password();
}

Please note that at runtime the values will be decrypted and are in plain text passed to the caller. If the property should be passed to the client in secured form use

 
   
   

Example

public interface MyProperties {
...
  @PropertyValueSecured(decrypt=false)
  char[] password();
}

There may be implementations that allow to have different encryption mechanisms for different property sets or even single key, although this is not required by the specification.

See Also:
PropertyLifecycle.definitionTime()

Optional Element Summary
 boolean decrypt
          Usually the secured value should be passed to the client decrypted.
 

decrypt

public abstract boolean decrypt
Usually the secured value should be passed to the client decrypted. For very sensitive information it may be required to pass the value as is. This would not require any special handling, but using this annotation with a value of false documents that this is a sensitive property.

Default:
true


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.