To secure API resources in Ballerina, according to the doc, I can put scope like
so if in JWT scope is not listed resource can't be invoked
@http:ResourceConfig {
auth: [
{
jwtValidatorConfig: config,
scopes: ["br_smk_gnt"]
}
]
}
isolated resource function post brewery(...)
{. ...... }
So, related to story, Asgardio scopes are responsible to bring attributes from the user profile. When I create JWT in the request payload I can put any scope, with no limitation (based on my roles or permission) so I miss seeing how the scope brings extra security by restricting which user can call which resource ?!?