Add profile feature for hosting keycloak.js on the server (#14771)

* Add profile feature for hosting keycloak.js on the server

Closes #14770

* Updated txt files for HelpCommandTest
This commit is contained in:
Stian Thorgersen 2022-10-10 08:00:50 +02:00 committed by GitHub
parent 148c7695ff
commit fda26385ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 26 additions and 22 deletions

View file

@ -191,7 +191,8 @@ public class Profile {
CLIENT_SECRET_ROTATION("Client Secret Rotation", Type.PREVIEW), CLIENT_SECRET_ROTATION("Client Secret Rotation", Type.PREVIEW),
STEP_UP_AUTHENTICATION("Step-up Authentication", Type.DEFAULT), STEP_UP_AUTHENTICATION("Step-up Authentication", Type.DEFAULT),
RECOVERY_CODES("Recovery codes", Type.PREVIEW), RECOVERY_CODES("Recovery codes", Type.PREVIEW),
UPDATE_EMAIL("Update Email Action", Type.PREVIEW); UPDATE_EMAIL("Update Email Action", Type.PREVIEW),
JS_ADAPTER("Host keycloak.js and keycloak-authz.js through the Keycloak sever", Type.DEFAULT);
private final Type typeProject; private final Type typeProject;

View file

@ -48,14 +48,14 @@ Feature:
docker, impersonation, openshift-integration, scripts, token-exchange, docker, impersonation, openshift-integration, scripts, token-exchange,
web-authn, client-policies, ciba, map-storage, par, web-authn, client-policies, ciba, map-storage, par,
declarative-user-profile, dynamic-scopes, client-secret-rotation, declarative-user-profile, dynamic-scopes, client-secret-rotation,
step-up-authentication, recovery-codes, update-email, preview. step-up-authentication, recovery-codes, update-email, js-adapter, preview.
--features-disabled <feature> --features-disabled <feature>
Disables a set of one or more features. Possible values are: authorization, Disables a set of one or more features. Possible values are: authorization,
account2, account-api, admin-fine-grained-authz, admin-api, admin, admin2, account2, account-api, admin-fine-grained-authz, admin-api, admin, admin2,
docker, impersonation, openshift-integration, scripts, token-exchange, docker, impersonation, openshift-integration, scripts, token-exchange,
web-authn, client-policies, ciba, map-storage, par, web-authn, client-policies, ciba, map-storage, par,
declarative-user-profile, dynamic-scopes, client-secret-rotation, declarative-user-profile, dynamic-scopes, client-secret-rotation,
step-up-authentication, recovery-codes, update-email, preview. step-up-authentication, recovery-codes, update-email, js-adapter, preview.
HTTP/TLS: HTTP/TLS:

View file

@ -48,14 +48,14 @@ Feature:
impersonation, openshift-integration, scripts, token-exchange, web-authn, impersonation, openshift-integration, scripts, token-exchange, web-authn,
client-policies, ciba, map-storage, par, declarative-user-profile, client-policies, ciba, map-storage, par, declarative-user-profile,
dynamic-scopes, client-secret-rotation, step-up-authentication, dynamic-scopes, client-secret-rotation, step-up-authentication,
recovery-codes, update-email, preview. recovery-codes, update-email, js-adapter, preview.
--features-disabled <feature> --features-disabled <feature>
Disables a set of one or more features. Possible values are: authorization, Disables a set of one or more features. Possible values are: authorization,
account2, account-api, admin-fine-grained-authz, admin2, docker, account2, account-api, admin-fine-grained-authz, admin2, docker,
impersonation, openshift-integration, scripts, token-exchange, web-authn, impersonation, openshift-integration, scripts, token-exchange, web-authn,
client-policies, ciba, map-storage, par, declarative-user-profile, client-policies, ciba, map-storage, par, declarative-user-profile,
dynamic-scopes, client-secret-rotation, step-up-authentication, dynamic-scopes, client-secret-rotation, step-up-authentication,
recovery-codes, update-email, preview. recovery-codes, update-email, js-adapter, preview.
HTTP/TLS: HTTP/TLS:

View file

@ -71,14 +71,14 @@ Feature:
docker, impersonation, openshift-integration, scripts, token-exchange, docker, impersonation, openshift-integration, scripts, token-exchange,
web-authn, client-policies, ciba, map-storage, par, web-authn, client-policies, ciba, map-storage, par,
declarative-user-profile, dynamic-scopes, client-secret-rotation, declarative-user-profile, dynamic-scopes, client-secret-rotation,
step-up-authentication, recovery-codes, update-email, preview. step-up-authentication, recovery-codes, update-email, js-adapter, preview.
--features-disabled <feature> --features-disabled <feature>
Disables a set of one or more features. Possible values are: authorization, Disables a set of one or more features. Possible values are: authorization,
account2, account-api, admin-fine-grained-authz, admin-api, admin, admin2, account2, account-api, admin-fine-grained-authz, admin-api, admin, admin2,
docker, impersonation, openshift-integration, scripts, token-exchange, docker, impersonation, openshift-integration, scripts, token-exchange,
web-authn, client-policies, ciba, map-storage, par, web-authn, client-policies, ciba, map-storage, par,
declarative-user-profile, dynamic-scopes, client-secret-rotation, declarative-user-profile, dynamic-scopes, client-secret-rotation,
step-up-authentication, recovery-codes, update-email, preview. step-up-authentication, recovery-codes, update-email, js-adapter, preview.
Hostname: Hostname:

View file

@ -71,14 +71,14 @@ Feature:
impersonation, openshift-integration, scripts, token-exchange, web-authn, impersonation, openshift-integration, scripts, token-exchange, web-authn,
client-policies, ciba, map-storage, par, declarative-user-profile, client-policies, ciba, map-storage, par, declarative-user-profile,
dynamic-scopes, client-secret-rotation, step-up-authentication, dynamic-scopes, client-secret-rotation, step-up-authentication,
recovery-codes, update-email, preview. recovery-codes, update-email, js-adapter, preview.
--features-disabled <feature> --features-disabled <feature>
Disables a set of one or more features. Possible values are: authorization, Disables a set of one or more features. Possible values are: authorization,
account2, account-api, admin-fine-grained-authz, admin2, docker, account2, account-api, admin-fine-grained-authz, admin2, docker,
impersonation, openshift-integration, scripts, token-exchange, web-authn, impersonation, openshift-integration, scripts, token-exchange, web-authn,
client-policies, ciba, map-storage, par, declarative-user-profile, client-policies, ciba, map-storage, par, declarative-user-profile,
dynamic-scopes, client-secret-rotation, step-up-authentication, dynamic-scopes, client-secret-rotation, step-up-authentication,
recovery-codes, update-email, preview. recovery-codes, update-email, js-adapter, preview.
Hostname: Hostname:

View file

@ -132,14 +132,14 @@ Feature:
docker, impersonation, openshift-integration, scripts, token-exchange, docker, impersonation, openshift-integration, scripts, token-exchange,
web-authn, client-policies, ciba, map-storage, par, web-authn, client-policies, ciba, map-storage, par,
declarative-user-profile, dynamic-scopes, client-secret-rotation, declarative-user-profile, dynamic-scopes, client-secret-rotation,
step-up-authentication, recovery-codes, update-email, preview. step-up-authentication, recovery-codes, update-email, js-adapter, preview.
--features-disabled <feature> --features-disabled <feature>
Disables a set of one or more features. Possible values are: authorization, Disables a set of one or more features. Possible values are: authorization,
account2, account-api, admin-fine-grained-authz, admin-api, admin, admin2, account2, account-api, admin-fine-grained-authz, admin-api, admin, admin2,
docker, impersonation, openshift-integration, scripts, token-exchange, docker, impersonation, openshift-integration, scripts, token-exchange,
web-authn, client-policies, ciba, map-storage, par, web-authn, client-policies, ciba, map-storage, par,
declarative-user-profile, dynamic-scopes, client-secret-rotation, declarative-user-profile, dynamic-scopes, client-secret-rotation,
step-up-authentication, recovery-codes, update-email, preview. step-up-authentication, recovery-codes, update-email, js-adapter, preview.
Hostname: Hostname:

View file

@ -132,14 +132,14 @@ Feature:
docker, impersonation, openshift-integration, scripts, token-exchange, docker, impersonation, openshift-integration, scripts, token-exchange,
web-authn, client-policies, ciba, map-storage, par, web-authn, client-policies, ciba, map-storage, par,
declarative-user-profile, dynamic-scopes, client-secret-rotation, declarative-user-profile, dynamic-scopes, client-secret-rotation,
step-up-authentication, recovery-codes, update-email, preview. step-up-authentication, recovery-codes, update-email, js-adapter, preview.
--features-disabled <feature> --features-disabled <feature>
Disables a set of one or more features. Possible values are: authorization, Disables a set of one or more features. Possible values are: authorization,
account2, account-api, admin-fine-grained-authz, admin-api, admin, admin2, account2, account-api, admin-fine-grained-authz, admin-api, admin, admin2,
docker, impersonation, openshift-integration, scripts, token-exchange, docker, impersonation, openshift-integration, scripts, token-exchange,
web-authn, client-policies, ciba, map-storage, par, web-authn, client-policies, ciba, map-storage, par,
declarative-user-profile, dynamic-scopes, client-secret-rotation, declarative-user-profile, dynamic-scopes, client-secret-rotation,
step-up-authentication, recovery-codes, update-email, preview. step-up-authentication, recovery-codes, update-email, js-adapter, preview.
Hostname: Hostname:

View file

@ -77,14 +77,14 @@ Feature:
docker, impersonation, openshift-integration, scripts, token-exchange, docker, impersonation, openshift-integration, scripts, token-exchange,
web-authn, client-policies, ciba, map-storage, par, web-authn, client-policies, ciba, map-storage, par,
declarative-user-profile, dynamic-scopes, client-secret-rotation, declarative-user-profile, dynamic-scopes, client-secret-rotation,
step-up-authentication, recovery-codes, update-email, preview. step-up-authentication, recovery-codes, update-email, js-adapter, preview.
--features-disabled <feature> --features-disabled <feature>
Disables a set of one or more features. Possible values are: authorization, Disables a set of one or more features. Possible values are: authorization,
account2, account-api, admin-fine-grained-authz, admin-api, admin, admin2, account2, account-api, admin-fine-grained-authz, admin-api, admin, admin2,
docker, impersonation, openshift-integration, scripts, token-exchange, docker, impersonation, openshift-integration, scripts, token-exchange,
web-authn, client-policies, ciba, map-storage, par, web-authn, client-policies, ciba, map-storage, par,
declarative-user-profile, dynamic-scopes, client-secret-rotation, declarative-user-profile, dynamic-scopes, client-secret-rotation,
step-up-authentication, recovery-codes, update-email, preview. step-up-authentication, recovery-codes, update-email, js-adapter, preview.
Hostname: Hostname:

View file

@ -77,14 +77,14 @@ Feature:
impersonation, openshift-integration, scripts, token-exchange, web-authn, impersonation, openshift-integration, scripts, token-exchange, web-authn,
client-policies, ciba, map-storage, par, declarative-user-profile, client-policies, ciba, map-storage, par, declarative-user-profile,
dynamic-scopes, client-secret-rotation, step-up-authentication, dynamic-scopes, client-secret-rotation, step-up-authentication,
recovery-codes, update-email, preview. recovery-codes, update-email, js-adapter, preview.
--features-disabled <feature> --features-disabled <feature>
Disables a set of one or more features. Possible values are: authorization, Disables a set of one or more features. Possible values are: authorization,
account2, account-api, admin-fine-grained-authz, admin2, docker, account2, account-api, admin-fine-grained-authz, admin2, docker,
impersonation, openshift-integration, scripts, token-exchange, web-authn, impersonation, openshift-integration, scripts, token-exchange, web-authn,
client-policies, ciba, map-storage, par, declarative-user-profile, client-policies, ciba, map-storage, par, declarative-user-profile,
dynamic-scopes, client-secret-rotation, step-up-authentication, dynamic-scopes, client-secret-rotation, step-up-authentication,
recovery-codes, update-email, preview. recovery-codes, update-email, js-adapter, preview.
Hostname: Hostname:

View file

@ -138,14 +138,14 @@ Feature:
docker, impersonation, openshift-integration, scripts, token-exchange, docker, impersonation, openshift-integration, scripts, token-exchange,
web-authn, client-policies, ciba, map-storage, par, web-authn, client-policies, ciba, map-storage, par,
declarative-user-profile, dynamic-scopes, client-secret-rotation, declarative-user-profile, dynamic-scopes, client-secret-rotation,
step-up-authentication, recovery-codes, update-email, preview. step-up-authentication, recovery-codes, update-email, js-adapter, preview.
--features-disabled <feature> --features-disabled <feature>
Disables a set of one or more features. Possible values are: authorization, Disables a set of one or more features. Possible values are: authorization,
account2, account-api, admin-fine-grained-authz, admin-api, admin, admin2, account2, account-api, admin-fine-grained-authz, admin-api, admin, admin2,
docker, impersonation, openshift-integration, scripts, token-exchange, docker, impersonation, openshift-integration, scripts, token-exchange,
web-authn, client-policies, ciba, map-storage, par, web-authn, client-policies, ciba, map-storage, par,
declarative-user-profile, dynamic-scopes, client-secret-rotation, declarative-user-profile, dynamic-scopes, client-secret-rotation,
step-up-authentication, recovery-codes, update-email, preview. step-up-authentication, recovery-codes, update-email, js-adapter, preview.
Hostname: Hostname:

View file

@ -138,14 +138,14 @@ Feature:
docker, impersonation, openshift-integration, scripts, token-exchange, docker, impersonation, openshift-integration, scripts, token-exchange,
web-authn, client-policies, ciba, map-storage, par, web-authn, client-policies, ciba, map-storage, par,
declarative-user-profile, dynamic-scopes, client-secret-rotation, declarative-user-profile, dynamic-scopes, client-secret-rotation,
step-up-authentication, recovery-codes, update-email, preview. step-up-authentication, recovery-codes, update-email, js-adapter, preview.
--features-disabled <feature> --features-disabled <feature>
Disables a set of one or more features. Possible values are: authorization, Disables a set of one or more features. Possible values are: authorization,
account2, account-api, admin-fine-grained-authz, admin-api, admin, admin2, account2, account-api, admin-fine-grained-authz, admin-api, admin, admin2,
docker, impersonation, openshift-integration, scripts, token-exchange, docker, impersonation, openshift-integration, scripts, token-exchange,
web-authn, client-policies, ciba, map-storage, par, web-authn, client-policies, ciba, map-storage, par,
declarative-user-profile, dynamic-scopes, client-secret-rotation, declarative-user-profile, dynamic-scopes, client-secret-rotation,
step-up-authentication, recovery-codes, update-email, preview. step-up-authentication, recovery-codes, update-email, js-adapter, preview.
Hostname: Hostname:

View file

@ -105,7 +105,10 @@ public class KeycloakApplication extends Application {
singletons.add(new AdminRoot()); singletons.add(new AdminRoot());
} }
classes.add(ThemeResource.class); classes.add(ThemeResource.class);
classes.add(JsResource.class);
if (Profile.isFeatureEnabled(Profile.Feature.JS_ADAPTER)) {
classes.add(JsResource.class);
}
classes.add(KeycloakSecurityHeadersFilter.class); classes.add(KeycloakSecurityHeadersFilter.class);
classes.add(KeycloakErrorHandler.class); classes.add(KeycloakErrorHandler.class);