Skip to content
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

Refactor LDAP account creation functionality for better separation of concerns #72

Merged
merged 1 commit into from
Nov 4, 2023

Conversation

groldan
Copy link
Member

@groldan groldan commented Nov 4, 2023

  • Account creation self contained at the org.georchestra.gateway.accounts.* packages. Use an application event to decouple account creation from OAuth2 configurations and beans.

  • Decouple RabbitMQ events from OAuth2 and Accounts creation functionality. Introduce RabbitmqAccountCreatedEventSender as an application level event listener for account creation events, and bridge them to the RabbitMQ queue.

  • Define rabbitmq config properties under georchestra.gateway.security.events.rabbitmq.*

Use spring-boot friendly configuration properties to enable and configure rabbitmq event dispatching, defaulting to root level properties usually coming from geOrchestra's default.properties to be shared with the console application.

  georchestra:
    gateway:
      security:
        events:
          rabbitmq:
            # Note usually enableRabbitmqEvents, rabbitmqHost, etc. come from georchestra's default.properties
            enabled: ${enableRabbitmqEvents:false}
            host: ${rabbitmqHost}
            port: ${rabbitmqPort}
            user: ${rabbitmqUser}
            password: ${rabbitmqPassword}

… concerns

* Account creation self contained at the `org.georchestra.gateway.accounts.*`
  packages. Use an application event to decouple account creation from
  OAuth2 configurations and beans.

* Decouple RabbitMQ events from OAuth2 and Accounts creation
  functionality. Introduce `RabbitmqAccountCreatedEventSender` as an
  application level event listener for account creation events, and
  bridge them to the RabbitMQ queue.

* Define rabbitmq config properties under georchestra.gateway.security.events.rabbitmq.*

Use spring-boot friendly configuration properties to enable and
configure rabbitmq event dispatching, defaulting to root level
properties usually coming from geOrchestra's `default.properties` to be
shared with the console application.

```
  georchestra:
    gateway:
      security:
        events:
          rabbitmq:
            # Note usually enableRabbitmqEvents, rabbitmqHost, etc. come from georchestra's default.properties
            enabled: ${enableRabbitmqEvents:false}
            host: ${rabbitmqHost}
            port: ${rabbitmqPort}
            user: ${rabbitmqUser}
            password: ${rabbitmqPassword}
```

Co-authored-by: marwanehcine <marwane.benhcine@camptocamp.com>
Co-authored-by: Pierre Mauduit <pierre.mauduit@camptocamp.com>
Co-authored-by: Emmanuel Durin <emmanuel.durin@camptocamp.com>
@groldan
Copy link
Member Author

groldan commented Nov 4, 2023

Note this is all the refactoring work performed as part of #63 that's not strictly related to the new feature of supporting request headers pre-authentication itself

@groldan groldan merged commit 53622b9 into main Nov 4, 2023
3 checks passed
@groldan groldan deleted the refactoring_accounts_creation_and_rabbitmq branch November 4, 2023 01:07
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.

None yet

1 participant