Skip to content

Team 10 ase 39 disable csrf#13

Merged
davidclarafigueiredo merged 14 commits intomainfrom
team-10-ASE-39
Sep 24, 2025
Merged

Team 10 ase 39 disable csrf#13
davidclarafigueiredo merged 14 commits intomainfrom
team-10-ASE-39

Conversation

@davidclarafigueiredo
Copy link
Copy Markdown
Contributor

disabled csrf since we dont use cookie auth and it only makes trouble

Copilot AI review requested due to automatic review settings September 23, 2025 22:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements JWT-based OAuth2 authentication with Keycloak integration and disables CSRF protection. The changes introduce a complete security configuration that replaces cookie-based authentication with token-based authentication.

  • Adds OAuth2 resource server configuration with JWT support
  • Implements role-based authorization using Keycloak realm roles
  • Creates security configuration that disables CSRF for API endpoints

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/main/resources/application.yaml Adds OAuth2 JWT configuration and server port
src/main/java/com/ase/userservice/security/SecurityConfig.java Implements security filter chain with CSRF disabled and JWT authentication
src/main/java/com/ase/userservice/security/JwtAuthConverter.java Converts JWT claims to Spring Security authorities
src/main/java/com/ase/userservice/controllers/DemoController.java Adds demo endpoint for testing role-based access
pom.xml Adds Spring Security and OAuth2 resource server dependencies
Dockerfile Creates containerized deployment configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@davidclarafigueiredo davidclarafigueiredo merged commit 78443f9 into main Sep 24, 2025
3 of 5 checks passed
@LucaSchmitz2003 LucaSchmitz2003 deleted the team-10-ASE-39 branch September 24, 2025 08:40
davidclarafigueiredo pushed a commit that referenced this pull request Oct 17, 2025
* pls fix

* pls fix

* pls fix?

* pls fix?

* remove accident changes

* pls fix?

* only deploy on main

* please let this work 🙏

* revert changes

* fix
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

Successfully merging this pull request may close these issues.

5 participants