Skip to content

Commit

Permalink
Merge pull request #14 from rundeck-plugins/password_fix
Browse files Browse the repository at this point in the history
Add password display type to hash map for auth type props
  • Loading branch information
chrismcg14 authored Jan 26, 2022
2 parents 91dc873 + 845d9e7 commit 25d8864
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/java/com/rundeck/plugins/aws/S3ResourceModelSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,19 @@ public class S3ResourceModelSource implements ResourceModelSourceFactory,Describ
"json"
));

final static Map<String, Object> renderingOptionsAuthentication = getRenderOpt("Credentials",false);
final static Map<String, Object> renderingOptionsConnection = getRenderOpt("Connection",false);
final static Map<String, Object> renderingOptionsResource = getRenderOpt("Resource",false);
final static Map<String, Object> renderingOptionsAuthentication = getRenderOpt("Credentials",false, true);
final static Map<String, Object> renderingOptionsConnection = getRenderOpt("Connection",false, false);
final static Map<String, Object> renderingOptionsResource = getRenderOpt("Resource",false, false);

protected static Map<String, Object> getRenderOpt(String value, boolean secondary) {
protected static Map<String, Object> getRenderOpt(String value, boolean secondary, boolean password) {
Map<String, Object> ret = new HashMap<>();
ret.put(StringRenderingConstants.GROUP_NAME,value);
if(secondary){
ret.put(StringRenderingConstants.GROUPING,"secondary");
}
if(password){
ret.put("displayType",StringRenderingConstants.DisplayType.PASSWORD);
}
return ret;
}

Expand Down

0 comments on commit 25d8864

Please sign in to comment.