inlets / inlets/inletsctl

Azure CLI --sdk-auth is getting deprecated

Open
#129 4 comments 0 reactions 0 assignees View on GitHub
helpwanted
Dominant language
Go
Stars
488
Forks
62
PR merge metrics
No merged PRs in 30d

Description

Azure example in this [documentation](https://docs.inlets.dev/reference/inletsctl/#example-usage-with-azure) uses `--sdk-auth` flag to generate credentials. But Microsoft [documentation](https://learn.microsoft.com/en-us/cli/azure/ad/sp?view=azure-cli-latest#az-ad-sp-create-for-rbac-optional-parameters) shows that it is deprecated.

Currently, [azure cloud provision](https://github.com/inlets/cloud-provision/blob/master/provision/azure.go#L116) uses `NewEnvironmentCredential` that crafts credentials from environment variables previously set from the JSON access token file. A possible alternative is to use [ClientSecretCredential](https://github.com/Azure/azure-sdk-for-go/blob/sdk/azidentity/v1.5.1/sdk/azidentity/client_secret_credential.go#L45) and initialize it from the new JSON file that is returned if `--sdk-auth` is not specified.

New JSON file sample:
``` json
{
"appId": "", // same as client id
"displayName": "",
"password": "", // same as client secret
"tenant": ""
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.