Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bpoe/identityservice
This is a simple service that provides Azure VM Instance Metadata Service like functionality on your local machine. Only the Identity token part of the REST API is provided.
https://github.com/bpoe/identityservice
azure identity service-principal
Last synced: about 1 month ago
JSON representation
This is a simple service that provides Azure VM Instance Metadata Service like functionality on your local machine. Only the Identity token part of the REST API is provided.
- Host: GitHub
- URL: https://github.com/bpoe/identityservice
- Owner: Bpoe
- License: mit
- Created: 2019-06-19T05:27:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-09T18:33:35.000Z (12 months ago)
- Last Synced: 2024-03-18T09:10:49.988Z (9 months ago)
- Topics: azure, identity, service-principal
- Language: C#
- Homepage:
- Size: 46.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IdentityService
This is a simple service that provides Azure VM Instance Metadata Service like functionality on your local machine. Only the Identity token part of the REST API is provided.# How to Use
Update the appsetting.json file to include the TenantId, ClientId and either the ClientSecret or the Certificate information for your Service Principal.
On Windows, you can place your certificate into the Certificate Store and specify the store information and the subject name of the certificate.
On Linux, you should be able to specify the path to the certificate.
# Get a Token
### CURL
``` Bash
curl 'http://127.0.0.1:50342/metadata/identity/oauth2/token?resource=https%3A%2F%2Fmanagement.azure.com%2F'
```### PowerShell
``` PowerShell
irm "http://127.0.0.1:50342/metadata/identity/oauth2/token?resource=https%3A%2F%2Fmanagement.azure.com%2F"
```In addition to the `/metadata/identity/oauth2/token` endpoint, I have also added a shorter `/oauth2/token` endpoint if you do not need full IMDS compatibility.
# Setup as a Service
On Windows, you can easily set this up as a Windows Service:
``` cmd
sc.exe create "IndentityService" binpath="C:\path\to\file\Identity.exe"
```