Hello Tony,
Thanks for the speedy response. I tried to export our custom realm, but the ‘JSON’ file
does not contain any users. Is there anyway to export a realm with users, so that I can
import it.
Best regards
[cid:image002.png@01D54070.1902B3E0]
Mathew George
Experiment Software ECTA
dSPACE GmbH
Rathenaustraße 26
33102 Paderborn
Tel.: +49 5251 1638-507
Fax: +49 5251 16198-0
Mail: mgeorge@dspace.de<mailto:mgeorge@dspace.de>
Web:
www.dspace.com<http://www.dspace.com>
We comply with our obligation to inform you about data protection according to Art. 13-14
of the GDPR by publishing said information on our website. Read our data protection
regulations
here<https://www.dspace.com/en/pub/home/privacypolicy.cfm>.
From: Tony Yip <tony.yip(a)shinetown.com.hk>
Sent: Monday, July 22, 2019 9:07 AM
To: Mathew George <mgeorge(a)dspace.de>
Cc: keycloak-user(a)lists.jboss.org
Subject: Re: [keycloak-user] Create users in the imported real using helm
Hi Mathew,
According to
e35e046<https://github.com/helm/charts/commit/e35e046cf78c89d800362dd9...
of
https://github.com/helm/charts/blob/master/stable/keycloak/templates/conf...,
the preStartScript is executed (line 20) before the realm is import (line 24). You may
import user with realm data.
Tony Yip
Frontend Developer
Shinetown Telecommunication Limited
https://shinetown.com.hk/
On 22 Jul 2019, at 2:40 PM, Mathew George
<mgeorge@dspace.de<mailto:mgeorge@dspace.de>> wrote:
Hello,
I am using keycloak helm charts for installing keycloak in our cluster and I am able to
import a custom realm as described in the documentation. Now I want to create some users
in this custom realm. I tried using the 'prestartScript'. See the contents of my
value.yaml
extraVolumes: |
- name: realm-secret
secret:
secretName: realm-secret
extraVolumeMounts: |
- name: realm-secret
mountPath: "/realm/"
readOnly: true
extraArgs: -Dkeycloak.import=/realm/realmData.json
preStartScript: |
/opt/jboss/keycloak/bin/kcadm.sh create users -r MyCustomRealm -s username=admin -s
enabled=true;/opt/jboss/keycloak/bin/kcadm.sh set-password -r MyCustomRealm --username
admin --new-password admin;
enabled: false
But this is not working. I also tried the following command in the
'preStartScript'. ( This is also not working)
/opt/jboss/keycloak/bin/add-user-keycloak.sh -r MyCustomRealm -u admin -p admin
Kindly provide inputs.
Best regards
[cid:image001.png@01D54069.121BC050]
Mathew George
Experiment Software ECTA
dSPACE GmbH
Rathenaustraße 26
33102 Paderborn
Tel.: +49 5251 1638-507
Fax: +49 5251 16198-0
Mail: mgeorge@dspace.de<mailto:mgeorge@dspace.de><mailto:mgeorge@dspace.de>
Web:
www.dspace.com<http://www.dspace.com><http://www.dspace.com>
We comply with our obligation to inform you about data protection according to Art. 13-14
of the GDPR by publishing said information on our website. Read our data protection
regulations
here<https://www.dspace.com/en/pub/home/privacypolicy.cfm>.
<image001.png>_______________________________________________
keycloak-user mailing list
keycloak-user@lists.jboss.org<mailto:keycloak-user@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/keycloak-user