diff --git a/.github/workflows/kanidm_book.yml b/.github/workflows/kanidm_book.yml index 0361c437e..6b18737ce 100644 --- a/.github/workflows/kanidm_book.yml +++ b/.github/workflows/kanidm_book.yml @@ -44,4 +44,4 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs - destination_dir: ./docs \ No newline at end of file + destination_dir: ./docs diff --git a/kanidm_book/src/server_configuration.md b/kanidm_book/src/server_configuration.md index 989b2ecf3..4a865740d 100644 --- a/kanidm_book/src/server_configuration.md +++ b/kanidm_book/src/server_configuration.md @@ -42,16 +42,16 @@ You will also need a config file in the volume named `server.toml` (Within the c # # The role of this server. This affects features available and how replication may interact. # Valid roles are: - # - write_replica + # - WriteReplica # This server provides all functionality of Kanidm. It allows authentication, writes, and # the web user interface to be served. - # - write_replica_no_ui - # This server is the same as a write_replica, but does NOT offer the web user interface. - # - read_only_replica + # - WriteReplicaNoUI + # This server is the same as a WriteReplica, but does NOT offer the web user interface. + # - ReadOnlyReplica # This server will not writes initiated by clients. It supports authentication and reads, # and must have a replication agreement as a source of it's data. - # Defaults to "write_replica". - # role = "write_replica" + # Defaults to "WriteReplica". + # role = "WriteReplica" An example is located in [examples/server.toml](../../examples/server.toml). diff --git a/kanidm_rlm_python/Dockerfile b/kanidm_rlm_python/Dockerfile index d53904d50..82f1a6f78 100644 --- a/kanidm_rlm_python/Dockerfile +++ b/kanidm_rlm_python/Dockerfile @@ -1,5 +1,5 @@ FROM opensuse/leap:latest -MAINTAINER william@blackhats.net.au +LABEL org.opencontainers.image.authors="william@blackhats.net.au" EXPOSE 1812 1813 diff --git a/kanidmd/src/lib/config.rs b/kanidmd/src/lib/config.rs index c8e768de1..c3add0423 100644 --- a/kanidmd/src/lib/config.rs +++ b/kanidmd/src/lib/config.rs @@ -33,6 +33,16 @@ impl Default for ServerRole { } } +impl ToString for ServerRole { + fn to_string(&self) -> String { + match self { + ServerRole::WriteReplica => "write replica".to_string(), + ServerRole::WriteReplicaNoUI => "write replica (no ui)".to_string(), + ServerRole::ReadOnlyReplica => "read only replica".to_string(), + } + } +} + impl FromStr for ServerRole { type Err = &'static str; @@ -85,6 +95,7 @@ impl fmt::Display for Configuration { Some(u) => write!(f, "with log_level: {:x}, ", u), None => write!(f, "with log_level: default, "), }) + .and_then(|_| write!(f, "role: {}, ", self.role.to_string())) .and_then(|_| { write!( f,