From 0a924225aca4404ad0826bf1bf469d25863ffbaa Mon Sep 17 00:00:00 2001 From: Mauro Mugnaini Date: Tue, 10 Oct 2023 15:40:40 +0200 Subject: [PATCH] Fixed/updated documentation --- avatar-importer/README.md | 14 ++++++++++++-- avatar-realm-resource/README.md | 12 +++++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/avatar-importer/README.md b/avatar-importer/README.md index b291ec9..82a0b19 100644 --- a/avatar-importer/README.md +++ b/avatar-importer/README.md @@ -16,7 +16,7 @@ The source code is present in `src` folder. ## Documentation -This is one of the modules that composes the EAR deployment defined in the "brother" module [keycloak-d4science-bundle](../keycloak-d4science-bundle/README.md). +This is one of the modules that composes the (DEPRECATED) EAR deployment defined in the "brother" module [keycloak-d4science-bundle](../keycloak-d4science-bundle/README.md). To build the module's JAR file it is sufficient to type @@ -24,10 +24,20 @@ To build the module's JAR file it is sufficient to type ### Installation -#### Qurkus based Keycloak +#### Quarkus based Keycloak In order to deploy the module it is sufficient to copy into the `[keycloak-home]/providers` folder. +### Configuration + +Once deployed, the mapper must be enabled for the realm in the specific Identity Provider Mappers. + +Specific settings are present: + +- **`Use Libravatar service`**: Enable or not the avatar discovery on the libravatar (gravatar) service + +- **`Import avatar in a separate thread`**: the import of the avatar will be performed asynch in a separate thread to improve speed during a new identity import + ## Change log See [CHANGELOG.md](CHANGELOG.md). diff --git a/avatar-realm-resource/README.md b/avatar-realm-resource/README.md index fd8ddc4..08dc41e 100644 --- a/avatar-realm-resource/README.md +++ b/avatar-realm-resource/README.md @@ -1,6 +1,6 @@ # Avatar Realm Resource -**Avatar Realm Resource** defines the new avatar resource inside Keycloak and exposes it on REST, implements the SPI defined in the `avatar-storage` module to store avatars on file system or in an user's property; the last option is discouraged since the DB's property mapping could be limited by the JDBC driver/JPA settings/DB defaults. +**Avatar Realm Resource** defines the new avatar resource inside Keycloak and exposes it on REST, implements the SPI defined in the `avatar-storage` module to store avatars on a S3 persistence, on file system or in an user's property; the use of the last option is discouraged since the DB's property mapping could be limited by the JDBC driver/JPA settings/DB defaults. ## Structure of the project @@ -13,7 +13,7 @@ The source code is present in `src` folder. ## Documentation -This is one of the modules that composes the EAR deployment defined in the "brother" module [keycloak-d4science-spi](../keycloak-d4science-spi-ear/README.md). +This is one of the modules that composes the (DEPRECATED) EAR deployment defined in the "brother" module [keycloak-d4science-spi](../keycloak-d4science-spi-ear/README.md). To build the JAR artifact it is sufficient to type @@ -21,10 +21,16 @@ To build the JAR artifact it is sufficient to type ### Installation and configuration -#### Qurkus based Keycloak +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` + +#### Quarkus based Keycloak In order to deploy the module it is sufficient to copy into the `[keycloak-home]/providers` folder. +##### + 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]