Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JWT authentication is not denying the request when authorization header is not supplied #16

Open
jeevaengg21 opened this issue Sep 14, 2020 · 2 comments

Comments

@jeevaengg21
Copy link

To understand the JWT authentication implementation standard I have tried out Kumuluzee with Microservice 3.3

The sample is working fine with valid JWT token as excepted without issues. But the weird behavior noticed was the target endpoint is still accessible without passing the "Authorization": "Bearer XXXXXX" header. Is there an additional configuration is required to enforce the authorization header mandatory for JWT authentication implementation.

Application Endpoint:

@ApplicationPath("/data")
@LoginConfig(authMethod = "MP-JWT")
@DeclareRoles({"protected"})
public class DemoRestApplication extends Application {
}

Kumuluzee config:

kumuluzee:
  name: demo
  version: 1.0-SNAPSHOT
  env:
    name: dev
  jwt-auth:
    public-key: XXXXXXX
    issuer: https://server.example.com
  server:
    http:
      port: 8180

image

@jeevaengg21 jeevaengg21 changed the title Microservice - JWT authentication is working with out authorization header JWT authentication is not denying the request when authorization header is not supplied Sep 14, 2020
@zvonegit
Copy link

It seems this is the same issue as #12 which was resolved with version v1.1.3.

The current version of KumuluzEE - v3.10.0 uses jwt v1.1.2 where the issue is still present. We are releasing KumuluzEE v3.11.0 which will use the latest version of jwt library v1.1.3.

@zvonegit
Copy link

@jeevaengg21, KumuluzEE version v3.11.0 is now released. The new version uses JWT Auth v1.1.3 which should resolve your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants