Conversation
Implement foundational authentication features, including user and role management, JWT-based authentication, and role-based security configurations. Add REST endpoints for login, signup, and logout, along with a Dockerized development setup, CI/CD workflows, and logging configurations.
Implement foundational authentication features, including user and role management, JWT-based authentication, and role-based security configurations. Add REST endpoints for login, signup, and logout, along with a Dockerized development setup, CI/CD workflows, and logging configurations.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…oller.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…oller.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request integrates Redis caching support and updates the Docker configuration to include Redis along with related logging and CI/CD workflow improvements.
- Added new repository interfaces and model entities related to user authentication and token management.
- Updated Docker configuration to include Redis, Loki, Promtail, Grafana, and other related services.
Reviewed Changes
Copilot reviewed 29 out of 33 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/podzilla/auth/repository/RoleRepository.java | Added RoleRepository interface for role lookups. |
| src/main/java/com/podzilla/auth/repository/RefreshTokenRepository.java | Added RefreshTokenRepository for token management queries. |
| src/main/java/com/podzilla/auth/model/User.java | Introduced the User entity with associations for roles and tokens. |
| src/main/java/com/podzilla/auth/model/Role.java | Added Role entity with ERole enumeration support. |
| src/main/java/com/podzilla/auth/model/RefreshToken.java | Added RefreshToken entity with auditing support. |
| src/main/java/com/podzilla/auth/model/ERole.java | Defined user role constants as an enum. |
| src/main/java/com/podzilla/auth/dto/SignupRequest.java | Created DTO for user sign-up. |
| src/main/java/com/podzilla/auth/dto/LoginRequest.java | Created DTO for user login. |
| src/main/java/com/podzilla/auth/controller/* | Introduced authentication, resource, and admin controllers. |
| src/main/java/com/podzilla/auth/AuthApplication.java | Configures the application with caching enabled. |
| promtail-config.yml | Configured Promtail for log collection. |
| docker-compose.yml | Updated to add Redis and related service containers. |
| .github/workflows/* | Added CI/CD and linter workflow configurations. |
Files not reviewed (4)
- .gitattributes: Language not supported
- mvnw: Language not supported
- mvnw.cmd: Language not supported
- pom.xml: Language not supported
Comments suppressed due to low confidence (1)
src/main/java/com/podzilla/auth/model/RefreshToken.java:26
- Ensure that JPA auditing is enabled (e.g., by adding @EnableJpaAuditing in your main configuration) to support the @CreatedDate annotation functionality.
@EntityListeners(AuditingEntityListener.class)
…and RedisInsight to specific versions
…ervice # Conflicts: # src/main/java/com/podzilla/auth/service/CustomUserDetailsService.java
…and RedisInsight to specific versions
…rs; update .gitignore to exclude logs and sensitive files
… User and RefreshToken; enhance logout functionality to expire refresh tokens
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request adds Redis caching support to the authentication service and updates the Docker configuration to include a dedicated Redis caching service.
- Introduces new model, DTO, and exception classes for authentication workflows.
- Implements Redis caching by enabling caching annotations in the main application and adding a Redis service in the Docker Compose file.
- Updates CI/CD and linter GitHub workflows.
Reviewed Changes
Copilot reviewed 32 out of 36 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/podzilla/auth/model/RefreshToken.java | New entity for refresh tokens supporting caching/auditing. |
| src/main/java/com/podzilla/auth/model/ERole.java | Introduces user role enum. |
| src/main/java/com/podzilla/auth/exception/*.java | New custom exceptions and a global exception handler. |
| src/main/java/com/podzilla/auth/dto/*.java | DTOs for sign up and login endpoints. |
| src/main/java/com/podzilla/auth/controller/*.java | REST controllers for authentication and admin operations. |
| src/main/java/com/podzilla/auth/AuthApplication.java | Main application enabling caching. |
| promtail-config.yml | Logging configuration for Promtail. |
| docker-compose.yml | Adds/updates services: backend, Redis cache, DB, Loki, etc. |
| .github/workflows/linter.yml & ci-cd.yml | GitHub workflows for linting and CI/CD. |
Files not reviewed (4)
- .gitattributes: Language not supported
- mvnw: Language not supported
- mvnw.cmd: Language not supported
- pom.xml: Language not supported
…serDetails class, update login and registration logic, and configure Redis cache manager
…ervice # Conflicts: # src/main/java/com/podzilla/auth/service/CustomUserDetailsService.java
…and RedisInsight to specific versions
…rs; update .gitignore to exclude logs and sensitive files
… User and RefreshToken; enhance logout functionality to expire refresh tokens
…serDetails class, update login and registration logic, and configure Redis cache manager
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.
Add Redis caching support and update Docker configuration for Redis service