Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skibish/aadtoken
Grab Azure AD token quickly
https://github.com/skibish/aadtoken
aad active-directory aks aks-kubernetes-cluster azure azure-active-directory azure-kubernetes-service go golang pod-identity
Last synced: 28 days ago
JSON representation
Grab Azure AD token quickly
- Host: GitHub
- URL: https://github.com/skibish/aadtoken
- Owner: skibish
- License: mit
- Created: 2022-05-21T07:39:05.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-21T10:26:15.000Z (almost 3 years ago)
- Last Synced: 2024-06-20T03:38:18.262Z (8 months ago)
- Topics: aad, active-directory, aks, aks-kubernetes-cluster, azure, azure-active-directory, azure-kubernetes-service, go, golang, pod-identity
- Language: Go
- Homepage: https://github.com/skibish/aadtoken
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Azure Active Directory (Azure AD) Token
Get AAD token quickly.
## Docs
```txt
aadtoken [scope]Get AAD token by providing a scope.
```For more details, [it is based on Azure SDK](https://docs.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication).
## Usage
### Azure Kubernetes Service (AKS)
Using [AAD Pod Identity](https://github.com/Azure/aad-pod-identity).
```bash
$ kubectl run aadtoken \
--rm \
--attach \
--image=skibish/aadtoken \
--image-pull-policy=Always \
--labels="aadpodidbinding=" \
--restart=Never \
"a6a0b2e1-d5d6-4b33-93c8-68125d41b9e7"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
```### CLI
```bash
$ aadtoken "a6a0b2e1-d5d6-4b33-93c8-68125d41b9e7"
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
```## Motivation
Working with Azure, Azure AD based services from time to time you need to generate the token for various reasons.
For example:* verify connection to services
* check the tokenThis tool is a helper to do it faster.