Skip to content

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

7 watching

Forks

Latest commit

 

History

289 Commits

Folders and files

Repository files navigation

Directory Server

Actions Status Coverage Status MPL-2.0 License

Description

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 (see Permission Levels below). 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 CREATED or DELETING.
  • Notify other microservices via RabbitMQ whenever the directory tree changes (element added, renamed, moved, deleted).

Permission Levels

Permissions are hierarchical: each level includes the rights granted by the levels below it.

  • READ: allows browsing the directory and its content.
  • WRITE: includes READ, and additionally allows modifying the directory's content (create, rename, move, duplicate, delete elements).
  • MANAGE: includes WRITE, and additionally allows granting or revoking READ / WRITE / MANAGE permissions to other users or user groups on that directory. The directory owner is automatically granted MANAGE permission.

Technical Stack

  • 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

Development Scripts

Build Docker image:

mvn install -DskipTests -Dpowsybl.docker.install

Please 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.


Interactions with Other Microservices

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)

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

7 watching

Forks

Releases

Packages

Contributors

Languages