Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PATCH: Rename user_id_attribute to userid_attribute in Azure Connection Options #454

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion management/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ type ConnectionOptionsAzureAD struct {
CertRolloverNotification *string `json:"cert_rollover_notification,omitempty"`
Granted *bool `json:"granted,omitempty"`
TenantID *string `json:"tenantId,omitempty"`
UserIDAttribute *string `json:"user_id_attribute,omitempty"`
UserIDAttribute *string `json:"userid_attribute,omitempty"`
}

// Scopes returns the scopes for ConnectionOptionsAzureAD.
Expand Down
2 changes: 1 addition & 1 deletion management/connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ ZsUkLw2I7zI/dNlWdB8Xp7v+3w9sX5N3J/WuJ1KOO5m26kRlHQo7EzT3974g
TenantDomain: auth0.String("example.onmicrosoft.com"),
ClientID: auth0.String("123456"),
ClientSecret: auth0.String("123456"),
UserIDAttribute: auth0.String("userName"),
UserIDAttribute: auth0.String("sub"),
UpstreamParams: map[string]interface{}{
"screen_name": map[string]interface{}{
"alias": "login_hint",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ interactions:
remote_addr: ""
request_uri: ""
body: |
{"name":"Test-ADFS-Connection-1726765770","strategy":"adfs","options":{"strategy_version":2,"fedMetadataXml":"\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cEntityDescriptor entityID=\"https://example.com\"\n xmlns=\"urn:oasis:names:tc:SAML:2.0:metadata\"\u003e\n \u003cRoleDescriptor xsi:type=\"fed:ApplicationServiceType\"\n protocolSupportEnumeration=\"http://docs.oasis-open.org/wsfed/federation/200706\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xmlns:fed=\"http://docs.oasis-open.org/wsfed/federation/200706\"\u003e\n \u003cfed:TargetScopes\u003e\n \u003cwsa:EndpointReference xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"\u003e\n \u003cwsa:Address\u003ehttps://adfs.provider/\u003c/wsa:Address\u003e\n \u003c/wsa:EndpointReference\u003e\n \u003c/fed:TargetScopes\u003e\n \u003cfed:ApplicationServiceEndpoint\u003e\n \u003cwsa:EndpointReference xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"\u003e\n \u003cwsa:Address\u003ehttps://adfs.provider/wsfed\u003c/wsa:Address\u003e\n \u003c/wsa:EndpointReference\u003e\n \u003c/fed:ApplicationServiceEndpoint\u003e\n \u003cfed:PassiveRequestorEndpoint\u003e\n \u003cwsa:EndpointReference xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"\u003e\n \u003cwsa:Address\u003ehttps://adfs.provider/wsfed\u003c/wsa:Address\u003e\n \u003c/wsa:EndpointReference\u003e\n \u003c/fed:PassiveRequestorEndpoint\u003e\n \u003c/RoleDescriptor\u003e\n \u003cIDPSSODescriptor protocolSupportEnumeration=\"urn:oasis:names:tc:SAML:2.0:protocol\"\u003e\n \u003cSingleLogoutService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\"\n Location=\"https://adfs.provider/sign_out\"/\u003e\n \u003cSingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\"\n Location=\"https://adfs.provider/sign_in\"/\u003e\n \u003c/IDPSSODescriptor\u003e\n\u003c/EntityDescriptor\u003e\n","upstream_params":{"screen_name":{"alias":"login_hint"}}}}
{"name":"Test-ADFS-Connection-1728906681","strategy":"adfs","options":{"strategy_version":2,"fedMetadataXml":"\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cEntityDescriptor entityID=\"https://example.com\"\n xmlns=\"urn:oasis:names:tc:SAML:2.0:metadata\"\u003e\n \u003cRoleDescriptor xsi:type=\"fed:ApplicationServiceType\"\n protocolSupportEnumeration=\"http://docs.oasis-open.org/wsfed/federation/200706\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xmlns:fed=\"http://docs.oasis-open.org/wsfed/federation/200706\"\u003e\n \u003cfed:TargetScopes\u003e\n \u003cwsa:EndpointReference xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"\u003e\n \u003cwsa:Address\u003ehttps://adfs.provider/\u003c/wsa:Address\u003e\n \u003c/wsa:EndpointReference\u003e\n \u003c/fed:TargetScopes\u003e\n \u003cfed:ApplicationServiceEndpoint\u003e\n \u003cwsa:EndpointReference xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"\u003e\n \u003cwsa:Address\u003ehttps://adfs.provider/wsfed\u003c/wsa:Address\u003e\n \u003c/wsa:EndpointReference\u003e\n \u003c/fed:ApplicationServiceEndpoint\u003e\n \u003cfed:PassiveRequestorEndpoint\u003e\n \u003cwsa:EndpointReference xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"\u003e\n \u003cwsa:Address\u003ehttps://adfs.provider/wsfed\u003c/wsa:Address\u003e\n \u003c/wsa:EndpointReference\u003e\n \u003c/fed:PassiveRequestorEndpoint\u003e\n \u003c/RoleDescriptor\u003e\n \u003cIDPSSODescriptor protocolSupportEnumeration=\"urn:oasis:names:tc:SAML:2.0:protocol\"\u003e\n \u003cSingleLogoutService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\"\n Location=\"https://adfs.provider/sign_out\"/\u003e\n \u003cSingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\"\n Location=\"https://adfs.provider/sign_in\"/\u003e\n \u003c/IDPSSODescriptor\u003e\n\u003c/EntityDescriptor\u003e\n","upstream_params":{"screen_name":{"alias":"login_hint"}}}}
form: {}
headers:
Content-Type:
- application/json
User-Agent:
- Go-Auth0/1.10.0
- Go-Auth0/1.11.1
url: https://go-auth0-dev.eu.auth0.com/api/v2/connections
method: POST
response:
Expand All @@ -30,13 +30,13 @@ interactions:
trailer: {}
content_length: -1
uncompressed: false
body: '{"id":"con_Y7LemdCR6UEa0qGA","options":{"strategy_version":2,"fedMetadataXml":"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<EntityDescriptor entityID=\"https://example.com\"\n xmlns=\"urn:oasis:names:tc:SAML:2.0:metadata\">\n <RoleDescriptor xsi:type=\"fed:ApplicationServiceType\"\n protocolSupportEnumeration=\"http://docs.oasis-open.org/wsfed/federation/200706\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xmlns:fed=\"http://docs.oasis-open.org/wsfed/federation/200706\">\n <fed:TargetScopes>\n <wsa:EndpointReference xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">\n <wsa:Address>https://adfs.provider/</wsa:Address>\n </wsa:EndpointReference>\n </fed:TargetScopes>\n <fed:ApplicationServiceEndpoint>\n <wsa:EndpointReference xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">\n <wsa:Address>https://adfs.provider/wsfed</wsa:Address>\n </wsa:EndpointReference>\n </fed:ApplicationServiceEndpoint>\n <fed:PassiveRequestorEndpoint>\n <wsa:EndpointReference xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">\n <wsa:Address>https://adfs.provider/wsfed</wsa:Address>\n </wsa:EndpointReference>\n </fed:PassiveRequestorEndpoint>\n </RoleDescriptor>\n <IDPSSODescriptor protocolSupportEnumeration=\"urn:oasis:names:tc:SAML:2.0:protocol\">\n <SingleLogoutService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\"\n Location=\"https://adfs.provider/sign_out\"/>\n <SingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\"\n Location=\"https://adfs.provider/sign_in\"/>\n </IDPSSODescriptor>\n</EntityDescriptor>\n","upstream_params":{"screen_name":{"alias":"login_hint"}},"thumbprints":[],"signInEndpoint":"https://adfs.provider/wsfed","should_trust_email_verified_connection":"always_set_emails_as_verified"},"strategy":"adfs","name":"Test-ADFS-Connection-1726765770","provisioning_ticket_url":"https://go-auth0-dev.eu.auth0.com.eu.auth0.com/p/adfs/L5ofK2fE","is_domain_connection":false,"show_as_button":false,"enabled_clients":[],"realms":["Test-ADFS-Connection-1726765770"]}'
body: '{"id":"con_LFvweCYgtrzPcPp4","options":{"strategy_version":2,"fedMetadataXml":"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<EntityDescriptor entityID=\"https://example.com\"\n xmlns=\"urn:oasis:names:tc:SAML:2.0:metadata\">\n <RoleDescriptor xsi:type=\"fed:ApplicationServiceType\"\n protocolSupportEnumeration=\"http://docs.oasis-open.org/wsfed/federation/200706\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xmlns:fed=\"http://docs.oasis-open.org/wsfed/federation/200706\">\n <fed:TargetScopes>\n <wsa:EndpointReference xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">\n <wsa:Address>https://adfs.provider/</wsa:Address>\n </wsa:EndpointReference>\n </fed:TargetScopes>\n <fed:ApplicationServiceEndpoint>\n <wsa:EndpointReference xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">\n <wsa:Address>https://adfs.provider/wsfed</wsa:Address>\n </wsa:EndpointReference>\n </fed:ApplicationServiceEndpoint>\n <fed:PassiveRequestorEndpoint>\n <wsa:EndpointReference xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">\n <wsa:Address>https://adfs.provider/wsfed</wsa:Address>\n </wsa:EndpointReference>\n </fed:PassiveRequestorEndpoint>\n </RoleDescriptor>\n <IDPSSODescriptor protocolSupportEnumeration=\"urn:oasis:names:tc:SAML:2.0:protocol\">\n <SingleLogoutService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\"\n Location=\"https://adfs.provider/sign_out\"/>\n <SingleSignOnService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect\"\n Location=\"https://adfs.provider/sign_in\"/>\n </IDPSSODescriptor>\n</EntityDescriptor>\n","upstream_params":{"screen_name":{"alias":"login_hint"}},"thumbprints":[],"signInEndpoint":"https://adfs.provider/wsfed","should_trust_email_verified_connection":"always_set_emails_as_verified"},"strategy":"adfs","name":"Test-ADFS-Connection-1728906681","provisioning_ticket_url":"https://go-auth0-dev.eu.auth0.com.sus.auth0.com/p/adfs/LVo8FOKN","is_domain_connection":false,"show_as_button":false,"enabled_clients":[],"realms":["Test-ADFS-Connection-1728906681"]}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 201 Created
code: 201
duration: 177.838916ms
duration: 379.363709ms
- id: 1
request:
proto: HTTP/1.1
Expand All @@ -54,8 +54,8 @@ interactions:
Content-Type:
- application/json
User-Agent:
- Go-Auth0/1.10.0
url: https://go-auth0-dev.eu.auth0.com/api/v2/connections/con_Y7LemdCR6UEa0qGA
- Go-Auth0/1.11.1
url: https://go-auth0-dev.eu.auth0.com/api/v2/connections/con_LFvweCYgtrzPcPp4
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -65,10 +65,10 @@ interactions:
trailer: {}
content_length: 41
uncompressed: false
body: '{"deleted_at":"2024-09-19T17:09:40.572Z"}'
body: '{"deleted_at":"2024-10-14T11:51:30.601Z"}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 202 Accepted
code: 202
duration: 175.825958ms
duration: 344.58525ms
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ interactions:
remote_addr: ""
request_uri: ""
body: |
{"name":"Test-AD-Connection-1726765770","strategy":"ad","options":{"strategy_version":2,"upstream_params":{"screen_name":{"alias":"login_hint"}}}}
{"name":"Test-AD-Connection-1728906681","strategy":"ad","options":{"strategy_version":2,"upstream_params":{"screen_name":{"alias":"login_hint"}}}}
form: {}
headers:
Content-Type:
- application/json
User-Agent:
- Go-Auth0/1.10.0
- Go-Auth0/1.11.1
url: https://go-auth0-dev.eu.auth0.com/api/v2/connections
method: POST
response:
Expand All @@ -28,15 +28,15 @@ interactions:
proto_minor: 0
transfer_encoding: []
trailer: {}
content_length: 428
content_length: 463
uncompressed: false
body: '{"id":"con_XCw6yNNo2liNyEYU","options":{"strategy_version":2,"upstream_params":{"screen_name":{"alias":"login_hint"}},"ips":null,"brute_force_protection":true},"strategy":"ad","name":"Test-AD-Connection-1726765770","provisioning_ticket_url":"https://go-auth0-dev.eu.auth0.com.eu.auth0.com/p/ad/Eb8B4R7OrRTL0jYHFrtWoUBq8X1JNE8s","is_domain_connection":false,"show_as_button":false,"enabled_clients":[],"realms":["Test-AD-Connection-1726765770"]}'
body: '{"id":"con_F34anPWfXO5CNPmZ","options":{"strategy_version":2,"upstream_params":{"screen_name":{"alias":"login_hint"}},"ips":null,"brute_force_protection":true},"strategy":"ad","name":"Test-AD-Connection-1728906681","provisioning_ticket_url":"https://go-auth0-dev.eu.auth0.com.sus.auth0.com/p/ad/aFFXlEJXJw7bBK6mJBs6QnPCaxo1aKX3","is_domain_connection":false,"show_as_button":false,"enabled_clients":[],"realms":["Test-AD-Connection-1728906681"]}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 201 Created
code: 201
duration: 187.741875ms
duration: 337.064959ms
- id: 1
request:
proto: HTTP/1.1
Expand All @@ -54,8 +54,8 @@ interactions:
Content-Type:
- application/json
User-Agent:
- Go-Auth0/1.10.0
url: https://go-auth0-dev.eu.auth0.com/api/v2/connections/con_XCw6yNNo2liNyEYU
- Go-Auth0/1.11.1
url: https://go-auth0-dev.eu.auth0.com/api/v2/connections/con_F34anPWfXO5CNPmZ
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -65,10 +65,10 @@ interactions:
trailer: {}
content_length: 41
uncompressed: false
body: '{"deleted_at":"2024-09-19T17:09:40.222Z"}'
body: '{"deleted_at":"2024-10-14T11:51:29.875Z"}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 202 Accepted
code: 202
duration: 172.200125ms
duration: 341.941125ms
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ interactions:
remote_addr: ""
request_uri: ""
body: |
{"name":"Test-Apple-Connection-1726765770","strategy":"apple","options":{"upstream_params":{"screen_name":{"alias":"login_hint"}}}}
{"name":"Test-Apple-Connection-1728906681","strategy":"apple","options":{"upstream_params":{"screen_name":{"alias":"login_hint"}}}}
form: {}
headers:
Content-Type:
- application/json
User-Agent:
- Go-Auth0/1.10.0
- Go-Auth0/1.11.1
url: https://go-auth0-dev.eu.auth0.com/api/v2/connections
method: POST
response:
Expand All @@ -30,13 +30,13 @@ interactions:
trailer: {}
content_length: 255
uncompressed: false
body: '{"id":"con_KAhLtRNvDbAcZMBj","options":{"upstream_params":{"screen_name":{"alias":"login_hint"}}},"strategy":"apple","name":"Test-Apple-Connection-1726765770","is_domain_connection":false,"enabled_clients":[],"realms":["Test-Apple-Connection-1726765770"]}'
body: '{"id":"con_2ITIN7SNn6faanLE","options":{"upstream_params":{"screen_name":{"alias":"login_hint"}}},"strategy":"apple","name":"Test-Apple-Connection-1728906681","is_domain_connection":false,"enabled_clients":[],"realms":["Test-Apple-Connection-1728906681"]}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 201 Created
code: 201
duration: 163.526125ms
duration: 357.324458ms
- id: 1
request:
proto: HTTP/1.1
Expand All @@ -54,8 +54,8 @@ interactions:
Content-Type:
- application/json
User-Agent:
- Go-Auth0/1.10.0
url: https://go-auth0-dev.eu.auth0.com/api/v2/connections/con_KAhLtRNvDbAcZMBj
- Go-Auth0/1.11.1
url: https://go-auth0-dev.eu.auth0.com/api/v2/connections/con_2ITIN7SNn6faanLE
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -65,10 +65,10 @@ interactions:
trailer: {}
content_length: 41
uncompressed: false
body: '{"deleted_at":"2024-09-19T17:09:41.293Z"}'
body: '{"deleted_at":"2024-10-14T11:51:32.020Z"}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 202 Accepted
code: 202
duration: 207.708875ms
duration: 336.21075ms
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ interactions:
remote_addr: ""
request_uri: ""
body: |
{"name":"Test-Auth0-Connection-1726765770","strategy":"auth0","options":{"strategy_version":2,"upstream_params":{"screen_name":{"alias":"login_hint"}}}}
{"name":"Test-Auth0-Connection-1728906681","strategy":"auth0","options":{"strategy_version":2,"upstream_params":{"screen_name":{"alias":"login_hint"}}}}
form: {}
headers:
Content-Type:
- application/json
User-Agent:
- Go-Auth0/1.10.0
- Go-Auth0/1.11.1
url: https://go-auth0-dev.eu.auth0.com/api/v2/connections
method: POST
response:
Expand All @@ -30,13 +30,13 @@ interactions:
trailer: {}
content_length: 577
uncompressed: false
body: '{"id":"con_zMu8RDPcczLUT7LZ","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"upstream_params":{"screen_name":{"alias":"login_hint"}},"authentication_methods":{"password":{"enabled":true},"passkey":{"enabled":false}},"passkey_options":{"challenge_ui":"both","progressive_enrollment_enabled":true,"local_enrollment_enabled":true},"brute_force_protection":true},"strategy":"auth0","name":"Test-Auth0-Connection-1726765770","is_domain_connection":false,"enabled_clients":[],"realms":["Test-Auth0-Connection-1726765770"]}'
body: '{"id":"con_MHqnj8Ynmkvn4DNu","options":{"mfa":{"active":true,"return_enroll_settings":true},"passwordPolicy":"good","strategy_version":2,"upstream_params":{"screen_name":{"alias":"login_hint"}},"authentication_methods":{"password":{"enabled":true},"passkey":{"enabled":false}},"passkey_options":{"challenge_ui":"both","progressive_enrollment_enabled":true,"local_enrollment_enabled":true},"brute_force_protection":true},"strategy":"auth0","name":"Test-Auth0-Connection-1728906681","is_domain_connection":false,"enabled_clients":[],"realms":["Test-Auth0-Connection-1728906681"]}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 201 Created
code: 201
duration: 527.935709ms
duration: 1.157468708s
- id: 1
request:
proto: HTTP/1.1
Expand All @@ -54,8 +54,8 @@ interactions:
Content-Type:
- application/json
User-Agent:
- Go-Auth0/1.10.0
url: https://go-auth0-dev.eu.auth0.com/api/v2/connections/con_zMu8RDPcczLUT7LZ
- Go-Auth0/1.11.1
url: https://go-auth0-dev.eu.auth0.com/api/v2/connections/con_MHqnj8Ynmkvn4DNu
method: DELETE
response:
proto: HTTP/2.0
Expand All @@ -65,10 +65,10 @@ interactions:
trailer: {}
content_length: 41
uncompressed: false
body: '{"deleted_at":"2024-09-19T17:09:31.501Z"}'
body: '{"deleted_at":"2024-10-14T11:51:22.756Z"}'
headers:
Content-Type:
- application/json; charset=utf-8
status: 202 Accepted
code: 202
duration: 167.63275ms
duration: 352.129125ms
Loading
Loading