Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

add ProvisioningTicketUrl to Connection #201

Merged

Conversation

seiro-ogasawara
Copy link

Proposed Changes

  • Add ProvisioningTicketUrl to property of management.Connection.

This item is not listed in the API documentation, but it is issued in some strategies such as "ad".

{
  "id":"con_xxxx",
  "options":{
    "certAuth":false,
    "disable_cache":false,
    "kerberos":false,
    "domain_aliases":[
      "idp-domain.com"
    ],
    "tenant_domain":"xyz-domain.com",
    "ips":null,
    "brute_force_protection":true
  },
  "strategy":"ad",
  "name":"xyz-test-ad-conn",
  "provisioning_ticket_url":"https://xyz-dev.us.auth0.com/p/ad/xxxx",
  "is_domain_connection":false,
  "show_as_button":false,
  "display_name":"Xyz-Test-Ad-Conn",
  "enabled_clients":[],
  "realms":[
    "xyz-test-ad-conn"
  ]
}

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

@yvovandoorn
Copy link
Contributor

Hi @seiro-ogasawara! Thank you so much for your contribution.

The use around "provisioning_ticket_url" is a bit special. The attribute is generated and managed on the Auth0 server side. The management API definitely doesn't like it when its part of the payload.

What would really help here is to write a test that validates the AD connection strategy (see https://github.com/go-auth0/auth0/blob/master/management/connection_test.go) given its a one off and only really used with AD connections. The test would then create, update and delete the object. This validates that as long as the provisioning_ticket_url isn't touched nor updated, that changes will work.

@seiro-ogasawara seiro-ogasawara force-pushed the work/add_provisioning_ticket_url branch from f9eda07 to b02292d Compare March 24, 2021 04:10
@seiro-ogasawara
Copy link
Author

Thanks for reviewing @yvovandoorn !

I've added a test, how do you think?
I've also rebase and push -f to resolve conflicts with the latest code, so the commit hash has changed, but I hope you don't mind.

@yvovandoorn
Copy link
Contributor

Hey @seiro-ogasawara! That is a rad test 👍.

Not only did you improve the test coverage, I like the update without and with the value.

Merging!

@yvovandoorn yvovandoorn merged commit 5b4d7c6 into go-auth0:master Mar 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants