Skip to content

Commit fe65f21

Browse files
committed
.secret property special case, updated documentation oidc code flow
* The DocumentationGenerator now generates "or ..._FILE" headings also for properties ending in .secret * Update the recommendation for dev.dsf.server.auth.oidc.authorization.code.flow to reflect the generator change. cherry-picked from DSF 1.7.1
1 parent de740c7 commit fe65f21

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dsf-common/dsf-common-jetty/src/main/java/dev/dsf/common/config/AbstractJettyConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public abstract class AbstractJettyConfig
115115
@Value("${dev.dsf.server.certificate.key.password:#{null}}")
116116
private char[] serverCertificateKeyFilePassword;
117117

118-
@Documentation(description = "Set to `true` to enable OIDC authorization code flow", recommendation = "Requires *DEV_DSF_SERVER_AUTH_OIDC_PROVIDER_REALM_BASE_URL*, *DEV_DSF_SERVER_AUTH_OIDC_CLIENT_ID* and *DEV_DSF_SERVER_AUTH_OIDC_CLIENT_SECRET* to be specified")
118+
@Documentation(description = "Set to `true` to enable OIDC authorization code flow", recommendation = "Requires *DEV_DSF_SERVER_AUTH_OIDC_PROVIDER_REALM_BASE_URL*, *DEV_DSF_SERVER_AUTH_OIDC_CLIENT_ID* and *DEV_DSF_SERVER_AUTH_OIDC_CLIENT_SECRET* or *DEV_DSF_SERVER_AUTH_OIDC_CLIENT_SECRET_FILE* to be specified")
119119
@Value("${dev.dsf.server.auth.oidc.authorization.code.flow:false}")
120120
private boolean oidcAuthorizationCodeFlowEnabled;
121121

dsf-tools/dsf-tools-documentation-generator/src/main/java/dev/dsf/tools/generator/DocumentationGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ private Function<Field, DocumentationEntry> processDocumentationGenerator(List<S
222222
String property = getDocumentationString("Property", initialProperty);
223223

224224
String initialEnvironment = initialProperty.replace(".", "_").toUpperCase();
225-
String environment = initialProperty.endsWith(".password")
225+
String environment = initialProperty.endsWith(".password") || initialProperty.endsWith(".secret")
226226
? String.format("%s or %s_FILE", initialEnvironment, initialEnvironment)
227227
: initialEnvironment;
228228

@@ -261,7 +261,7 @@ private Function<Field, DocumentationEntry> dsfDocumentationGenerator()
261261
String property = getDocumentationString("Property", initialProperty);
262262

263263
String initialEnvironment = initialProperty.replace(".", "_").toUpperCase();
264-
String environment = initialProperty.endsWith(".password")
264+
String environment = initialProperty.endsWith(".password") || initialProperty.endsWith(".secret")
265265
? String.format("%s or %s_FILE", initialEnvironment, initialEnvironment)
266266
: initialEnvironment;
267267

0 commit comments

Comments
 (0)