Skip to content

Commit e192773

Browse files
authored
[#1007] Fix setup error "embedded config"+"external user store": missing schema attribute type (#1012)
1 parent 56cfc07 commit e192773

8 files changed

Lines changed: 67 additions & 18 deletions

File tree

.github/workflows/build.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,62 @@ jobs:
102102
tags: ${{ steps.meta.outputs.tags }}
103103
labels: ${{ steps.meta.outputs.labels }}
104104

105+
- name: Docker test with an external OpenDJ identity store and an embedded OpenDJ configuration store
106+
shell: bash
107+
run: |
108+
docker network create test-openam
109+
docker run --rm -it -d --hostname opendj -p 1389:1389 -p 4444:4444 --name test-opendj --network test-openam openidentityplatform/opendj:latest
110+
docker run --rm -it -d --memory="2g" -h openam.example.org --name=test-openam --network test-openam localhost:5000/${GITHUB_REPOSITORY,,}:${{ env.release_version }}
111+
112+
echo "waiting for OpenDJ to be alive..."
113+
timeout 3m bash -c 'until docker inspect --format="{{json .State.Health.Status}}" test-opendj | grep -q \"healthy\"; do sleep 10; done'
114+
echo "waiting for OpenAM to be alive..."
115+
timeout 3m bash -c 'until docker inspect --format="{{json .State.Health.Status}}" test-openam | grep -q \"healthy\"; do sleep 10; done'
116+
117+
docker exec -w '/usr/openam/ssoconfiguratortools' test-openam bash -c \
118+
'echo "ACCEPT_LICENSES=true
119+
SERVER_URL=http://openam.example.org:8080
120+
DEPLOYMENT_URI=/$OPENAM_PATH
121+
BASE_DIR=$OPENAM_DATA_DIR
122+
locale=en_US
123+
PLATFORM_LOCALE=en_US
124+
AM_ENC_KEY=
125+
ADMIN_PWD=ampassword
126+
AMLDAPUSERPASSWD=password
127+
COOKIE_DOMAIN=example.org
128+
DATA_STORE=embedded
129+
DIRECTORY_SSL=SIMPLE
130+
DIRECTORY_SERVER=localhost
131+
DIRECTORY_PORT=1389
132+
DIRECTORY_ADMIN_PORT=5444
133+
DIRECTORY_JMX_PORT=1689
134+
ROOT_SUFFIX=dc=openam,dc=openidentityplatform,dc=org
135+
DS_DIRMGRDN=cn=Directory Manager
136+
DS_DIRMGRPASSWD=password
137+
USERSTORE_TYPE=LDAPv3ForOpenDS
138+
USERSTORE_SSL=SIMPLE
139+
USERSTORE_HOST=opendj
140+
USERSTORE_PORT=1389
141+
USERSTORE_SUFFIX=dc=example,dc=com
142+
USERSTORE_MGRDN=cn=Directory Manager
143+
USERSTORE_PASSWD=password
144+
" > conf.file && java -jar openam-configurator-tool*.jar --file conf.file'
145+
146+
docker exec test-openam bash -c \
147+
'curl \
148+
--request POST \
149+
--header "Content-Type: application/json" \
150+
--header "X-OpenAM-Username: amadmin" \
151+
--header "X-OpenAM-Password: ampassword" \
152+
--data "{}" \
153+
http://openam.example.org:8080/openam/json/authenticate | grep tokenId'
154+
155+
docker inspect --format="{{json .State.Health.Status}}" test-openam | grep -q \"healthy\"
156+
157+
echo "Stopping containers and removing the network"
158+
docker stop test-opendj test-openam
159+
docker network rm test-openam
160+
105161
- name: Docker test with a dedicated OpenDJ container
106162
shell: bash
107163
run: |

openam-core/src/main/java/com/sun/identity/setup/UserIdRepo.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ private void loadSchema(
282282
SetupProgress.reportStart("emb.loadingschema", params);
283283
LdifUtils.createSchemaFromLDIF(file, conn);
284284
SetupProgress.reportEnd("emb.success", null);
285-
286285
File f = new File(file);
287286
f.delete();
288287
}

openam-server-only/src/main/resources/config/schemaNames.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@
2525
# $Id: schemaNames.properties,v 1.14 2009/10/27 05:30:41 hengming Exp $
2626
#
2727
# Portions Copyrighted 2013-2016 ForgeRock AS.
28-
# Portions Copyrighted 2025 3A Systems LLC.
28+
# Portions Copyrighted 2025-2026 3A Systems LLC.
2929
#
3030
## OpenDJ external SMS/Configuration Datastore Schema.
3131
dsSmsSchema=/WEB-INF/template/ldif/opendj/opendj_config_schema.ldif \
32+
/WEB-INF/template/ldif/opendj/opendj_config_index.ldif \
3233
/WEB-INF/template/ldif/sfha/cts-container.ldif \
3334
/WEB-INF/template/ldif/sfha/cts-add-schema.ldif \
3435
/WEB-INF/template/ldif/sfha/cts-add-multivalue.ldif \
@@ -79,6 +80,7 @@ tivoliUserSchema=/WEB-INF/template/ldif/tivoli/tivoli_user_schema.ldif \
7980

8081
## OpenDJ User Management and SMS/Configuration Datastore Schema. Currently only used by embedded
8182
opendsSmsSchema=/WEB-INF/template/ldif/opendj/opendj_config_schema.ldif \
83+
/WEB-INF/template/ldif/opendj/opendj_config_index.ldif \
8284
/WEB-INF/template/ldif/opendj/opendj_user_schema.ldif \
8385
/WEB-INF/template/ldif/opendj/opendj_embinit.ldif \
8486
/WEB-INF/template/ldif/opendj/opendj_user_index.ldif \

openam-server-only/src/main/webapp/WEB-INF/template/ldif/odsee/odsee_user_index.ldif

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@ nsSystemIndex: false
2929
cn: iplanet-am-modifiable-by
3030
nsIndexType: eq
3131

32-
dn: cn=sunxmlkeyvalue,cn=index,cn=@DB_NAME@,cn=ldbm database,cn=plugins,cn=config
33-
objectClass: top
34-
objectClass: nsIndex
35-
nsSystemIndex: false
36-
cn: sunxmlkeyvalue
37-
nsIndexType: eq
38-
nsIndexType: sub
39-
4032
dn: cn=@ORG_NAMING_ATTR@,cn=index,cn=@DB_NAME@,cn=ldbm database,cn=plugins,cn=config
4133
objectClass: top
4234
objectClass: nsIndex

openam-server-only/src/main/webapp/WEB-INF/template/ldif/odsee/odsee_user_schema.ldif

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ attributeTypes: ( 1.3.6.1.4.1.42.2.27.9.1.844 NAME 'sunIdentityServerDeviceType'
5252
attributeTypes: ( 1.3.6.1.4.1.42.2.27.9.1.845 NAME 'sunIdentityServerDeviceKeyValue' DESC 'Device Key Value Pair' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Sun Java System Identity Management' )
5353
attributeTypes: ( 1.3.6.1.4.1.42.2.27.9.1.846 NAME 'sunIdentityServerDeviceStatus' DESC 'Device Status' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE X-ORIGIN 'Sun Java System Identity Management' )
5454
attributeTypes: ( 1.3.6.1.4.1.42.2.27.9.1.847 NAME 'sunIdentityServerSupportedTypes' DESC 'Container Supported Types' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Sun Java System Identity Management' )
55-
attributeTypes: ( 1.3.6.1.4.1.42.2.27.9.1.84 NAME ( 'sunxmlkeyvalue' ) DESC 'Attribute to store the key values in xml format' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Sun Java System Identity Management' )
5655
attributeTypes: ( 1.3.6.1.4.1.42.2.27.9.1.73 NAME 'iplanet-am-user-federation-info-key' DESC 'User Federation Information Key' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Sun Java System Identity Management' )
5756
attributeTypes: ( 1.3.6.1.4.1.42.2.27.9.1.74 NAME 'iplanet-am-user-federation-info' DESC 'User Federation Information' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Sun Java System Identity Management' )
5857
attributeTypes: ( 1.3.6.1.4.1.42.2.27.9.1.821 NAME 'sunIdentityServerDiscoEntries' DESC 'User DiscoEntries' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'Sun Java System Identity Management' )
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dn: ds-cfg-attribute=sunxmlkeyvalue,cn=Index,ds-cfg-backend-id=@DB_NAME@,cn=Backends,cn=config
2+
objectClass: top
3+
objectClass: ds-cfg-backend-index
4+
ds-cfg-attribute: sunxmlkeyvalue
5+
ds-cfg-index-type: equality
6+
ds-cfg-index-type: substring
7+

openam-server-only/src/main/webapp/WEB-INF/template/ldif/opendj/opendj_user_index.ldif

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
dn: ds-cfg-attribute=sunxmlkeyvalue,cn=Index,ds-cfg-backend-id=@DB_NAME@,cn=Backends,cn=config
2-
objectClass: top
3-
objectClass: ds-cfg-backend-index
4-
ds-cfg-attribute: sunxmlkeyvalue
5-
ds-cfg-index-type: equality
6-
ds-cfg-index-type: substring
7-
81
dn: ds-cfg-attribute=memberof,cn=Index,ds-cfg-backend-id=@DB_NAME@,cn=Backends,cn=config
92
objectClass: top
103
objectClass: ds-cfg-backend-index

openam-server-only/src/main/webapp/WEB-INF/template/ldif/opendj/opendj_user_schema.ldif

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
## $Id: opends_user_schema.ldif,v 1.3 2009/11/13 00:16:03 qcheng Exp $
2626
##
2727
## Portions Copyrighted 2013-2015 ForgeRock AS.
28+
## Portions Copyrighted 2026 3A Systems LLC.
2829
##
2930

3031
dn: cn=schema

0 commit comments

Comments
 (0)