Skip to content

Commit

Permalink
fix: feature flag default values (#6857)
Browse files Browse the repository at this point in the history
* fix(auth-server): make fields mandatory feature

Feature flag documentation should always have `description` and `Default Value` for every feature flag. So making them mandatory fields by removing the defaults.

Signed-off-by: ossdhaval <343411+ossdhaval@users.noreply.github.com>

* fix(auth-server): added default values to feature flags

Signed-off-by: ossdhaval <343411+ossdhaval@users.noreply.github.com>

---------

Signed-off-by: ossdhaval <343411+ossdhaval@users.noreply.github.com>
  • Loading branch information
ossdhaval committed Nov 30, 2023
1 parent 370835a commit 75b49be
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,66 @@
public enum FeatureFlagType {

UNKNOWN("unknown"),
@DocFeatureFlag(description = "Enable/Disable health-check endpoint")
@DocFeatureFlag(description = "Enable/Disable health-check endpoint",
defaultValue = "Enabled")
HEALTH_CHECK("health_check"),
@DocFeatureFlag(description = "Enable/Disable OpenID Connect [userinfo endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo)")
@DocFeatureFlag(description = "Enable/Disable OpenID Connect [userinfo endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo)",
defaultValue = "Enabled")
USERINFO("userinfo"),

@DocFeatureFlag(description = "Enable/Disable client info endpoint")
@DocFeatureFlag(description = "Enable/Disable client info endpoint",
defaultValue = "Enabled")
CLIENTINFO("clientinfo"),
@DocFeatureFlag(description = "Enable/Disable ID Generation endpoint")
@DocFeatureFlag(description = "Enable/Disable ID Generation endpoint",
defaultValue = "Enabled")
ID_GENERATION("id_generation"),
@DocFeatureFlag(description = "Enable/Disable client registration endpoint")
@DocFeatureFlag(description = "Enable/Disable client registration endpoint",
defaultValue = "Enabled")
REGISTRATION("registration"),
@DocFeatureFlag(description = "Enable/Disable token introspection endpoint")
@DocFeatureFlag(description = "Enable/Disable token introspection endpoint",
defaultValue = "Enabled")
INTROSPECTION("introspection"),
@DocFeatureFlag(description = "Enable/Disable token revocation endpoint")
@DocFeatureFlag(description = "Enable/Disable token revocation endpoint",
defaultValue = "Enabled")
REVOKE_TOKEN("revoke_token"),
@DocFeatureFlag(description = "Enable/Disable session revocation endpoint")
@DocFeatureFlag(description = "Enable/Disable session revocation endpoint",
defaultValue = "Enabled")
REVOKE_SESSION("revoke_session"),
@DocFeatureFlag(description = "Enable/Disable active session endpoint")
@DocFeatureFlag(description = "Enable/Disable active session endpoint",
defaultValue = "Enabled")
ACTIVE_SESSION("active_session"),
@DocFeatureFlag(description = "Enable/Disable end session endpoint")
@DocFeatureFlag(description = "Enable/Disable end session endpoint",
defaultValue = "Enabled")
END_SESSION("end_session"),
@DocFeatureFlag(description = "Enable/Disable session status check endpoint")
@DocFeatureFlag(description = "Enable/Disable session status check endpoint",
defaultValue = "Enabled")
STATUS_SESSION("status_session"),
@DocFeatureFlag(description = "Enable/Disable *.well-known* configuration endpoint")
@DocFeatureFlag(description = "Enable/Disable *.well-known* configuration endpoint",
defaultValue = "Enabled")
JANS_CONFIGURATION("jans_configuration"), // /.well-known/jans-configuration
@DocFeatureFlag(description = "Enable/Disable OpenID Connect Client Initiated Backchannel Authentication Flow(CIBA) flow support")
@DocFeatureFlag(description = "Enable/Disable OpenID Connect Client Initiated Backchannel Authentication Flow(CIBA) flow support",
defaultValue = "Enabled")
CIBA("ciba"),
@DocFeatureFlag(description = "Enable/Disable support for User-Managed Access (UMA)")
@DocFeatureFlag(description = "Enable/Disable support for User-Managed Access (UMA)",
defaultValue = "Disabled")
UMA("uma"),
@DocFeatureFlag(description = "Enable/Disable support for Universal 2nd Factor(U2F) protocol")
@DocFeatureFlag(description = "Enable/Disable support for Universal 2nd Factor(U2F) protocol",
defaultValue = "Disabled")
U2F("u2f"),
@DocFeatureFlag(description = "Enable/Disable support for device authorization")
@DocFeatureFlag(description = "Enable/Disable support for device authorization",
defaultValue = "Enabled")
DEVICE_AUTHZ("device_authz"),
@DocFeatureFlag(description = "Enable/Disable metric reporter feature")
@DocFeatureFlag(description = "Enable/Disable metric reporter feature",
defaultValue = "Enabled")
METRIC("metric"),
@DocFeatureFlag(description = "Enable/Disable Stat service")
@DocFeatureFlag(description = "Enable/Disable Stat service",
defaultValue = "Enabled")
STAT("stat"),
@DocFeatureFlag(description = "Enable/Disable Pushed Authorization Requests(PAR) feature")
@DocFeatureFlag(description = "Enable/Disable Pushed Authorization Requests(PAR) feature",
defaultValue = "Enabled")
PAR("par"),
@DocFeatureFlag(description = "Enable/Disable Software Statement Assertion(SSA) feature")
@DocFeatureFlag(description = "Enable/Disable Software Statement Assertion(SSA) feature",
defaultValue = "Enabled")
SSA("ssa");

private final String value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.SOURCE)
public @interface DocFeatureFlag {
String description() default "None";
String description();

boolean isRequired() default false;

String defaultValue() default "None";
String defaultValue();
}

0 comments on commit 75b49be

Please sign in to comment.