[keycloak-user] Create users in the imported real using helm
Mathew George
mgeorge at dspace.de
Mon Jul 22 03:30:28 EDT 2019
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 at 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 at dspace.de<mailto:mgeorge at 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 at shinetown.com.hk>
Sent: Monday, July 22, 2019 9:07 AM
To: Mathew George <mgeorge at dspace.de>
Cc: keycloak-user at 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/e35e046cf78c89d800362dd97fbd761d2c892a70> of https://github.com/helm/charts/blob/master/stable/keycloak/templates/configmap.yaml, 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 at dspace.de<mailto:mgeorge at 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 at 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 at dspace.de<mailto:mgeorge at dspace.de><mailto:mgeorge at 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 at lists.jboss.org<mailto:keycloak-user at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/keycloak-user
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 3439 bytes
Desc: image002.png
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20190722/8bef1041/attachment.png
More information about the keycloak-user
mailing list