Skip to content

Commit 463ac4e

Browse files
committed
add string rendering constant password value to hashmap for authentication props
1 parent 91dc873 commit 463ac4e

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/main/java/com/rundeck/plugins/aws/S3ResourceModelSource.java

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
import com.dtolabs.rundeck.plugins.ServiceNameConstants;
4040
import com.dtolabs.rundeck.plugins.util.DescriptionBuilder;
4141

42-
@Plugin(name = "aws-s3-source", service = ServiceNameConstants.ResourceModelSource)
42+
@Plugin(name = "aws-s3-source-chris", service = ServiceNameConstants.ResourceModelSource)
4343
public class S3ResourceModelSource implements ResourceModelSourceFactory,Describable {
44-
public static final String PROVIDER_NAME = "aws-s3-source";
44+
public static final String PROVIDER_NAME = "aws-s3-source-chris";
4545

4646
private Framework framework;
4747

@@ -88,29 +88,32 @@ public class S3ResourceModelSource implements ResourceModelSourceFactory,Describ
8888
"json"
8989
));
9090

91-
final static Map<String, Object> renderingOptionsAuthentication = getRenderOpt("Credentials",false);
92-
final static Map<String, Object> renderingOptionsConnection = getRenderOpt("Connection",false);
93-
final static Map<String, Object> renderingOptionsResource = getRenderOpt("Resource",false);
91+
final static Map<String, Object> renderingOptionsAuthentication = getRenderOpt("Credentials",false, true);
92+
final static Map<String, Object> renderingOptionsConnection = getRenderOpt("Connection",false, false);
93+
final static Map<String, Object> renderingOptionsResource = getRenderOpt("Resource",false, false);
9494

95-
protected static Map<String, Object> getRenderOpt(String value, boolean secondary) {
95+
protected static Map<String, Object> getRenderOpt(String value, boolean secondary, boolean password) {
9696
Map<String, Object> ret = new HashMap<>();
9797
ret.put(StringRenderingConstants.GROUP_NAME,value);
9898
if(secondary){
9999
ret.put(StringRenderingConstants.GROUPING,"secondary");
100100
}
101+
if(password){
102+
ret.put("displayType",StringRenderingConstants.DisplayType.PASSWORD);
103+
}
101104
return ret;
102105
}
103106

104107

105108
static Description DESC = DescriptionBuilder.builder()
106109
.name(PROVIDER_NAME)
107-
.title("AWS S3 remote model source")
110+
.title("AWS S3 remote model source - TEST")
108111
.description("Obtain nodes information from a file located in a S3 bucket")
109-
.property(PropertyUtil.string(KEY, "AWS Access Key", "AWS Access Key.", false,
112+
.property(PropertyUtil.string(KEY, "AWS Access Key", "AWS Access Key. - TEST", false,
110113
null,null,null, renderingOptionsAuthentication))
111-
.property(PropertyUtil.string(SECRET, "AWS Secret Key", "AWS Secret Key.", false,
114+
.property(PropertyUtil.string(SECRET, "AWS Secret Key", "AWS Secret Key. - TEST", false,
112115
null,null,null, renderingOptionsAuthentication))
113-
.property(PropertyUtil.string(CREDENTIALFILE, "AWS Credentials File", "Path to a AWSCredentials.properties file " +
116+
.property(PropertyUtil.string(CREDENTIALFILE, "AWS Credentials File - TEST", "Path to a AWSCredentials.properties file " +
114117
"containing 'accessKey' and 'secretKey'.", false,
115118
null,null,null, renderingOptionsAuthentication))
116119

0 commit comments

Comments
 (0)