mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-09 15:32:46 -04:00
Manual client secrets on azure
This commit is contained in:
parent
1861dc2744
commit
10e5249631
11 changed files with 84 additions and 80 deletions
|
@ -8,10 +8,10 @@ import (
|
|||
// ApplicationCredentials is a set of Azure AD application credentials.
|
||||
// It is the equivalent of a service account key in other cloud providers.
|
||||
type ApplicationCredentials struct {
|
||||
TenantID string
|
||||
ClientID string
|
||||
ClientSecret string
|
||||
Location string
|
||||
TenantID string
|
||||
AppClientID string
|
||||
ClientSecretValue string
|
||||
Location string
|
||||
}
|
||||
|
||||
// ApplicationCredentialsFromURI converts a cloudServiceAccountURI into Azure ApplicationCredentials.
|
||||
|
@ -28,10 +28,10 @@ func ApplicationCredentialsFromURI(cloudServiceAccountURI string) (ApplicationCr
|
|||
}
|
||||
query := uri.Query()
|
||||
return ApplicationCredentials{
|
||||
TenantID: query.Get("tenant_id"),
|
||||
ClientID: query.Get("client_id"),
|
||||
ClientSecret: query.Get("client_secret"),
|
||||
Location: query.Get("location"),
|
||||
TenantID: query.Get("tenant_id"),
|
||||
AppClientID: query.Get("client_id"),
|
||||
ClientSecretValue: query.Get("client_secret"),
|
||||
Location: query.Get("location"),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -39,8 +39,8 @@ func ApplicationCredentialsFromURI(cloudServiceAccountURI string) (ApplicationCr
|
|||
func (c ApplicationCredentials) ToCloudServiceAccountURI() string {
|
||||
query := url.Values{}
|
||||
query.Add("tenant_id", c.TenantID)
|
||||
query.Add("client_id", c.ClientID)
|
||||
query.Add("client_secret", c.ClientSecret)
|
||||
query.Add("client_id", c.AppClientID)
|
||||
query.Add("client_secret", c.ClientSecretValue)
|
||||
query.Add("location", c.Location)
|
||||
uri := url.URL{
|
||||
Scheme: "serviceaccount",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue