-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ add support for token signing certificate
We do like to add support to the provider to create a token signing certificate. This commit adds a new field `token_signing_certificate_name` to the resource `azuread_service_principal`. If this is set a ceritificate will be generated and the thumbprint will be stored in a computed field called `preferred_token_signing_key_thumbprint`. Issue: #732
- Loading branch information
1 parent
10ec49b
commit e0d9baf
Showing
7 changed files
with
114 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ import ( | |
"fmt" | ||
"net/http" | ||
"os" | ||
"regexp" | ||
"testing" | ||
|
||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" | ||
|
@@ -57,6 +58,7 @@ func TestAccServicePrincipal_complete(t *testing.T) { | |
check.That(data.ResourceName).Key("redirect_uris.#").HasValue("2"), | ||
check.That(data.ResourceName).Key("sign_in_audience").HasValue("AzureADMyOrg"), | ||
check.That(data.ResourceName).Key("type").HasValue("Application"), | ||
check.That(data.ResourceName).Key("preferred_token_signing_key_thumbprint").MatchesRegex(regexp.MustCompile("^[A-Z0-9]{40}$")), | ||
), | ||
}, | ||
data.ImportStep("use_existing"), | ||
|
@@ -415,13 +417,14 @@ func (r ServicePrincipalResource) complete(data acceptance.TestData) string { | |
resource "azuread_service_principal" "test" { | ||
application_id = azuread_application.test.application_id | ||
account_enabled = false | ||
alternative_names = ["foo", "bar"] | ||
app_role_assignment_required = true | ||
description = "An internal app for testing" | ||
login_url = "https://test-%[2]d.internal/login" | ||
notes = "Just testing something" | ||
preferred_single_sign_on_mode = "saml" | ||
account_enabled = false | ||
alternative_names = ["foo", "bar"] | ||
app_role_assignment_required = true | ||
description = "An internal app for testing" | ||
login_url = "https://test-%[2]d.internal/login" | ||
notes = "Just testing something" | ||
preferred_single_sign_on_mode = "saml" | ||
token_signing_certificate_name = "testcert" | ||
notification_email_addresses = [ | ||
"[email protected]", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
69 changes: 69 additions & 0 deletions
69
vendor/github.com/manicminer/hamilton/msgraph/serviceprincipals.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters