hashicorp / hashicorp/vault-plugin-auth-jwt
Negative matching of JWT claims
- Dominant language
- Go
- Stars
- 107
- Forks
- 73
- Avg merge
- 13h 49m
- Merged PRs (30d)
- 7
Description
I would like to allow JWT's that contain a claim that does NOT match a given value.
The problem I'm trying to solve is to disallow Dependabot to access certain secrets.
Example:
```
resource "vault_jwt_auth_backend" "github_jwt_auth" {
description = "JWT-based auth for GitHub Actions"
path = "jwt"
oidc_discovery_url = "https://token.actions.githubusercontent.com"
bound_issuer = "https://token.actions.githubusercontent.com"
}
resource "vault_jwt_auth_backend_role" "github_jwt_auth_role" {
backend = vault_jwt_auth_backend.github_jwt_auth.path
role_name = "actions-role"
token_policies = ["github_actions"]
bound_claims = {
"repository" : "KittyCAD/gha-jwt-test",
"runner_environment" : "github-hosted", # or "self-hosted"
"repository_visibility" : "github-hosted",
"actor": "dependabot[bot]"
}
user_claim = "actor"
role_type = "jwt"
}
```
The above is only giving dependabot access. However, I'd like to do the reverse.
Contributor guide
No contributing guide indexed for this repository
Research direction
No implementation files or tests are named. Start by locating the existing bound_claims matching logic and its tests, then determine how a negative claim condition should be configured and validated; done means the requested reverse Dependabot access behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- authentication, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100