{"id":27689525,"url":"https://github.com/microprofile/microprofile-jwt-bridge","last_synced_at":"2025-04-25T10:15:51.550Z","repository":{"id":194148288,"uuid":"688533594","full_name":"microprofile/microprofile-jwt-bridge","owner":"microprofile","description":"microprofile-jwt-bridge","archived":false,"fork":false,"pushed_at":"2024-01-29T13:55:14.000Z","size":77,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":32,"default_branch":"main","last_synced_at":"2025-04-25T10:15:48.272Z","etag":null,"topics":["jwt","microprofile"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microprofile.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":"CONTRIBUTING.adoc","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-07T14:43:39.000Z","updated_at":"2025-01-30T20:29:09.000Z","dependencies_parsed_at":"2023-09-12T03:39:27.831Z","dependency_job_id":"da2e9e07-eff2-4636-a51a-5935f5bb027f","html_url":"https://github.com/microprofile/microprofile-jwt-bridge","commit_stats":null,"previous_names":["eclipse/microprofile-jwtbridge","eclipse/microprofile-jwt-bridge","microprofile/microprofile-jwt-bridge"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microprofile%2Fmicroprofile-jwt-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microprofile%2Fmicroprofile-jwt-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microprofile%2Fmicroprofile-jwt-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microprofile%2Fmicroprofile-jwt-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microprofile","download_url":"https://codeload.github.com/microprofile/microprofile-jwt-bridge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250796358,"owners_count":21488712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jwt","microprofile"],"created_at":"2025-04-25T10:15:50.578Z","updated_at":"2025-04-25T10:15:51.544Z","avatar_url":"https://github.com/microprofile.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MicroProfile JWT Bridge\n\n## Introduction\n\nThis specification enables mapping MicroProfile JWT tokens to Jakarta EE container APIs not included in the MicroProfile umbrella and provides a place where Jakarta EE specifications, such as Jakarta Security, can build requirements and seamless integrations with MicroProfile JWT.\n\nIn order not to introduce circular dependencies, this specification is to be created with the following scopes:\n\n* Define the annotations to working with JWT authentication mechanisms such as how to configure the JWT claims. \n\n* Spec language would be added to state: Format of the JWT must comply with MP spec. Validation and handling of the JWT must comply with MP spec. \n\n* Move the optional section of MP JWT to the new bridge spec together with TCKs. \n\n* This specification is not limited to only Jakarta Security, and it may also include other relevant technologies.\n\n## Proposal\n\n* Define the Java language annotations to working with JWT authentication mechanisms such as how to configure the JWT claims.\n`JwtAuthenticationMechanismDefinition` accepts a full set of properties mapped to MP JWT properties\nE.g. `@JwtClaimsVerification` issuer maps `mp.jwt.verify.issuer`\n* Spec language would be added to state:\nFormat of the JWT must comply with MP spec.\nValidation and handling of the JWT must comply with MP spec.\nConfig must be accepted via annotation, however implementers may provide other methods of supplying config\nApplication code can access JWT claims by injecting the Jakarta SecurityContext\nImplementation could utilize MP JWT under the covers, accept MP config, allow injection of MP JsonWebToken.\nUsage is demonstrated below.\n\n```\n@JwtAuthenticationMechanismDefinition(\n    jwtClaimsDefinition = @JwtClaimsDefinition(callerNameClaim = \"upn\", callerGroupsClaim = \"groups\"),\n    publicKeyDefinition = @PublicKeyDefinition(key = \"\", location = \"\", algorithm = \"RS256\"),\n    decryptionKeyDefinition = @PrivateKeyDefinition(location = \"\", algorithm = \"\"),\n    jwtClaimsVerification = @JwtClaimsVerification(issuer = \"\", audiences = \"\", tokenAge = 0, tokenAgeExpression = \"\", clockSkew = 0, clockSkewExpression = \"\"),\n    httpHeadersDefinition = @HttpHeadersDefinition(tokenHeader = \"Authorization\", cookieName = \"Bearer\"),\n    jwksDefinition = @JwksDefinition(jwksConnectTimeout = 500, jwksConnectTimeoutExpression = \"\", jwksReadTimeout = 500, jwksReadTimeoutExpression = \"\"))\npublic class JwtSecuredServlet extends HttpServlet {\n\n    @Inject jakarta.security.enterprise.SecurityContext securityContext;\n\n    @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n        // example of getting JWT claims from Jakarta SecurityContext\n        jakarta.security.enterprise.identitystore.openid.JwtClaims jwtClaims = securityContext.getPrincipalsByType(...);\n    }\n}\n```\n* Move the optional section of MP JWT to the new bridge spec together with TCKs\n\n## Documentation\n\nFor links to the latest maven artifacts, Javadoc and specification document, see the link:https://github.com/eclipse/microprofile-jwt-bridge/releases/latest[latest release].\n\n## Project Links\n* https://wiki.eclipse.org/MicroProfile/JWT_Bridge[Wiki Page]\n* https://docs.google.com/document/d/13nIVDJ6uxen7d57rxyARX8-vqsf3HTvC6hHnhitGZ0w/edit[Hangout Meeting Notes]\n\n### Continuous Integration\n* https://ci.eclipse.org/microprofile/job/jwt-bridge-maven-snapshots/[Snapshot Build Jobs]\n* https://ci.eclipse.org/microprofile/job/MicroProfile%20Releases/[Release Build Jobs]\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicroprofile%2Fmicroprofile-jwt-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicroprofile%2Fmicroprofile-jwt-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicroprofile%2Fmicroprofile-jwt-bridge/lists"}