Closed xiananfan closed 7 years ago
@xiananfan which folder are you running the command in?
/components
--/clients
--/resources
--...
You should be running it in the folder that contains the clients
folder or you can specify the working directory via cli argument.
Hi @ukayani , thank you for looking into it. Yes, I was running the cli in the components folder. When I try to deploy connections and rules, it was working fine. But somehow, the clients don't want to work.
@xiananfan what error are you seeing for the clients?
The same one ? Path must be a string?
Are you able to post the content of a config.json ? for clients?
Perhaps try to do a single deployment first to debug the issue.
so auth0-deploy client <clientName> ...
see if you get the same error
Hi @ukayani, I just tried
xf186001@MUSXF186001-209:~/workplace/bamboo-config/components » auth0-deploy client Default\ App -c {client-id} -s {client-secret} -d bamboo.auth0.com
Path must be a string. Received undefined
It seems it is returning the same error.
Hi @xiananfan, could you please provide the config.json and grants.json for the client which is causing the problem?
I would like to reproduce the problem on my end so i can see what it is.
Also, are you running on windows or a mac/linux environment?
Hi @ukayani, the config.json for the "Default App" looks like the following:
{
"allowed_clients": null,
"allowed_logout_urls": null,
"allowed_origins": null,
"callback_url_template": false,
"callbacks": null,
"client_id": "xbdof-iI9cCpXmt_0pP6PbBa6zzhQSI1",
"config_route": null,
"custom_login_page_on": false,
"global": false,
"grant_types": [
"implicit",
"authorization_code",
"client_credentials",
"refresh_token"
],
"is_first_party": true,
"jwt_configuration": {
"lifetime_in_seconds": "36000",
"secret_encoded": false
},
"name": "Default App",
"tenant": "bamboo"
}
This is executed on a mac environment.
Also, it seems @bebbi has submitted a merge request to fix the issue above.
Hi @xiananfan ,
I've merged @bebbi 's changes and released a new version 0.1.16, can you update your version and try again? Let me know if his change fixes your problem, otherwise we can continue to debug it.
@bebbi Thanks for the fix.
Cheers
Hi @ukayani,
Thanks for the fast release. I have done a quick test, and the old error no longer shows up.
xf186001@MUSXF186001-209:~/workplace/bamboo-config/components » auth0-deploy client Default\ App -c {client_id} -s {client_secret} -d bamboo.auth0.com 1 ↵
Updating client: Default App
Payload validation error: 'Additional properties not allowed: tenant,global,config_route,client_id,callback_url_template'.
xf186001@MUSXF186001-209:~/workplace/bamboo-config/components » auth0-deploy client Default\ App -c {client_id} -s {client_secret} -d bamboo.auth0.com 1 ↵
Updating client: Default App
Payload validation error: 'Expected type array but found type null' on property callbacks (A set of URLs that are valid to call back from Auth0 when authenticating users). (also) Payload validation error: 'Expected type array but found type null' on property allowed_origins (A set of URLs that represents valid origins for CORS). (also) Payload validation error: 'Expected type array but found type null' on property allowed_logout_urls (A set of URLs that are valid to redirect to after logout from Auth0). (also) Payload validation error: 'Expected type array but found type null' on property allowed_clients (Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients). (also) Payload validation error: 'Additional properties not allowed: secret_encoded' on property jwt_configuration (An object that holds settings related to how JWTs are created).
I first removed the "tenant,global,config_route,client_id,callback_url_template" fields from the config.json. Then I encounter the validation error above.
So it seems the tool is complaining the missing fields "callbacks", "allowed_origins", "allowed_logout_urls", "allowed_clients". Add additional field inside the "jwt_configuration" object.
I could provide the above fields in a real client. However, if you notice, I was trying to update the "Default App" client, which was there by default when you create a new tenant in auth0. I was wondering if you could consider allowing the value to not be there as well. Because the value is a direct dump from the management api v2. In other words, missing the value should be valid, and not encounter a validation error.
I understand the above is a different request. So feel free to consider this issue as resolved.
Thank you again for looking into this!
Hi @xiananfan
Thanks for testing it out. Could you please create a new issue for this error and include your config.json?
I'll try to address it in a separate issue. Thanks
I am trying to deploy the clients configurations. Followed the basic setup to setup the repository:
With the above folder structure, when use the following command:
I got the following message: