mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
rebase: bump the github-dependencies group across 1 directory with 7 updates
Bumps the github-dependencies group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `1.55.5` | `1.55.6` | | [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2) | `1.33.2` | `1.33.10` | | [github.com/kubernetes-csi/csi-lib-utils](https://github.com/kubernetes-csi/csi-lib-utils) | `0.19.0` | `0.20.0` | | [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) | `2.22.0` | `2.22.2` | | [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go) | `1.8.0` | `1.8.1` | | [github.com/csi-addons/kubernetes-csi-addons](https://github.com/csi-addons/kubernetes-csi-addons) | `0.9.0` | `0.11.0` | Updates `github.com/aws/aws-sdk-go` from 1.55.5 to 1.55.6 - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG_PENDING.md) - [Commits](https://github.com/aws/aws-sdk-go/compare/v1.55.5...v1.55.6) Updates `github.com/aws/aws-sdk-go-v2/service/sts` from 1.33.2 to 1.33.10 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/fms/v1.33.2...service/sns/v1.33.10) Updates `github.com/kubernetes-csi/csi-lib-utils` from 0.19.0 to 0.20.0 - [Release notes](https://github.com/kubernetes-csi/csi-lib-utils/releases) - [Commits](https://github.com/kubernetes-csi/csi-lib-utils/compare/v0.19.0...v0.20.0) Updates `github.com/onsi/ginkgo/v2` from 2.22.0 to 2.22.2 - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v2.22.0...v2.22.2) Updates `github.com/onsi/gomega` from 1.36.1 to 1.36.2 - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.36.1...v1.36.2) Updates `github.com/Azure/azure-sdk-for-go/sdk/azidentity` from 1.8.0 to 1.8.1 - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.8.0...sdk/azidentity/v1.8.1) Updates `github.com/csi-addons/kubernetes-csi-addons` from 0.9.0 to 0.11.0 - [Release notes](https://github.com/csi-addons/kubernetes-csi-addons/releases) - [Commits](https://github.com/csi-addons/kubernetes-csi-addons/compare/v0.9.0...v0.11.0) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies - dependency-name: github.com/aws/aws-sdk-go-v2/service/sts dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies - dependency-name: github.com/kubernetes-csi/csi-lib-utils dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azidentity dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies - dependency-name: github.com/csi-addons/kubernetes-csi-addons dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
b1834552c1
commit
6bea1775bd
7
vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md
generated
vendored
7
vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/CHANGELOG.md
generated
vendored
@ -1,5 +1,12 @@
|
||||
# Release History
|
||||
|
||||
## 1.17.0 (2025-01-07)
|
||||
|
||||
### Features Added
|
||||
|
||||
* Added field `OperationLocationResultPath` to `runtime.NewPollerOptions[T]` for LROs that use the `Operation-Location` pattern.
|
||||
* Support `encoding.TextMarshaler` and `encoding.TextUnmarshaler` interfaces in `arm.ResourceID`.
|
||||
|
||||
## 1.16.0 (2024-10-17)
|
||||
|
||||
### Features Added
|
||||
|
@ -110,6 +110,21 @@ func (id *ResourceID) String() string {
|
||||
return id.stringValue
|
||||
}
|
||||
|
||||
// MarshalText returns a textual representation of the ResourceID
|
||||
func (id *ResourceID) MarshalText() ([]byte, error) {
|
||||
return []byte(id.String()), nil
|
||||
}
|
||||
|
||||
// UnmarshalText decodes the textual representation of a ResourceID
|
||||
func (id *ResourceID) UnmarshalText(text []byte) error {
|
||||
newId, err := ParseResourceID(string(text))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*id = *newId
|
||||
return nil
|
||||
}
|
||||
|
||||
func newResourceID(parent *ResourceID, resourceTypeName string, resourceName string) *ResourceID {
|
||||
id := &ResourceID{}
|
||||
id.init(parent, chooseResourceType(resourceTypeName, parent), resourceName, true)
|
||||
|
12
vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/op/op.go
generated
vendored
12
vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/pollers/op/op.go
generated
vendored
@ -40,12 +40,13 @@ type Poller[T any] struct {
|
||||
OrigURL string `json:"origURL"`
|
||||
Method string `json:"method"`
|
||||
FinalState pollers.FinalStateVia `json:"finalState"`
|
||||
ResultPath string `json:"resultPath"`
|
||||
CurState string `json:"state"`
|
||||
}
|
||||
|
||||
// New creates a new Poller from the provided initial response.
|
||||
// Pass nil for response to create an empty Poller for rehydration.
|
||||
func New[T any](pl exported.Pipeline, resp *http.Response, finalState pollers.FinalStateVia) (*Poller[T], error) {
|
||||
func New[T any](pl exported.Pipeline, resp *http.Response, finalState pollers.FinalStateVia, resultPath string) (*Poller[T], error) {
|
||||
if resp == nil {
|
||||
log.Write(log.EventLRO, "Resuming Operation-Location poller.")
|
||||
return &Poller[T]{pl: pl}, nil
|
||||
@ -82,6 +83,7 @@ func New[T any](pl exported.Pipeline, resp *http.Response, finalState pollers.Fi
|
||||
OrigURL: resp.Request.URL.String(),
|
||||
Method: resp.Request.Method,
|
||||
FinalState: finalState,
|
||||
ResultPath: resultPath,
|
||||
CurState: curState,
|
||||
}, nil
|
||||
}
|
||||
@ -116,10 +118,6 @@ func (p *Poller[T]) Result(ctx context.Context, out *T) error {
|
||||
var req *exported.Request
|
||||
var err error
|
||||
|
||||
// when the payload is included with the status monitor on
|
||||
// terminal success it's in the "result" JSON property
|
||||
payloadPath := "result"
|
||||
|
||||
if p.FinalState == pollers.FinalStateViaLocation && p.LocURL != "" {
|
||||
req, err = exported.NewRequest(ctx, http.MethodGet, p.LocURL)
|
||||
} else if rl, rlErr := poller.GetResourceLocation(p.resp); rlErr != nil && !errors.Is(rlErr, poller.ErrNoBody) {
|
||||
@ -138,7 +136,7 @@ func (p *Poller[T]) Result(ctx context.Context, out *T) error {
|
||||
// if a final GET request has been created, execute it
|
||||
if req != nil {
|
||||
// no JSON path when making a final GET request
|
||||
payloadPath = ""
|
||||
p.ResultPath = ""
|
||||
resp, err := p.pl.Do(req)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -146,5 +144,5 @@ func (p *Poller[T]) Result(ctx context.Context, out *T) error {
|
||||
p.resp = resp
|
||||
}
|
||||
|
||||
return pollers.ResultHelper(p.resp, poller.Failed(p.CurState), payloadPath, out)
|
||||
return pollers.ResultHelper(p.resp, poller.Failed(p.CurState), p.ResultPath, out)
|
||||
}
|
||||
|
2
vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go
generated
vendored
2
vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/internal/shared/constants.go
generated
vendored
@ -40,5 +40,5 @@ const (
|
||||
Module = "azcore"
|
||||
|
||||
// Version is the semantic version (see http://semver.org) of this module.
|
||||
Version = "v1.16.0"
|
||||
Version = "v1.17.0"
|
||||
)
|
||||
|
1
vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pager.go
generated
vendored
1
vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/pager.go
generated
vendored
@ -32,6 +32,7 @@ type PagingHandler[T any] struct {
|
||||
}
|
||||
|
||||
// Pager provides operations for iterating over paged responses.
|
||||
// Methods on this type are not safe for concurrent use.
|
||||
type Pager[T any] struct {
|
||||
current *T
|
||||
handler PagingHandler[T]
|
||||
|
11
vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/poller.go
generated
vendored
11
vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime/poller.go
generated
vendored
@ -50,8 +50,14 @@ const (
|
||||
// NewPollerOptions contains the optional parameters for NewPoller.
|
||||
type NewPollerOptions[T any] struct {
|
||||
// FinalStateVia contains the final-state-via value for the LRO.
|
||||
// NOTE: used only for Azure-AsyncOperation and Operation-Location LROs.
|
||||
FinalStateVia FinalStateVia
|
||||
|
||||
// OperationLocationResultPath contains the JSON path to the result's
|
||||
// payload when it's included with the terminal success response.
|
||||
// NOTE: only used for Operation-Location LROs.
|
||||
OperationLocationResultPath string
|
||||
|
||||
// Response contains a preconstructed response type.
|
||||
// The final payload will be unmarshaled into it and returned.
|
||||
Response *T
|
||||
@ -98,7 +104,7 @@ func NewPoller[T any](resp *http.Response, pl exported.Pipeline, options *NewPol
|
||||
opr, err = async.New[T](pl, resp, options.FinalStateVia)
|
||||
} else if op.Applicable(resp) {
|
||||
// op poller must be checked before loc as it can also have a location header
|
||||
opr, err = op.New[T](pl, resp, options.FinalStateVia)
|
||||
opr, err = op.New[T](pl, resp, options.FinalStateVia, options.OperationLocationResultPath)
|
||||
} else if loc.Applicable(resp) {
|
||||
opr, err = loc.New[T](pl, resp)
|
||||
} else if body.Applicable(resp) {
|
||||
@ -172,7 +178,7 @@ func NewPollerFromResumeToken[T any](token string, pl exported.Pipeline, options
|
||||
} else if loc.CanResume(asJSON) {
|
||||
opr, _ = loc.New[T](pl, nil)
|
||||
} else if op.CanResume(asJSON) {
|
||||
opr, _ = op.New[T](pl, nil, "")
|
||||
opr, _ = op.New[T](pl, nil, "", "")
|
||||
} else {
|
||||
return nil, fmt.Errorf("unhandled poller token %s", string(raw))
|
||||
}
|
||||
@ -200,6 +206,7 @@ type PollingHandler[T any] interface {
|
||||
}
|
||||
|
||||
// Poller encapsulates a long-running operation, providing polling facilities until the operation reaches a terminal state.
|
||||
// Methods on this type are not safe for concurrent use.
|
||||
type Poller[T any] struct {
|
||||
op PollingHandler[T]
|
||||
resp *http.Response
|
||||
|
10
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/BREAKING_CHANGES.md
generated
vendored
10
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/BREAKING_CHANGES.md
generated
vendored
@ -1,5 +1,15 @@
|
||||
# Breaking Changes
|
||||
|
||||
## v1.8.0
|
||||
|
||||
### New errors from `NewManagedIdentityCredential` in some environments
|
||||
|
||||
`NewManagedIdentityCredential` now returns an error when `ManagedIdentityCredentialOptions.ID` is set in a hosting environment whose managed identity API doesn't support user-assigned identities. `ManagedIdentityCredential.GetToken()` formerly logged a warning in these cases. Returning an error instead prevents the credential authenticating an unexpected identity. The affected hosting environments are:
|
||||
* Azure Arc
|
||||
* Azure ML (when a resource or object ID is specified; client IDs are supported)
|
||||
* Cloud Shell
|
||||
* Service Fabric
|
||||
|
||||
## v1.6.0
|
||||
|
||||
### Behavioral change to `DefaultAzureCredential` in IMDS managed identity scenarios
|
||||
|
14
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md
generated
vendored
14
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/CHANGELOG.md
generated
vendored
@ -1,5 +1,19 @@
|
||||
# Release History
|
||||
|
||||
## 1.8.1 (2025-01-15)
|
||||
|
||||
### Bugs Fixed
|
||||
* User credential types inconsistently log access token scopes
|
||||
* `DefaultAzureCredential` skips managed identity in Azure Container Instances
|
||||
* Credentials having optional tenant IDs such as `AzureCLICredential` and
|
||||
`InteractiveBrowserCredential` require setting `AdditionallyAllowedTenants`
|
||||
when used with some clients
|
||||
|
||||
### Other Changes
|
||||
* `ChainedTokenCredential` and `DefaultAzureCredential` continue to their next
|
||||
credential after `ManagedIdentityCredential` receives an unexpected response
|
||||
from IMDS, indicating the response is from something else such as a proxy
|
||||
|
||||
## 1.8.0 (2024-10-08)
|
||||
|
||||
### Other Changes
|
||||
|
24
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/README.md
generated
vendored
24
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/README.md
generated
vendored
@ -54,17 +54,7 @@ The `azidentity` module focuses on OAuth authentication with Microsoft Entra ID.
|
||||
|
||||
### DefaultAzureCredential
|
||||
|
||||
`DefaultAzureCredential` simplifies authentication while developing applications that deploy to Azure by combining credentials used in Azure hosting environments and credentials used in local development. In production, it's better to use a specific credential type so authentication is more predictable and easier to debug. `DefaultAzureCredential` attempts to authenticate via the following mechanisms in this order, stopping when one succeeds:
|
||||
|
||||

|
||||
|
||||
1. **Environment** - `DefaultAzureCredential` will read account information specified via [environment variables](#environment-variables) and use it to authenticate.
|
||||
1. **Workload Identity** - If the app is deployed on Kubernetes with environment variables set by the workload identity webhook, `DefaultAzureCredential` will authenticate the configured identity.
|
||||
1. **Managed Identity** - If the app is deployed to an Azure host with managed identity enabled, `DefaultAzureCredential` will authenticate with it.
|
||||
1. **Azure CLI** - If a user or service principal has authenticated via the Azure CLI `az login` command, `DefaultAzureCredential` will authenticate that identity.
|
||||
1. **Azure Developer CLI** - If the developer has authenticated via the Azure Developer CLI `azd auth login` command, the `DefaultAzureCredential` will authenticate with that account.
|
||||
|
||||
> Note: `DefaultAzureCredential` is intended to simplify getting started with the SDK by handling common scenarios with reasonable default behaviors. Developers who want more control or whose scenario isn't served by the default settings should use other credential types.
|
||||
`DefaultAzureCredential` simplifies authentication while developing apps that deploy to Azure by combining credentials used in Azure hosting environments with credentials used in local development. For more information, see [DefaultAzureCredential overview][dac_overview].
|
||||
|
||||
## Managed Identity
|
||||
|
||||
@ -128,10 +118,10 @@ client := armresources.NewResourceGroupsClient("subscription ID", chain, nil)
|
||||
|
||||
### Credential chains
|
||||
|
||||
|Credential|Usage
|
||||
|-|-
|
||||
|[DefaultAzureCredential](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#DefaultAzureCredential)|Simplified authentication experience for getting started developing Azure apps
|
||||
|[ChainedTokenCredential](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#ChainedTokenCredential)|Define custom authentication flows, composing multiple credentials
|
||||
|Credential|Usage|Reference
|
||||
|-|-|-
|
||||
|[DefaultAzureCredential](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#DefaultAzureCredential)|Simplified authentication experience for getting started developing Azure apps|[DefaultAzureCredential overview][dac_overview]|
|
||||
|[ChainedTokenCredential](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#ChainedTokenCredential)|Define custom authentication flows, composing multiple credentials|[ChainedTokenCredential overview][ctc_overview]|
|
||||
|
||||
### Authenticating Azure-Hosted Applications
|
||||
|
||||
@ -260,4 +250,8 @@ For more information, see the
|
||||
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any
|
||||
additional questions or comments.
|
||||
|
||||
<!-- LINKS -->
|
||||
[ctc_overview]: https://aka.ms/azsdk/go/identity/credential-chains#chainedtokencredential-overview
|
||||
[dac_overview]: https://aka.ms/azsdk/go/identity/credential-chains#defaultazurecredential-overview
|
||||
|
||||

|
||||
|
14
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TOKEN_CACHING.MD
generated
vendored
14
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TOKEN_CACHING.MD
generated
vendored
@ -22,13 +22,13 @@ Some credential types support opt-in persistent token caching (see [the below ta
|
||||
|
||||
Persistent caches are encrypted at rest using a mechanism that depends on the operating system:
|
||||
|
||||
| Operating system | Encryption facility |
|
||||
|------------------|---------------------------------------|
|
||||
| Linux | kernel key retention service (keyctl) |
|
||||
| macOS | Keychain |
|
||||
| Windows | Data Protection API (DPAPI) |
|
||||
| Operating system | Encryption facility |
|
||||
| ---------------- | ---------------------------------------------- |
|
||||
| Linux | kernel key retention service (keyctl) |
|
||||
| macOS | Keychain (requires cgo and native build tools) |
|
||||
| Windows | Data Protection API (DPAPI) |
|
||||
|
||||
Persistent caching requires encryption. When the required encryption facility is unuseable, or the application is running on an unsupported OS, the persistent cache constructor returns an error. This doesn't mean that authentication is impossible, only that credentials can't persist authentication data and the application will need to reauthenticate the next time it runs. See the [package documentation][example] for example code showing how to configure persistent caching and access cached data.
|
||||
Persistent caching requires encryption. When the required encryption facility is unuseable, or the application is running on an unsupported OS, the persistent cache constructor returns an error. This doesn't mean that authentication is impossible, only that credentials can't persist authentication data and the application will need to reauthenticate the next time it runs. See the package documentation for examples showing how to configure persistent caching and access cached data for [users][user_example] and [service principals][sp_example].
|
||||
|
||||
### Credentials supporting token caching
|
||||
|
||||
@ -37,7 +37,7 @@ The following table indicates the state of in-memory and persistent caching in e
|
||||
**Note:** in-memory caching is enabled by default for every type supporting it. Persistent token caching must be enabled explicitly. See the [package documentation][user_example] for an example showing how to do this for credential types authenticating users. For types that authenticate service principals, set the `Cache` field on the constructor's options as shown in [this example][sp_example].
|
||||
|
||||
| Credential | In-memory token caching | Persistent token caching |
|
||||
|--------------------------------|---------------------------------------------------------------------|--------------------------|
|
||||
| ------------------------------ | ------------------------------------------------------------------- | ------------------------ |
|
||||
| `AzureCLICredential` | Not Supported | Not Supported |
|
||||
| `AzureDeveloperCLICredential` | Not Supported | Not Supported |
|
||||
| `AzurePipelinesCredential` | Supported | Supported |
|
||||
|
24
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TROUBLESHOOTING.md
generated
vendored
24
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/TROUBLESHOOTING.md
generated
vendored
@ -8,6 +8,7 @@ This troubleshooting guide covers failure investigation techniques, common error
|
||||
- [Permission issues](#permission-issues)
|
||||
- [Find relevant information in errors](#find-relevant-information-in-errors)
|
||||
- [Enable and configure logging](#enable-and-configure-logging)
|
||||
- [Troubleshoot persistent token caching issues](#troubleshoot-persistent-token-caching-issues)
|
||||
- [Troubleshoot AzureCLICredential authentication issues](#troubleshoot-azureclicredential-authentication-issues)
|
||||
- [Troubleshoot AzureDeveloperCLICredential authentication issues](#troubleshoot-azuredeveloperclicredential-authentication-issues)
|
||||
- [Troubleshoot AzurePipelinesCredential authentication issues](#troubleshoot-azurepipelinescredential-authentication-issues)
|
||||
@ -236,6 +237,29 @@ azd auth token --output json --scope https://management.core.windows.net/.defaul
|
||||
| No service connection found with identifier |The `serviceConnectionID` argument to `NewAzurePipelinesCredential` is incorrect| Verify the service connection ID. This parameter refers to the `resourceId` of the Azure Service Connection. It can also be found in the query string of the service connection's configuration in Azure DevOps. [Azure Pipelines documentation](https://learn.microsoft.com/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml) has more information about service connections.|
|
||||
|401 (Unauthorized) response from OIDC endpoint|The `systemAccessToken` argument to `NewAzurePipelinesCredential` is incorrect|Check pipeline configuration. This value comes from the predefined variable `System.AccessToken` [as described in Azure Pipelines documentation](https://learn.microsoft.com/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#systemaccesstoken).|
|
||||
|
||||
## Troubleshoot persistent token caching issues
|
||||
|
||||
### macOS
|
||||
|
||||
[azidentity/cache](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache) encrypts persistent caches with the system Keychain on macOS. You may see build and runtime errors there because calling the Keychain API requires cgo and macOS prohibits Keychain access in some scenarios.
|
||||
|
||||
#### Build errors
|
||||
|
||||
Build errors about undefined `accessor` symbols indicate that cgo wasn't enabled. For example:
|
||||
```
|
||||
$ GOOS=darwin go build
|
||||
# github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache
|
||||
../../go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/azidentity/cache@v0.3.0/darwin.go:18:19: undefined: accessor.New
|
||||
../../go/pkg/mod/github.com/!azure/azure-sdk-for-go/sdk/azidentity/cache@v0.3.0/darwin.go:18:38: undefined: accessor.WithAccount
|
||||
```
|
||||
|
||||
Try `go build` again with `CGO_ENABLED=1`. You may need to install native build tools.
|
||||
|
||||
#### Runtime errors
|
||||
|
||||
macOS prohibits Keychain access from environments without a GUI such as SSH sessions. If your application calls the persistent cache constructor ([cache.New](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache#New)) from an SSH session on a macOS host, you'll see an error like
|
||||
`persistent storage isn't available due to error "User interaction is not allowed. (-25308)"`. This doesn't mean authentication is impossible, only that credentials can't persist data and the application must reauthenticate the next time it runs.
|
||||
|
||||
## Get additional help
|
||||
|
||||
Additional information on ways to reach out for support can be found in [SUPPORT.md](https://github.com/Azure/azure-sdk-for-go/blob/main/SUPPORT.md).
|
||||
|
24
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azidentity.go
generated
vendored
24
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azidentity.go
generated
vendored
@ -42,6 +42,8 @@ const (
|
||||
developerSignOnClientID = "04b07795-8ddb-461a-bbee-02f9e1bf7b46"
|
||||
defaultSuffix = "/.default"
|
||||
|
||||
scopeLogFmt = "%s.GetToken() acquired a token for scope %q"
|
||||
|
||||
traceNamespace = "Microsoft.Entra"
|
||||
traceOpGetToken = "GetToken"
|
||||
traceOpAuthenticate = "Authenticate"
|
||||
@ -103,7 +105,16 @@ func resolveAdditionalTenants(tenants []string) []string {
|
||||
return cp
|
||||
}
|
||||
|
||||
// resolveTenant returns the correct tenant for a token request
|
||||
// resolveTenant returns the correct tenant for a token request, or "" when the calling credential doesn't
|
||||
// have an explicitly configured tenant and the caller didn't specify a tenant for the token request.
|
||||
//
|
||||
// - defaultTenant: tenant set when constructing the credential, if any. "" is valid for credentials
|
||||
// having an optional or implicit tenant such as dev tool and interactive user credentials. Those
|
||||
// default to the tool's configured tenant or the user's home tenant, respectively.
|
||||
// - specified: tenant specified for this token request i.e., TokenRequestOptions.TenantID. May be "".
|
||||
// - credName: name of the calling credential type; for error messages
|
||||
// - additionalTenants: optional allow list of tenants the credential may acquire tokens from in
|
||||
// addition to defaultTenant i.e., the credential's AdditionallyAllowedTenants option
|
||||
func resolveTenant(defaultTenant, specified, credName string, additionalTenants []string) (string, error) {
|
||||
if specified == "" || specified == defaultTenant {
|
||||
return defaultTenant, nil
|
||||
@ -119,6 +130,17 @@ func resolveTenant(defaultTenant, specified, credName string, additionalTenants
|
||||
return specified, nil
|
||||
}
|
||||
}
|
||||
if len(additionalTenants) == 0 {
|
||||
switch defaultTenant {
|
||||
case "", organizationsTenantID:
|
||||
// The application didn't specify a tenant or allow list when constructing the credential. Allow the
|
||||
// tenant specified for this token request because we have nothing to compare it to (i.e., it vacuously
|
||||
// satisfies the credential's configuration); don't know whether the application is multitenant; and
|
||||
// don't want to return an error in the common case that the specified tenant matches the credential's
|
||||
// default tenant determined elsewhere e.g., in some dev tool's configuration.
|
||||
return specified, nil
|
||||
}
|
||||
}
|
||||
return "", fmt.Errorf(`%s isn't configured to acquire tokens for tenant %q. To enable acquiring tokens for this tenant add it to the AdditionallyAllowedTenants on the credential options, or add "*" to allow acquiring tokens for any tenant`, credName, specified)
|
||||
}
|
||||
|
||||
|
6
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_cli_credential.go
generated
vendored
6
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/azure_cli_credential.go
generated
vendored
@ -30,9 +30,9 @@ type azTokenProvider func(ctx context.Context, scopes []string, tenant, subscrip
|
||||
|
||||
// AzureCLICredentialOptions contains optional parameters for AzureCLICredential.
|
||||
type AzureCLICredentialOptions struct {
|
||||
// AdditionallyAllowedTenants specifies tenants for which the credential may acquire tokens, in addition
|
||||
// to TenantID. Add the wildcard value "*" to allow the credential to acquire tokens for any tenant the
|
||||
// logged in account can access.
|
||||
// AdditionallyAllowedTenants specifies tenants to which the credential may authenticate, in addition to
|
||||
// TenantID. When TenantID is empty, this option has no effect and the credential will authenticate to
|
||||
// any requested tenant. Add the wildcard value "*" to allow the credential to authenticate to any tenant.
|
||||
AdditionallyAllowedTenants []string
|
||||
|
||||
// Subscription is the name or ID of a subscription. Set this to acquire tokens for an account other
|
||||
|
@ -30,9 +30,9 @@ type azdTokenProvider func(ctx context.Context, scopes []string, tenant string)
|
||||
|
||||
// AzureDeveloperCLICredentialOptions contains optional parameters for AzureDeveloperCLICredential.
|
||||
type AzureDeveloperCLICredentialOptions struct {
|
||||
// AdditionallyAllowedTenants specifies tenants for which the credential may acquire tokens, in addition
|
||||
// to TenantID. Add the wildcard value "*" to allow the credential to acquire tokens for any tenant the
|
||||
// logged in account can access.
|
||||
// AdditionallyAllowedTenants specifies tenants to which the credential may authenticate, in addition to
|
||||
// TenantID. When TenantID is empty, this option has no effect and the credential will authenticate to
|
||||
// any requested tenant. Add the wildcard value "*" to allow the credential to authenticate to any tenant.
|
||||
AdditionallyAllowedTenants []string
|
||||
|
||||
// TenantID identifies the tenant the credential should authenticate in. Defaults to the azd environment,
|
||||
|
8
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/chained_token_credential.go
generated
vendored
8
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/chained_token_credential.go
generated
vendored
@ -27,7 +27,10 @@ type ChainedTokenCredentialOptions struct {
|
||||
}
|
||||
|
||||
// ChainedTokenCredential links together multiple credentials and tries them sequentially when authenticating. By default,
|
||||
// it tries all the credentials until one authenticates, after which it always uses that credential.
|
||||
// it tries all the credentials until one authenticates, after which it always uses that credential. For more information,
|
||||
// see [ChainedTokenCredential overview].
|
||||
//
|
||||
// [ChainedTokenCredential overview]: https://aka.ms/azsdk/go/identity/credential-chains#chainedtokencredential-overview
|
||||
type ChainedTokenCredential struct {
|
||||
cond *sync.Cond
|
||||
iterating bool
|
||||
@ -46,6 +49,9 @@ func NewChainedTokenCredential(sources []azcore.TokenCredential, options *Chaine
|
||||
if source == nil { // cannot have a nil credential in the chain or else the application will panic when GetToken() is called on nil
|
||||
return nil, errors.New("sources cannot contain nil")
|
||||
}
|
||||
if mc, ok := source.(*ManagedIdentityCredential); ok {
|
||||
mc.mic.chained = true
|
||||
}
|
||||
}
|
||||
cp := make([]azcore.TokenCredential, len(sources))
|
||||
copy(cp, sources)
|
||||
|
15
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/ci.yml
generated
vendored
15
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/ci.yml
generated
vendored
@ -26,27 +26,16 @@ extends:
|
||||
parameters:
|
||||
CloudConfig:
|
||||
Public:
|
||||
ServiceConnection: azure-sdk-tests
|
||||
SubscriptionConfigurationFilePaths:
|
||||
- eng/common/TestResources/sub-config/AzurePublicMsft.json
|
||||
SubscriptionConfigurations:
|
||||
- $(sub-config-azure-cloud-test-resources)
|
||||
- $(sub-config-identity-test-resources)
|
||||
EnableRaceDetector: true
|
||||
Location: westus2
|
||||
RunLiveTests: true
|
||||
ServiceDirectory: azidentity
|
||||
UsePipelineProxy: false
|
||||
|
||||
${{ if endsWith(variables['Build.DefinitionName'], 'weekly') }}:
|
||||
PreSteps:
|
||||
- task: AzureCLI@2
|
||||
displayName: Set OIDC token
|
||||
inputs:
|
||||
addSpnToEnvironment: true
|
||||
azureSubscription: azure-sdk-tests
|
||||
inlineScript: Write-Host "##vso[task.setvariable variable=OIDC_TOKEN;]$($env:idToken)"
|
||||
scriptLocation: inlineScript
|
||||
scriptType: pscore
|
||||
PersistOidcToken: true
|
||||
MatrixConfigs:
|
||||
- Name: managed_identity_matrix
|
||||
GenerateVMJobs: true
|
||||
|
2
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/confidential_client.go
generated
vendored
2
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/confidential_client.go
generated
vendored
@ -115,7 +115,7 @@ func (c *confidentialClient) GetToken(ctx context.Context, tro policy.TokenReque
|
||||
err = newAuthenticationFailedErrorFromMSAL(c.name, err)
|
||||
}
|
||||
} else {
|
||||
msg := fmt.Sprintf("%s.GetToken() acquired a token for scope %q", c.name, strings.Join(ar.GrantedScopes, ", "))
|
||||
msg := fmt.Sprintf(scopeLogFmt, c.name, strings.Join(ar.GrantedScopes, ", "))
|
||||
log.Write(EventAuthentication, msg)
|
||||
}
|
||||
return azcore.AccessToken{Token: ar.AccessToken, ExpiresOn: ar.ExpiresOn.UTC()}, err
|
||||
|
14
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/default_azure_credential.go
generated
vendored
14
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/default_azure_credential.go
generated
vendored
@ -23,15 +23,19 @@ type DefaultAzureCredentialOptions struct {
|
||||
// to credential types that authenticate via external tools such as the Azure CLI.
|
||||
azcore.ClientOptions
|
||||
|
||||
// AdditionallyAllowedTenants specifies additional tenants for which the credential may acquire tokens. Add
|
||||
// the wildcard value "*" to allow the credential to acquire tokens for any tenant. This value can also be
|
||||
// set as a semicolon delimited list of tenants in the environment variable AZURE_ADDITIONALLY_ALLOWED_TENANTS.
|
||||
// AdditionallyAllowedTenants specifies tenants to which the credential may authenticate, in addition to
|
||||
// TenantID. When TenantID is empty, this option has no effect and the credential will authenticate to
|
||||
// any requested tenant. Add the wildcard value "*" to allow the credential to authenticate to any tenant.
|
||||
// This value can also be set as a semicolon delimited list of tenants in the environment variable
|
||||
// AZURE_ADDITIONALLY_ALLOWED_TENANTS.
|
||||
AdditionallyAllowedTenants []string
|
||||
|
||||
// DisableInstanceDiscovery should be set true only by applications authenticating in disconnected clouds, or
|
||||
// private clouds such as Azure Stack. It determines whether the credential requests Microsoft Entra instance metadata
|
||||
// from https://login.microsoft.com before authenticating. Setting this to true will skip this request, making
|
||||
// the application responsible for ensuring the configured authority is valid and trustworthy.
|
||||
DisableInstanceDiscovery bool
|
||||
|
||||
// TenantID sets the default tenant for authentication via the Azure CLI and workload identity.
|
||||
TenantID string
|
||||
}
|
||||
@ -39,7 +43,7 @@ type DefaultAzureCredentialOptions struct {
|
||||
// DefaultAzureCredential simplifies authentication while developing applications that deploy to Azure by
|
||||
// combining credentials used in Azure hosting environments and credentials used in local development. In
|
||||
// production, it's better to use a specific credential type so authentication is more predictable and easier
|
||||
// to debug.
|
||||
// to debug. For more information, see [DefaultAzureCredential overview].
|
||||
//
|
||||
// DefaultAzureCredential attempts to authenticate with each of these credential types, in the following order,
|
||||
// stopping when one provides a token:
|
||||
@ -55,6 +59,8 @@ type DefaultAzureCredentialOptions struct {
|
||||
// Consult the documentation for these credential types for more information on how they authenticate.
|
||||
// Once a credential has successfully authenticated, DefaultAzureCredential will use that credential for
|
||||
// every subsequent authentication.
|
||||
//
|
||||
// [DefaultAzureCredential overview]: https://aka.ms/azsdk/go/identity/credential-chains#defaultazurecredential-overview
|
||||
type DefaultAzureCredential struct {
|
||||
chain *ChainedTokenCredential
|
||||
}
|
||||
|
5
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/device_code_credential.go
generated
vendored
5
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/device_code_credential.go
generated
vendored
@ -21,8 +21,9 @@ const credNameDeviceCode = "DeviceCodeCredential"
|
||||
type DeviceCodeCredentialOptions struct {
|
||||
azcore.ClientOptions
|
||||
|
||||
// AdditionallyAllowedTenants specifies additional tenants for which the credential may acquire
|
||||
// tokens. Add the wildcard value "*" to allow the credential to acquire tokens for any tenant.
|
||||
// AdditionallyAllowedTenants specifies tenants to which the credential may authenticate, in addition to
|
||||
// TenantID. When TenantID is empty, this option has no effect and the credential will authenticate to
|
||||
// any requested tenant. Add the wildcard value "*" to allow the credential to authenticate to any tenant.
|
||||
AdditionallyAllowedTenants []string
|
||||
|
||||
// AuthenticationRecord returned by a call to a credential's Authenticate method. Set this option
|
||||
|
@ -20,8 +20,9 @@ const credNameBrowser = "InteractiveBrowserCredential"
|
||||
type InteractiveBrowserCredentialOptions struct {
|
||||
azcore.ClientOptions
|
||||
|
||||
// AdditionallyAllowedTenants specifies additional tenants for which the credential may acquire
|
||||
// tokens. Add the wildcard value "*" to allow the credential to acquire tokens for any tenant.
|
||||
// AdditionallyAllowedTenants specifies tenants to which the credential may authenticate, in addition to
|
||||
// TenantID. When TenantID is empty, this option has no effect and the credential will authenticate to
|
||||
// any requested tenant. Add the wildcard value "*" to allow the credential to authenticate to any tenant.
|
||||
AdditionallyAllowedTenants []string
|
||||
|
||||
// AuthenticationRecord returned by a call to a credential's Authenticate method. Set this option
|
||||
|
39
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_client.go
generated
vendored
39
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/managed_identity_client.go
generated
vendored
@ -65,6 +65,9 @@ type managedIdentityClient struct {
|
||||
id ManagedIDKind
|
||||
msiType msiType
|
||||
probeIMDS bool
|
||||
// chained indicates whether the client is part of a credential chain. If true, the client will return
|
||||
// a credentialUnavailableError instead of an AuthenticationFailedError for an unexpected IMDS response.
|
||||
chained bool
|
||||
}
|
||||
|
||||
// arcKeyDirectory returns the directory expected to contain Azure Arc keys
|
||||
@ -144,7 +147,7 @@ func newManagedIdentityClient(options *ManagedIdentityCredentialOptions) (*manag
|
||||
if _, ok := os.LookupEnv(identityHeader); ok {
|
||||
if _, ok := os.LookupEnv(identityServerThumbprint); ok {
|
||||
if options.ID != nil {
|
||||
return nil, errors.New("the Service Fabric API doesn't support specifying a user-assigned managed identity at runtime")
|
||||
return nil, errors.New("the Service Fabric API doesn't support specifying a user-assigned identity at runtime. The identity is determined by cluster resource configuration. See https://aka.ms/servicefabricmi")
|
||||
}
|
||||
env = "Service Fabric"
|
||||
c.endpoint = endpoint
|
||||
@ -215,6 +218,7 @@ func (c *managedIdentityClient) authenticate(ctx context.Context, id ManagedIDKi
|
||||
// no need to synchronize around this value because it's true only when DefaultAzureCredential constructed the client,
|
||||
// and in that case ChainedTokenCredential.GetToken synchronizes goroutines that would execute this block
|
||||
if c.probeIMDS {
|
||||
// send a malformed request (no Metadata header) to IMDS to determine whether the endpoint is available
|
||||
cx, cancel := context.WithTimeout(ctx, imdsProbeTimeout)
|
||||
defer cancel()
|
||||
cx = policy.WithRetryOptions(cx, policy.RetryOptions{MaxRetries: -1})
|
||||
@ -222,24 +226,14 @@ func (c *managedIdentityClient) authenticate(ctx context.Context, id ManagedIDKi
|
||||
if err != nil {
|
||||
return azcore.AccessToken{}, fmt.Errorf("failed to create IMDS probe request: %s", err)
|
||||
}
|
||||
res, err := c.azClient.Pipeline().Do(req)
|
||||
if err != nil {
|
||||
if _, err = c.azClient.Pipeline().Do(req); err != nil {
|
||||
msg := err.Error()
|
||||
if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
|
||||
msg = "managed identity timed out. See https://aka.ms/azsdk/go/identity/troubleshoot#dac for more information"
|
||||
}
|
||||
return azcore.AccessToken{}, newCredentialUnavailableError(credNameManagedIdentity, msg)
|
||||
}
|
||||
// because IMDS always responds with JSON, assume a non-JSON response is from something else, such
|
||||
// as a proxy, and return credentialUnavailableError so DefaultAzureCredential continues iterating
|
||||
b, err := azruntime.Payload(res)
|
||||
if err != nil {
|
||||
return azcore.AccessToken{}, newCredentialUnavailableError(credNameManagedIdentity, fmt.Sprintf("failed to read IMDS probe response: %s", err))
|
||||
}
|
||||
if !json.Valid(b) {
|
||||
return azcore.AccessToken{}, newCredentialUnavailableError(credNameManagedIdentity, "unexpected response to IMDS probe")
|
||||
}
|
||||
// send normal token requests from now on because IMDS responded
|
||||
// send normal token requests from now on because something responded
|
||||
c.probeIMDS = false
|
||||
}
|
||||
|
||||
@ -254,13 +248,21 @@ func (c *managedIdentityClient) authenticate(ctx context.Context, id ManagedIDKi
|
||||
}
|
||||
|
||||
if azruntime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) {
|
||||
return c.createAccessToken(resp)
|
||||
tk, err := c.createAccessToken(resp)
|
||||
if err != nil && c.chained && c.msiType == msiTypeIMDS {
|
||||
// failure to unmarshal a 2xx implies the response is from something other than IMDS such as a proxy listening at
|
||||
// the same address. Return a credentialUnavailableError so credential chains continue to their next credential
|
||||
err = newCredentialUnavailableError(credNameManagedIdentity, err.Error())
|
||||
}
|
||||
return tk, err
|
||||
}
|
||||
|
||||
if c.msiType == msiTypeIMDS {
|
||||
switch resp.StatusCode {
|
||||
case http.StatusBadRequest:
|
||||
if id != nil {
|
||||
// return authenticationFailedError, halting any encompassing credential chain,
|
||||
// because the explicit user-assigned identity implies the developer expected this to work
|
||||
return azcore.AccessToken{}, newAuthenticationFailedError(credNameManagedIdentity, "the requested identity isn't assigned to this resource", resp)
|
||||
}
|
||||
msg := "failed to authenticate a system assigned identity"
|
||||
@ -276,6 +278,13 @@ func (c *managedIdentityClient) authenticate(ctx context.Context, id ManagedIDKi
|
||||
return azcore.AccessToken{}, newCredentialUnavailableError(credNameManagedIdentity, fmt.Sprintf("unexpected response %q", string(body)))
|
||||
}
|
||||
}
|
||||
if c.chained {
|
||||
// the response may be from something other than IMDS, for example a proxy returning
|
||||
// 404. Return credentialUnavailableError so credential chains continue to their
|
||||
// next credential, include the response in the error message to help debugging
|
||||
err = newAuthenticationFailedError(credNameManagedIdentity, "", resp)
|
||||
return azcore.AccessToken{}, newCredentialUnavailableError(credNameManagedIdentity, err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
return azcore.AccessToken{}, newAuthenticationFailedError(credNameManagedIdentity, "", resp)
|
||||
@ -290,7 +299,7 @@ func (c *managedIdentityClient) createAccessToken(res *http.Response) (azcore.Ac
|
||||
ExpiresOn interface{} `json:"expires_on,omitempty"` // the value returned in this field varies between a number and a date string
|
||||
}{}
|
||||
if err := azruntime.UnmarshalAsJSON(res, &value); err != nil {
|
||||
return azcore.AccessToken{}, fmt.Errorf("internal AccessToken: %v", err)
|
||||
return azcore.AccessToken{}, newAuthenticationFailedError(credNameManagedIdentity, "Unexpected response content", res)
|
||||
}
|
||||
if value.ExpiresIn != "" {
|
||||
expiresIn, err := json.Number(value.ExpiresIn).Int64()
|
||||
|
9
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/public_client.go
generated
vendored
9
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/public_client.go
generated
vendored
@ -154,12 +154,7 @@ func (p *publicClient) GetToken(ctx context.Context, tro policy.TokenRequestOpti
|
||||
if p.opts.DisableAutomaticAuthentication {
|
||||
return azcore.AccessToken{}, newAuthenticationRequiredError(p.name, tro)
|
||||
}
|
||||
at, err := p.reqToken(ctx, client, tro)
|
||||
if err == nil {
|
||||
msg := fmt.Sprintf("%s.GetToken() acquired a token for scope %q", p.name, strings.Join(ar.GrantedScopes, ", "))
|
||||
log.Write(EventAuthentication, msg)
|
||||
}
|
||||
return at, err
|
||||
return p.reqToken(ctx, client, tro)
|
||||
}
|
||||
|
||||
// reqToken requests a token from the MSAL public client. It's separate from GetToken() to enable Authenticate() to bypass the cache.
|
||||
@ -242,6 +237,8 @@ func (p *publicClient) newMSALClient(enableCAE bool) (msalPublicClient, error) {
|
||||
|
||||
func (p *publicClient) token(ar public.AuthResult, err error) (azcore.AccessToken, error) {
|
||||
if err == nil {
|
||||
msg := fmt.Sprintf(scopeLogFmt, p.name, strings.Join(ar.GrantedScopes, ", "))
|
||||
log.Write(EventAuthentication, msg)
|
||||
p.record, err = newAuthenticationRecord(ar)
|
||||
} else {
|
||||
err = newAuthenticationFailedErrorFromMSAL(p.name, err)
|
||||
|
16
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/test-resources-post.ps1
generated
vendored
16
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/test-resources-post.ps1
generated
vendored
@ -7,6 +7,10 @@ param (
|
||||
[hashtable] $AdditionalParameters = @{},
|
||||
[hashtable] $DeploymentOutputs,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string] $SubscriptionId,
|
||||
|
||||
[Parameter(ParameterSetName = 'Provisioner', Mandatory = $true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string] $TenantId,
|
||||
@ -15,6 +19,10 @@ param (
|
||||
[ValidatePattern('^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$')]
|
||||
[string] $TestApplicationId,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string] $Environment,
|
||||
|
||||
# Captures any arguments from eng/New-TestResources.ps1 not declared here (no parameter errors).
|
||||
[Parameter(ValueFromRemainingArguments = $true)]
|
||||
$RemainingArguments
|
||||
@ -28,8 +36,9 @@ if ($CI) {
|
||||
Write-Host "Skipping post-provisioning script because resources weren't deployed"
|
||||
return
|
||||
}
|
||||
az login --federated-token $env:OIDC_TOKEN --service-principal -t $TenantId -u $TestApplicationId
|
||||
az account set --subscription $DeploymentOutputs['AZIDENTITY_SUBSCRIPTION_ID']
|
||||
az cloud set -n $Environment
|
||||
az login --federated-token $env:ARM_OIDC_TOKEN --service-principal -t $TenantId -u $TestApplicationId
|
||||
az account set --subscription $SubscriptionId
|
||||
}
|
||||
|
||||
Write-Host "Building container"
|
||||
@ -62,6 +71,9 @@ $aciName = "azidentity-test"
|
||||
az container create -g $rg -n $aciName --image $image `
|
||||
--acr-identity $($DeploymentOutputs['AZIDENTITY_USER_ASSIGNED_IDENTITY']) `
|
||||
--assign-identity [system] $($DeploymentOutputs['AZIDENTITY_USER_ASSIGNED_IDENTITY']) `
|
||||
--cpu 1 `
|
||||
--memory 1.0 `
|
||||
--os-type Linux `
|
||||
--role "Storage Blob Data Reader" `
|
||||
--scope $($DeploymentOutputs['AZIDENTITY_STORAGE_ID']) `
|
||||
-e AZIDENTITY_STORAGE_NAME=$($DeploymentOutputs['AZIDENTITY_STORAGE_NAME']) `
|
||||
|
2
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go
generated
vendored
2
vendor/github.com/Azure/azure-sdk-for-go/sdk/azidentity/version.go
generated
vendored
@ -14,5 +14,5 @@ const (
|
||||
module = "github.com/Azure/azure-sdk-for-go/sdk/" + component
|
||||
|
||||
// Version is the semantic version (see http://semver.org) of this module.
|
||||
version = "v1.8.0"
|
||||
version = "v1.8.1"
|
||||
)
|
||||
|
Reference in New Issue
Block a user