Skip to content

Commit f8d5ea4

Browse files
committed
Add the SKIP_SSO_FEATURE_INSTALL flag
1 parent 897ef0c commit f8d5ea4

File tree

11 files changed

+41
-15
lines changed

11 files changed

+41
-15
lines changed

README.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,19 @@ Refer to [Repository and proxy modifications](https://openliberty.io/docs/ref/co
7878

7979
## Enterprise Functionality
8080

81-
This section describes the optional enterprise functionality that can be enabled via the Dockerfile during `build` time, by setting particular build-arguments (`ARG`) and calling `RUN configure.sh`. Each of these options trigger the inclusion of specific configuration via XML snippets (except for `VERBOSE`), described below:
81+
This section describes the optional enterprise functionality that can be enabled via the Dockerfile during `build` time, by setting particular build-arguments (`ARG`) and calling `RUN configure.sh`. Each of these options trigger the inclusion/exclusion of specific configuration via XML snippets (except for `VERBOSE`), described below:
8282

83-
* `TLS` (`SSL` is deprecated)
84-
* Description: Enable Transport Security in Liberty by adding the `transportSecurity-1.0` feature (includes support for SSL).
85-
* XML Snippet Location: [keystore.xml](/releases/latest/kernel-slim/helpers/build/configuration_snippets/keystore.xml).
8683
* `HZ_SESSION_CACHE`
8784
* Description: Enable the persistence of HTTP sessions using JCache by adding the `sessionCache-1.0` feature.
8885
* XML Snippet Location: [hazelcast-sessioncache.xml](/releases/latest/kernel-slim/helpers/build/configuration_snippets/hazelcast-sessioncache.xml)
86+
* `SKIP_SSO_FEATURE_INSTALL`
87+
* Description: Disable the install of `appSecurity-2.0` and `socialLogin-1.0` when `SEC_SSO_PROVIDERS` is set. (see [SECURITY.md](/SECURITY.md) for usage.)
88+
* XML Snippet Location: [sso-features.xml](/releases/latest/kernel-slim/helpers/build/configuration_snippets/sso-features.xml)
89+
* `TLS` (`SSL` is deprecated)
90+
* Description: Enable Transport Security in Liberty by adding the `transportSecurity-1.0` feature (includes support for SSL).
91+
* XML Snippet Location: [keystore.xml](/releases/latest/kernel-slim/helpers/build/configuration_snippets/keystore.xml).
8992
* `VERBOSE`
90-
* Description: When set to `true` it outputs the commands and results to stdout from `configure.sh`. Otherwise, default setting is `false` and `configure.sh` is silenced.
93+
* Description: When set to `true` it outputs the commands and results to stdout from `features.sh` and `configure.sh`. Otherwise, default setting is `false` and `features.sh` and `configure.sh` are silenced.
9194

9295
### Deprecated Enterprise Functionality
9396

SECURITY.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,20 @@ The following variables configure container security for Single Sign-On using th
3838

3939
* Providers usually require the use of HTTPS. Specify `ARG TLS=true` in your Dockerfile.
4040

41-
* Your Dockerfile must call `RUN configure.sh` for these to take effect.
41+
* Your Dockerfile must call `RUN configure.sh` for these to take effect.
42+
43+
#### The `<feature>` and `appSecurity-2.0` configured features include an incompatible combination of features.
44+
45+
* When specifying the `SEC_SSO_PROVIDERS` ARG, you might get an incompatible set of features with `appSecurity-2.0` similar to the snippet below:
46+
47+
```
48+
CWWKF0044E: The persistence-3.1 and appSecurity-2.0 features cannot be loaded at the same time.
49+
The persistence-3.1 feature of Jakarta EE 10 is incompatible with the appSecurity-2.0 feature of Java EE 6.
50+
The persistence-3.1 and appSecurity-2.0 configured features include an incompatible combination of features.
51+
Your configuration is not supported. Update the configuration to use features that support either the Jakarta EE or Java EE programming models, but not both.
52+
```
53+
54+
* To avoid this error, set `ARG SKIP_SSO_FEATURE_INSTALL=true` in your Dockerfile.
4255

4356
### Configuration needed at image build time or at container deploy time:
4457

releases/22.0.0.12/full/helpers/build/configure.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ function main() {
8686
fi
8787

8888
if [[ -n "$SEC_SSO_PROVIDERS" ]]; then
89-
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
89+
if [[ "$SKIP_SSO_FEATURE_INSTALL" != "true" ]]; then
90+
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
91+
fi
9092
parseProviders $SEC_SSO_PROVIDERS
9193
fi
9294

releases/22.0.0.12/kernel-slim/helpers/build/features.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if [ -n "$INFINISPAN_SERVICE_NAME" ] || [ "${HZ_SESSION_CACHE}" == "client" ] ||
2020
fi
2121

2222
# SSO
23-
if [[ -n "$SEC_SSO_PROVIDERS" ]]; then
23+
if [[ -n "$SEC_SSO_PROVIDERS" ]] && [[ "$SKIP_SSO_FEATURE_INSTALL" != "true" ]]; then
2424
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
2525
fi
2626

releases/23.0.0.3/full/helpers/build/configure.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ function main() {
8686
fi
8787

8888
if [[ -n "$SEC_SSO_PROVIDERS" ]]; then
89-
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
89+
if [[ "$SKIP_SSO_FEATURE_INSTALL" != "true" ]]; then
90+
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
91+
fi
9092
parseProviders $SEC_SSO_PROVIDERS
9193
fi
9294

releases/23.0.0.3/kernel-slim/helpers/build/features.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if [ -n "$INFINISPAN_SERVICE_NAME" ] || [ "${HZ_SESSION_CACHE}" == "client" ] ||
2020
fi
2121

2222
# SSO
23-
if [[ -n "$SEC_SSO_PROVIDERS" ]]; then
23+
if [[ -n "$SEC_SSO_PROVIDERS" ]] && [[ "$SKIP_SSO_FEATURE_INSTALL" != "true" ]]; then
2424
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
2525
fi
2626

releases/23.0.0.5/full/helpers/build/configure.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ function main() {
8686
fi
8787

8888
if [[ -n "$SEC_SSO_PROVIDERS" ]]; then
89-
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
89+
if [[ "$SKIP_SSO_FEATURE_INSTALL" != "true" ]]; then
90+
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
91+
fi
9092
parseProviders $SEC_SSO_PROVIDERS
9193
fi
9294

releases/23.0.0.5/kernel-slim/helpers/build/features.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if [ -n "$INFINISPAN_SERVICE_NAME" ] || [ "${HZ_SESSION_CACHE}" == "client" ] ||
2020
fi
2121

2222
# SSO
23-
if [[ -n "$SEC_SSO_PROVIDERS" ]]; then
23+
if [[ -n "$SEC_SSO_PROVIDERS" ]] && [[ "$SKIP_SSO_FEATURE_INSTALL" != "true" ]]; then
2424
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
2525
fi
2626

releases/latest/beta/helpers/build/configure.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ function main() {
8686
fi
8787

8888
if [[ -n "$SEC_SSO_PROVIDERS" ]]; then
89-
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
89+
if [[ "$SKIP_SSO_FEATURE_INSTALL" != "true" ]]; then
90+
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
91+
fi
9092
parseProviders $SEC_SSO_PROVIDERS
9193
fi
9294

releases/latest/full/helpers/build/configure.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ function main() {
8686
fi
8787

8888
if [[ -n "$SEC_SSO_PROVIDERS" ]]; then
89-
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
89+
if [[ "$SKIP_SSO_FEATURE_INSTALL" != "true" ]]; then
90+
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
91+
fi
9092
parseProviders $SEC_SSO_PROVIDERS
9193
fi
9294

releases/latest/kernel-slim/helpers/build/features.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if [ -n "$INFINISPAN_SERVICE_NAME" ] || [ "${HZ_SESSION_CACHE}" == "client" ] ||
2020
fi
2121

2222
# SSO
23-
if [[ -n "$SEC_SSO_PROVIDERS" ]]; then
23+
if [[ -n "$SEC_SSO_PROVIDERS" ]] && [[ "$SKIP_SSO_FEATURE_INSTALL" != "true" ]]; then
2424
cp $SNIPPETS_SOURCE/sso-features.xml $SNIPPETS_TARGET_DEFAULTS
2525
fi
2626

0 commit comments

Comments
 (0)