This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated config properties to be prefixed by "apicurio." instead of "d…
…esigner."
- Loading branch information
1 parent
d222d66
commit 3aced49
Showing
7 changed files
with
52 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,13 +20,14 @@ | |
import java.util.Map; | ||
import java.util.Properties; | ||
|
||
import jakarta.inject.Inject; | ||
import jakarta.inject.Singleton; | ||
import jakarta.annotation.PostConstruct; | ||
import org.eclipse.microprofile.config.inject.ConfigProperty; | ||
import org.slf4j.Logger; | ||
|
||
import io.apicurio.common.apps.config.Info; | ||
import io.apicurio.designer.common.config.DesignerProperties; | ||
import jakarta.annotation.PostConstruct; | ||
import jakarta.inject.Inject; | ||
import jakarta.inject.Singleton; | ||
|
||
/** | ||
* @author [email protected] | ||
|
@@ -38,43 +39,43 @@ public class ApiDesignerConfig { | |
Logger log; | ||
|
||
@Inject | ||
@ConfigProperty(name = "designer.ui.config.uiContextPath", defaultValue = "/ui/") | ||
//@Info(category = "ui", description = "UI context path", availableSince = "1.0.0.Final") | ||
@ConfigProperty(name = "apicurio.ui.config.uiContextPath", defaultValue = "/ui/") | ||
@Info(category = "ui", description = "UI context path", availableSince = "1.0.0.Final") | ||
public String uiContextPath; | ||
|
||
@Inject | ||
@ConfigProperty(name = "designer.ui.config.apiUrl", defaultValue = "_") | ||
//@Info(category = "ui", description = "UI APIs URL", availableSince = "1.0.0.Final") | ||
@ConfigProperty(name = "apicurio.ui.config.apiUrl", defaultValue = "_") | ||
@Info(category = "ui", description = "UI APIs URL", availableSince = "1.0.0.Final") | ||
public String apiUrl; | ||
|
||
@Inject | ||
@ConfigProperty(name = "designer.ui.config.editorsUrl", defaultValue = "/editors/") | ||
//@Info(category = "ui", description = "UI APIs URL", availableSince = "1.0.0.Final") | ||
@ConfigProperty(name = "apicurio.ui.config.editorsUrl", defaultValue = "/editors/") | ||
@Info(category = "ui", description = "UI APIs URL", availableSince = "1.0.0.Final") | ||
public String editorsUrl; | ||
|
||
@Inject | ||
@ConfigProperty(name = "quarkus.oidc.tenant-enabled", defaultValue = "false") | ||
//@Info(category = "ui", description = "UI OIDC tenant enabled", availableSince = "1.0.0.Final") | ||
@Info(category = "ui", description = "UI OIDC tenant enabled", availableSince = "1.0.0.Final") | ||
public boolean authenticationEnabled; | ||
|
||
@Inject | ||
@ConfigProperty(name = "designer.ui.config.auth.type", defaultValue = "none") | ||
//@Info(category = "ui", description = "UI auth type", availableSince = "1.0.0.Final") | ||
@ConfigProperty(name = "apicurio.ui.config.auth.type", defaultValue = "none") | ||
@Info(category = "ui", description = "UI auth type", availableSince = "1.0.0.Final") | ||
public String uiAuthType; | ||
|
||
@Inject | ||
@ConfigProperty(name = "designer.ui.config.auth.oidc.url", defaultValue = "none") | ||
//@Info(category = "ui", description = "UI auth OIDC URL", availableSince = "1.0.0.Final") | ||
@ConfigProperty(name = "apicurio.ui.config.auth.oidc.url", defaultValue = "none") | ||
@Info(category = "ui", description = "UI auth OIDC URL", availableSince = "1.0.0.Final") | ||
public String oidcUrl; | ||
|
||
@Inject | ||
@ConfigProperty(name = "designer.ui.config.auth.oidc.client-id", defaultValue = "none") | ||
//@Info(category = "ui", description = "UI auth OIDC client ID", availableSince = "1.0.0.Final") | ||
@ConfigProperty(name = "apicurio.ui.config.auth.oidc.client-id", defaultValue = "none") | ||
@Info(category = "ui", description = "UI auth OIDC client ID", availableSince = "1.0.0.Final") | ||
public String oidcClientId; | ||
|
||
@Inject | ||
@ConfigProperty(name = "designer.ui.config.auth.oidc.redirect-url", defaultValue = "none") | ||
//@Info(category = "ui", description = "UI auth OIDC redirect URL", availableSince = "1.0.0.Final") | ||
@ConfigProperty(name = "apicurio.ui.config.auth.oidc.redirect-url", defaultValue = "none") | ||
@Info(category = "ui", description = "UI auth OIDC redirect URL", availableSince = "1.0.0.Final") | ||
public String oidcRedirectUri; | ||
|
||
public final Map<String, Object> keycloakConfig; | ||
|
@@ -83,7 +84,7 @@ public class ApiDesignerConfig { | |
* Constructor. | ||
* @param kcProperties | ||
*/ | ||
public ApiDesignerConfig(@DesignerProperties(value = {"designer.ui.config.auth"}) Properties kcProperties) { | ||
public ApiDesignerConfig(@DesignerProperties(value = {"apicurio.ui.config.auth"}) Properties kcProperties) { | ||
this.keycloakConfig = new HashMap<>(); | ||
kcProperties.stringPropertyNames().forEach(key -> keycloakConfig.put(key, kcProperties.get(key))); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,10 @@ | |
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import org.eclipse.microprofile.config.inject.ConfigProperty; | ||
|
||
import io.apicurio.common.apps.config.Info; | ||
import jakarta.annotation.PostConstruct; | ||
import jakarta.enterprise.context.ApplicationScoped; | ||
import jakarta.servlet.Filter; | ||
import jakarta.servlet.FilterChain; | ||
|
@@ -30,21 +34,18 @@ | |
import jakarta.servlet.http.HttpServletRequest; | ||
import jakarta.servlet.http.HttpServletResponse; | ||
|
||
import jakarta.annotation.PostConstruct; | ||
import org.eclipse.microprofile.config.inject.ConfigProperty; | ||
|
||
/** | ||
* @author [email protected] | ||
*/ | ||
@ApplicationScoped | ||
public class RedirectFilter implements Filter { | ||
|
||
@ConfigProperty(name = "designer.enable-redirects", defaultValue = "true") | ||
// @Info(category = "redirects", description = "Enable redirects", availableSince = "2.1.2.Final") | ||
@ConfigProperty(name = "apicurio.enable-redirects", defaultValue = "true") | ||
@Info(category = "redirects", description = "Enable redirects", availableSince = "1.0.0.Final") | ||
Boolean redirectsEnabled; | ||
|
||
@ConfigProperty(name = "designer.redirects") | ||
// @Info(category = "redirects", description = "Registry redirects", availableSince = "2.1.2.Final") | ||
@ConfigProperty(name = "apicurio.redirects") | ||
@Info(category = "redirects", description = "Designer redirects", availableSince = "1.0.0.Final") | ||
Map<String, String> redirectsConfig; | ||
Map<String, String> redirects = new HashMap<>(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters