The Metadata-Service
is a component of the Superb Data Kraken Platform (SDK).
It offers a REST API for OpenSearch resources management, including indices, roles, and role mappings. It supports CRUD operations and implements permissions
and access controls for data security.
For a more detailed understanding of the broader context of the platform this project is used in, refer to the architecture documentation.
For instructions on how to deploy the Metadata-Service on an instance of the SDK, refer to the installation instructions.
Refer to index.md for more detailed but deployment specific documentation.
Follow the instructions below to set up a local copy of the project for development and testing.
- jdk >= 17
- Maven 3.6.x (if you're not using the Maven wrapper)
- A running OpenSearch instance
- A running OIDC/OAuth2 provider instance
- A running Kafka instance
- sdk-common package
To set up your local environment for development and testing, follow these steps:
- Clone the repository:
git clone https://github.com/EFS-OpenSource/superb-data-kraken-metadata.git cd superb-data-kraken-metadata
- Set up the service configuration:
Configure the
cp src/main/resources/application-local-template.yml src/main/resources/application-local.yaml
application-local.yaml
file based on your local development setup. The OpenSearch instance and the OIDC provider instance need to be configured correctly for the metadata service to run as expected. - Run the service:
./mvnw spring-boot:run -Dspring-boot:run.profiles=local
- After successful setup, you can test the service using the auto-generated API documentation at:
https://localhost:8091/metadata/swagger-ui/index.html
sdk.oauth2.config-url
: Specifies the URL pointing to the OpenID Connect discovery document. This URL provides essential configuration details for OAuth2 and OpenID Connect operations, enabling dynamic discovery of authentication server endpoints and supported features. It's instrumental in configuring the OAuth2-based security settings within the Spring Boot application's security plugin.- Replace all placeholders enclosed in
$()
, e.g.:REALM
: the specific realm set up with the openid connect (oidc) provider.CLIENT_ID
: the unique identifier for the service account that the service utilizes.
Here are the essential commands you'll need to use the service:
- Build the service:
./mvnw package
- Executing the tests alone:
./mvnw test
- Run the metadata-service:
./mvnw spring-boot:run -Dspring-boot:run.profiles=local
- Build the service Docker image:
docker build -t sdk/metadata-service .
See the Contribution Guide.
See the Changelog.