spring-projects / spring-projects/spring-security-samples

Authorities in permissions array from Auth0

Open
#93 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.8k
Forks
797
Avg merge
3m
Merged PRs (30d)
5

Description

Hi I have a resource server that needs to parse a permissions array in claims instead of the scope in claims:

"permissions": [
    "create:application",
    "create:client_org_user"]

How do I do that in security config? Below doesn't seem to work.

@Bean
JwtGrantedAuthoritiesConverter jwtGrantedAuthoritiesConverter() {
        JwtGrantedAuthoritiesConverter converter = new JwtGrantedAuthoritiesConverter();
        converter.setAuthoritiesClaimName("permissions");

        return converter;
    }```
    

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the JwtGrantedAuthoritiesConverter configuration shown in the issue and the surrounding resource-server security configuration. Verify how the permissions claim is expected to be mapped and check the resulting authorities against the required authorization rules; done means the listed Auth0 permissions are recognized by the resource server.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
authorization, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.