-
Notifications
You must be signed in to change notification settings - Fork 0
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
Auth role Integratefor User Service Communication in Authentication Service #3
Conversation
…cation without creating an entity in the Payment Service.
Added invoiceId as a UUID to reference invoices managed by the Invoice Service. Maintained the paymentGateway field to identify the external payment gateway used.
…on annotations - Added CardPaymentRequest class to handle card payment input. - Applied Jakarta Bean Validation annotations (@notblank, @pattern) for data validation. - Updated project dependencies to include Hibernate Validator and Jakarta Validation API. - Ensured proper validation handling in PaymentController with @Valid annotation.
…entRequest using builder()
- Implemented Kafka producer configuration in the `KafkaProducerConfig` class. - Added `ProducerFactory` bean for creating Kafka producer instances with custom configurations. - Configured `KafkaTemplate` bean for interacting with Kafka topics. - Set up default configurations for Kafka producer, including: - Bootstrap server: `localhost:9092` - Key and value serializers: `StringSerializer` This configuration allows the application to send messages to Kafka topics.
- Added `KafkaProducerService` to handle message publishing to Kafka topics. - Injected `KafkaTemplate` for seamless interaction with Kafka. - Created a `sendMessage` method to publish messages to a specified Kafka topic. This service abstracts Kafka message publishing, promoting reusability and simplicity across the application.
- Implemented `registerUser` method in the controller to handle user registration requests. - Validates email uniqueness before saving the user. - Automatically assigns a default role (ROLE_USER) to new users. - Publishes a user registration event to the Kafka topic `user-registration`. - Returns a `UserResponse` with user details upon successful registration. This feature enhances user registration functionality and integrates event-driven messaging for improved system extensibility.
- Configured Kafka consumer with `DefaultKafkaConsumerFactory` for the `auth-service` group. - Set up message deserialization using `StringDeserializer`. - Added a `ConcurrentMessageListenerContainer` to listen to the `user-registration` topic. - Prepared the configuration for handling user registration events via Kafka. This configuration enables the authentication service to process user-related events for seamless integration across services.
- Add UserController with registration, profile, and role assignment endpoints. - Configure security for UserService with role-based access control and JWT support. - Implement UserService for managing users, roles, and password encoding. - Add AuthController for user login and JWT token generation. - Configure AuthenticationService security with JwtAuthenticationFilter and stateless sessions. - Integrate UserServiceClient in AuthenticationService for fetching user details. - Include DTOs for UserService and AuthenticationService to standardize data transfer.
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
13669044 | Triggered | Username Password | 07a2456 | payment-service/src/main/resources/application.yml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
The Authentication Service no longer accesses the user database directly. Ensure the User Service is running and reachable for proper functioning. |
Communication between the User Service and Authentication Service to replace direct database access in the Authentication Service. This change ensures better modularity, scalability, and performance, which are critical for a secure and robust banking application.