Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

create a JwtVerifyHandler based on handler.yml #30

Open
stevehu opened this issue Nov 30, 2018 · 1 comment
Open

create a JwtVerifyHandler based on handler.yml #30

stevehu opened this issue Nov 30, 2018 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@stevehu
Copy link
Contributor

stevehu commented Nov 30, 2018

As we know, we have JwtVerifyHandlers in each individual frameworks and they are responsible for verifying the JWT token in the request header to authorize the request. As the security requirement is defined in the specifications and each framework has its own spec format, that is why we have several implementations.

When light-router is used to secure backend services, it is very hard to create a combined specification for the router instance especially when backend services are implemented in different frameworks. Given there are a lot of extra works to bring the spec to the router instance, we have to find a simpler way to enforce security on the light-router instance.

With the handler module introduced recently to support multiple chains in the same instance and all the endpoints are defined in the handler.yml config file. We can enhance the handler module to put the JWT token scope in the path/method definition in the handler.yml and pass the info to the subsequent JwtVerifyHandler to verify it. This enables security at light-router without specification and makes the light-router more flexible in terms of usage.

What do you think?

@stevehu
Copy link
Contributor Author

stevehu commented Nov 30, 2018

Although this issue is opened here in the light-router repo, I think it should be implemented in light-4j so that the same handler can be shared between the light-proxy and the light-router.

@stevehu stevehu added enhancement New feature or request help wanted Extra attention is needed labels Feb 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant