Closed jessebot closed 11 months ago
oop, no it was my own issue escaping quotes for the json blob via a kubectl exec command.
I fixed it with the following in my python script:
oidc_json = dumps({
"custom_oidc": [{
"name": "ZITADEL",
"title": "ZITADEL",
"authorizeUrl": f"https://{zitadel_host}/oauth/v2/authorize",
"tokenUrl": f"https://{zitadel_host}/oauth/v2/token",
"userInfoUrl": f"https://{zitadel_host}/oauth/v2/userinfo",
"logoutUrl": "",
"clientId": client_id,
"clientSecret": client_secret,
"scope": "openid",
"groupsClaim": "groups",
"style": "zitadel",
"defaultGroup": "nextcloud_users"
}]
}).replace('"', '\\"')
then I was able to use that in a command like kubectl exec -n nextcloud nextcloud-pod -c nextcloud -- su -s /bin/bash www-data -c "php occ config:app:set sociallogin custom_providers --value='{oidc_json}'"
fed to subprocess.Popen
with args shell=True
and universal_newlines=True
which is painful but all is well :D
Good luck anyone else who attempts to use kubectl via python :)
Thanks for working on this app! I am excited to use it :)
I setup an OIDC app for nextcloud using zitadel's guide here and I wanted to write a little script to be able to configure the provider in the nextcloud social login app, so I tried the
occ
command listed in the README of this repo:Here's the inline json made a little easier to read:
When I check via the
occ
command suggested in the readme, I do indeed get back the correct info:I truncated the get response above, just so I didn't have to anonymize more data, but all the same info is returned as I put in, which is good, but when I check the web interface under administration settings > social login, I don't see anything and there's not no special buttons or anything new when I logout and check the login page.
Am I missing something? Are there additional commands I need to run to make nextcloud see the updates I made via the occ commands? Are there any other commands I can run to check into the status here?