The directory-server is a microservice of the GridSuite platform dedicated to managing the hierarchical directory tree in which all user resources (studies, contingency lists, filters, …) are organised, along with the access permissions controlling who can browse or modify each directory.
It provides the following capabilities:
- Manage root directories and sub-directories: create, rename, delete, and move directories in a tree structure.
- Manage directory elements: insert, update, duplicate, move, and delete elements of any type (study, filter, contingency list, …) referenced by their UUID.
- Enforce access permissions: each directory carries READ / WRITE / MANAGE permission sets. Only users (or user groups) with the appropriate permission can browse or modify a directory and its contents.
- Resolve element paths: retrieve the full ancestor path of any element up to the root directory.
- Search elements full-text across the tree using an Elasticsearch index.
- Update element status: mark elements (and all their descendants) as
CREATEDorDELETING. - Notify other microservices via RabbitMQ whenever the directory tree changes (element added, renamed, moved, deleted).
- Spring Boot (Web, Data JPA, Actuator, Cloud Stream)
- PostgreSQL + Liquibase
- Elasticsearch (
spring-data-elasticsearch) - RabbitMQ via Spring Cloud Stream
- API documentation: OpenAPI / Swagger (
springdoc) - Micrometer / Prometheus
Build Docker image:
mvn install -DskipTests -Dpowsybl.docker.installPlease read liquibase usage for instructions to automatically generate changesets. After you generated a changeset do not forget to add it to git and in src/main/resources/db/changelog/db.changelog-master.yml.
The directory-server publishes messages on RabbitMQ and calls user-admin-server to resolve user groups for permission checks.
┌──────────────────────┐
│ directory-server │──► user-admin-server (resolve user groups for permission checks)
└──────────────────────┘
▼
RabbitMQ (publishDirectoryUpdate — emitted on every directory or element change)