Added documentation for S3 storage configuration

master
Mauro Mugnaini 7 months ago
parent 6368ed3a2d
commit e376213903

@ -19,29 +19,43 @@ To build the JAR artifact it is sufficient to type
mvn clean package
### Installation and configuration
### Installation
The type of the storage to be used is configured in the `org.gcube.keycloak.avatar.storage.AvatarStorageProviderFactory` file under the `META-INF/services/` folder of the module source/JAR.
To use the S3 persistence, the content of the file should be: `org.gcube.keycloak.avatar.storage.s3.MinioAvatarStorageProviderFactory`
To use the S3 persistence (default), the content of the file should be: `org.gcube.keycloak.avatar.storage.s3.MinioAvatarStorageProviderFactory`
#### Quarkus based Keycloak
In order to deploy the module it is sufficient to copy into the `[keycloak-home]/providers` folder.
#####
### Configuration
In order to configure the storage provider you have to add some lines to the `[keycloak-home]/conf/keycloak.conf` configuration file.
Let's see the specific setting for every provider.
#### Minio avatar storage provider
To configure the S3 endpoint, name and credentials you should use the following configuration lines:
spi-avatar-storage-avatar-storage-s3-server-url=[server-address]
spi-avatar-storage-avatar-storage-s3-access-key=[access-key]
spi-avatar-storage-avatar-storage-s3-secret-key=[secret-key]
spi-avatar-storage-avatar-storage-s3-root-bucket=[bucket-name]
#### File avatar storage provider
If you need to customize the folder where avatars images are saved (defaulting `[user-home]/avatar`) you can add the following line to the `[keycloak-home]/conf/keycloak.conf` file:
spi-avatar-storage-avatar-storage-file-avatar-folder=[full-path-to-the-avatar-folder]
( For example: `spi-avatar-storage-avatar-storage-file-avatar-folder=/opt/keycloak/avatar` )
(For example: `spi-avatar-storage-avatar-storage-file-avatar-folder=/opt/keycloak/avatar` )
By default the `username` of the user is used as a filename for the image into the filesystem but is possible to use the user's email simply adding the following line in the previously seen configuration file:
spi-avatar-storage-avatar-storage-file-use-email-as-filename=true
## Change log
See [CHANGELOG.md](CHANGELOG.md).

Loading…
Cancel
Save