Skip to content

applications: URI parsing bugfixes #1610

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

manicminer
Copy link
Contributor

Changelog

  • azuread_application - allow more URL schemes for redirect_uris properties
  • azuread_application_identifier_uri - fix an encoding bug that could generate invalid resource IDs
  • azuread_application_redirect_uris - allow more URL schemes for redirect_uris properties

… URIs as the number of supported schemes has expanded and their documentation is not consolidated, making it difficult for the provider to keep up
Comment on lines +20 to +67
"application_object_id": {
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
},

"key_id": {
Type: pluginsdk.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},

"description": {
Type: pluginsdk.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},

"value": {
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
Sensitive: true,
},

"start_date": {
Type: pluginsdk.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},

"end_date": {
Type: pluginsdk.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
ExactlyOneOf: []string{"end_date_relative"},
},

"end_date_relative": {
Type: pluginsdk.TypeString,
Optional: true,
ForceNew: true,
ExactlyOneOf: []string{"end_date"},
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this have to match the schema of the resource exactly? When I look at the resource schema I only see two properties

"application_id": {
Description: "The resource ID of the application to which the identifier URI should be added",
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: stable.ValidateApplicationID,
},
"identifier_uri": {
Description: "The user-defined URI or URI-like string that uniquely identifies an application within its Azure AD tenant, or within a verified custom domain if the application is multi-tenant",
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
// Extensive validation is intentionally avoided here, as the accepted values are undocumented, vary wildly and are
// different for each user depending on the tenant domain configuration, whether the application is used for SSO etc
ValidateFunc: validation.StringIsNotEmpty,
},

Unless I'm missing something? 🙈

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manicminer - This migration schema looks like it belongs to azuread_application_certificate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azuread_application_identifier_uri parsing error for hostnames exactly 10 characters long brk-multihub URIs are not accepted as SPA redirect uris
3 participants