Team 10 ase 39 rbac for endpoints#9
Merged
davidclarafigueiredo merged 15 commits intomainfrom Sep 22, 2025
Merged
Conversation
we just copy-pasted the code from the tutorial and hope that it works
LucaSchmitz2003
commented
Sep 11, 2025
src/main/java/com/ase/userservice/security/JwtAuthConverter.java
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds OAuth2 JWT authentication with Keycloak integration to the Spring Boot user service. The changes implement role-based access control using JWT tokens from a Keycloak realm.
- Configures OAuth2 resource server with JWT authentication using Keycloak
- Implements custom JWT authentication converter for role extraction and mapping
- Adds role-based endpoint protection with a demo controller for testing
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/application.yaml | Adds OAuth2 JWT configuration with Keycloak issuer and JWK set URIs, sets server port |
| src/main/java/com/ase/userservice/security/SecurityConfig.java | Configures security filter chain with role-based authorization and JWT authentication |
| src/main/java/com/ase/userservice/security/JwtAuthConverter.java | Custom converter to extract roles from JWT claims and map them to Spring Security authorities |
| src/main/java/com/ase/userservice/controllers/DemoController.java | Simple demo controller with role-protected endpoint for testing authentication |
| pom.xml | Adds Spring Security and OAuth2 resource server dependencies |
| Dockerfile | Configures Docker container for running the Spring Boot application |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/main/java/com/ase/userservice/security/JwtAuthConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/ase/userservice/security/JwtAuthConverter.java
Outdated
Show resolved
Hide resolved
…et roles, need to add jwt mapping to model
the formatter uses some kind of formatting i cant properly understand on my machine using the redhat java formatter.
davidclarafigueiredo
approved these changes
Sep 22, 2025
davidclarafigueiredo
pushed a commit
that referenced
this pull request
Oct 17, 2025
* change deployment url * fix deployment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.