diff --git a/site/.gitignore b/site/.gitignore index 229aaada6..86c6bcd0a 100644 --- a/site/.gitignore +++ b/site/.gitignore @@ -8,6 +8,7 @@ node_modules package.json package-lock.json # themes +themes themes/hugo-material-docs # hugo public diff --git a/site/content/guides/multitenancy.md b/site/content/guides/multitenancy.md new file mode 100644 index 000000000..11a426a3a --- /dev/null +++ b/site/content/guides/multitenancy.md @@ -0,0 +1,46 @@ +--- +title: Multi-tenancy +parent: Guides +weight: 32 +--- + +hawkBit is able to support with multiple tenants with some constraints. This guide provides insights in the basic concepts and how to setup your multiple tenants. + + +## Big picture + +Multi-tenancy is a core concept of hawkBit. It is supported by providing hawkBit authentication system supporting tenants as well as by using EclipseLink and Hibernate native multi-tenant support. + +The tenant and user management, however, is only static. This means you shall configure all tenants and users into spring configurations. + +The tenant and user management could be extended to be more flexible - e.g. dynamic management, OAuth and so on. This however is left for integrators for specific use cases. + +## Constraints +* static tenant and user management +* configuration only via TenantAwareUserProperties#user configuration (i.e. hawkbit.security.user properties), hence +* username is unique for the whole system - there could not be same username for different tenants +* in order to create dynamically tenants when user is logged in you shall set hawkbit.server.repository.implicitTenantCreateAllowed=true, + +## Example + +```properties +# allow to auto/implicit create DEFAULT tenant (on mgmt api call) +hawkbit.server.repository.implicitTenantCreateAllowed=true +# setup foo tenant with two users john and smith_on_foo +hawkbit.security.user.john.tenant=foo +hawkbit.security.user.john.password={noop}john_password +hawkbit.security.user.john.roles=TENANT_ADMIN +hawkbit.security.user.smith_on_foo.tenant=foo +hawkbit.security.user.smith_on_foo.password={noop}smith_password +hawkbit.security.user.smith_on_foo.roles=TENANT_ADMIN +# setup bar tenant with single user smith_on_bar +hawkbit.security.user.smith_on_bar.tenant=bar +hawkbit.security.user.smith_on_bar.password={noop}smith_password +hawkbit.security.user.smith_on_bar.roles=TENANT_ADMIN +``` +This example creates two tenants foo and bar: +* foo has two users john and smith_on_foo + * john/john_password + * smith_on_foo/smith_password +* bar has single user smith_on_bar (it is again smith but since the user smith user could not be used for both tenants foo we need to use different username) + * smith_on_bar/smith_password diff --git a/site/layouts/partials/header.html b/site/layouts/partials/header.html index 3929a8ee3..1be1c3ac1 100755 --- a/site/layouts/partials/header.html +++ b/site/layouts/partials/header.html @@ -11,25 +11,25 @@ - {{ with .Site.Social.twitter }} + {{ with .Site.Params.Social.twitter }}
{{ end }} - {{ with .Site.Social.github }} + {{ with .Site.Params.Social.github }}
{{ end }} - {{ with .Site.Social.gitter }} + {{ with .Site.Params.Social.gitter }}
{{ end }} - {{ with .Site.Social.docker }} + {{ with .Site.Params.Social.docker }}
diff --git a/site/themes/hugo-material-docs b/site/themes/hugo-material-docs deleted file mode 160000 index 9dbd25cf9..000000000 --- a/site/themes/hugo-material-docs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9dbd25cf9474f3a8bc4c09ec4c7965c8fdee9a5f