Media Service
The media service provides the bounded context Media.
It is responsible for managing media files such as images.
The media services uses a Nginx reverse proxy to make the fixed domain of MinIO pre-signed URLs configurable through environment variables.
A pre-signed URL is used as a reference to a specific media. It is generated for each Media entity when the path attribute is requested.
This is necessary for access control to specific media files. A Media entity cannot be queried by a user client directly.
It is used in within the service mesh by other services to reference medias in the services datatypes.
Pre-signed URLs link media to authenticated service datatypes, chaining authentication. Each request of the path attribute on Media generates a new pre-signed URL with a limited validity duration.
In other words, presigned URLS are generated automatically without any interference and attachments will always vanish once the presigned URL is no longer valid
The service parses the following environment variables:
MINIO_ENDPOINT: configurable domain of the MinIO instance.PATH_EXPIRATION_TIME: validity duration of MinIO pre-signed URLs in seconds. A resource can no longer be reached under the pre-signed URL after the pre-signed URL is expired.PROXY_PATH: path to include in the pre-signed URLs.
Domain Model
Technology Stack
- Language: Rust
- Framework: axum
- GraphQL Library: async_graphql
- Database: MinIO
- Reverse Proxy: Nginx nginx
Events
This section lists events that are defined or used by the media service.
Published Events
media/media/created
This event is published when a media is created.
{
id: string;
}