DEV Community

Cover image for How do I Skip the Default Policy in Vault?
🦄N B🛡
🦄N B🛡

Posted on

3 1

How do I Skip the Default Policy in Vault?

So here's something youze guyze ain't gonna know off the top of your balding pates...

When Vault set up with external identity provider like LDAP/OIDC/JWT/XYZ, if a user logging into Vault does not have a group definition that mapped to a policy, then it will be logging in as “default” policy

Is way to limit even the default policy, so that the domain user cannot even login and see the cubbyhole at all? Unless they are part of a group that have a policy mapped

Well, you can modify the default policy, of course.

But I suspect that's not gonna help most of you.

This flag in the API, token_no_default_policy, might help, at least for the JWT/OIDC auth method with its various providers: https://www.vaultproject.io/api-docs/auth/jwt#token_no_default_policy

And a quick quack of the ol' DDG shows that it seems they slapped this sucker on most of the other auth methods:

https://duckduckgo.com/?q=token_no_default_policy+site%3Avaultproject.io&t=h_&ia=web

So, there you go! If it works, you may express your gratitude for my generosity in the comments.

If it doesn't work, you may express your boundless rage for my imbecility in the comments.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay