mirror of https://github.com/apache/nifi.git
NIFI-1358 Enable expression language support for AWS processor SECRET_KEY and ACCESS_KEY properties
Signed-off-by: Aldrin Piri <aldrin@apache.org>
This commit is contained in:
parent
bc75dd3c17
commit
7d73ae77f8
|
@ -79,14 +79,14 @@ public abstract class AbstractAWSProcessor<ClientType extends AmazonWebServiceCl
|
|||
.build();
|
||||
public static final PropertyDescriptor ACCESS_KEY = new PropertyDescriptor.Builder()
|
||||
.name("Access Key")
|
||||
.expressionLanguageSupported(false)
|
||||
.expressionLanguageSupported(true)
|
||||
.required(false)
|
||||
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
|
||||
.sensitive(true)
|
||||
.build();
|
||||
public static final PropertyDescriptor SECRET_KEY = new PropertyDescriptor.Builder()
|
||||
.name("Secret Key")
|
||||
.expressionLanguageSupported(false)
|
||||
.expressionLanguageSupported(true)
|
||||
.required(false)
|
||||
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
|
||||
.sensitive(true)
|
||||
|
@ -234,8 +234,8 @@ public abstract class AbstractAWSProcessor<ClientType extends AmazonWebServiceCl
|
|||
}
|
||||
|
||||
protected AWSCredentials getCredentials(final ProcessContext context) {
|
||||
final String accessKey = context.getProperty(ACCESS_KEY).getValue();
|
||||
final String secretKey = context.getProperty(SECRET_KEY).getValue();
|
||||
final String accessKey = context.getProperty(ACCESS_KEY).evaluateAttributeExpressions().getValue();
|
||||
final String secretKey = context.getProperty(SECRET_KEY).evaluateAttributeExpressions().getValue();
|
||||
|
||||
final String credentialsFile = context.getProperty(CREDENTIALS_FILE).getValue();
|
||||
|
||||
|
|
|
@ -149,8 +149,8 @@ public class AWSCredentialsProviderControllerService extends AbstractControllerS
|
|||
@OnEnabled
|
||||
public void onConfigured(final ConfigurationContext context) throws InitializationException {
|
||||
|
||||
final String accessKey = context.getProperty(ACCESS_KEY).getValue();
|
||||
final String secretKey = context.getProperty(SECRET_KEY).getValue();
|
||||
final String accessKey = context.getProperty(ACCESS_KEY).evaluateAttributeExpressions().getValue();
|
||||
final String secretKey = context.getProperty(SECRET_KEY).evaluateAttributeExpressions().getValue();
|
||||
final String assumeRoleArn = context.getProperty(ASSUME_ROLE_ARN).getValue();
|
||||
final Integer maxSessionTime = context.getProperty(MAX_SESSION_TIME).asInteger();
|
||||
final String assumeRoleName = context.getProperty(ASSUME_ROLE_NAME).getValue();
|
||||
|
|
Loading…
Reference in New Issue