From 57b91eb128aceb4a0c04acdef6cc1b5efced10af Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Fri, 5 Jun 2020 15:51:21 +0100 Subject: [PATCH 01/27] docs(terminology.md): grammar and clarity Improved grammar and clarified some points. --- docs/terminology.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/terminology.md b/docs/terminology.md index 1b345e079..db3e72947 100644 --- a/docs/terminology.md +++ b/docs/terminology.md @@ -1,27 +1,27 @@ ### Policy -A Policy is at a base level a yes/no gate. It will either evaluate to True or False depending on the Policy Kind and settings. For example, a "Group Membership Policy" evaluates to True if the User is member of the specified Group and False if not. This can be used to conditionally apply Stages, grant/deny access to various objects and is also used for other custom logic. +At a base level a policy is a yes/no gate. It will either evaluate to True or False depending on the Policy Kind and settings. For example, a "Group Membership Policy" evaluates to True if the user is member of the specified Group and False if not. This can be used to conditionally apply Stages, grant/deny access to various objects, and for other custom logic. ### Provider -A Provider is a way for other Applications to authenticate against passbook. Common Providers are OpenID Connect (OIDC) and SAML. +A Provider is a way for other applications to authenticate against passbook. Common Providers are OpenID Connect (OIDC) and SAML. ### Source -Sources are ways to get users into passbook. This might be an LDAP Connection to import Users from Active Directory, or an OAuth2 Connection to allow Social Logins. +Sources are locations from which users can be added to passbook. For example, an LDAP Connection to import Users from Active Directory, or an OAuth2 Connection to allow Social Logins. ### Application An application links together Policies with a Provider, allowing you to control access. It also holds Information like UI Name, Icon and more. -### Flows - -Flows are a method of describing a sequence of stages. These flows can be used to defined how a user authenticates, enrolls, etc. - ### Stages -A stage represents a single verification or logic step. They are used to authenticate users, enroll them, and more. These stages can optionally be applied to a flow via policies. +A stage represents a single verification or logic step. They are used to authenticate users, enroll users, and more. These stages can optionally be applied to a flow via policies. + +### Flows + +Flows are an ordered sequence of stages. These flows can be used to define how a user authenticates, enrolls, etc. ### Property Mappings -Property Mappings allow you to make Information available for external Applications. For example, if you want to login to AWS with passbook, you'd use Property Mappings to set the User's Roles based on their Groups. +Property Mappings allow you to make information available for external applications. For example, if you want to login to AWS with passbook, you'd use Property Mappings to set the user's roles in AWS based on their group memberships in passbook. From c4d7d0213f67eaf4cbfe3f20066d8470c77331cb Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 16:59:01 +0100 Subject: [PATCH 02/27] docs(docker-compose.md): grammar and clarity Improved grammar and clarified some points. --- docs/installation/docker-compose.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/installation/docker-compose.md b/docs/installation/docker-compose.md index 76b4a6a27..c8b08cce7 100644 --- a/docs/installation/docker-compose.md +++ b/docs/installation/docker-compose.md @@ -1,6 +1,6 @@ # docker-compose -This installation Method is for test-setups and small-scale productive setups. +This installation method is for test-setups and small-scale productive setups. ## Prerequisites @@ -11,16 +11,16 @@ This installation Method is for test-setups and small-scale productive setups. Download the latest `docker-compose.yml` from [here](https://raw.githubusercontent.com/BeryJu/passbook/master/docker-compose.yml). Place it in a directory of your choice. -passbook needs to know it's primary URL to create links in E-Mails and set cookies, so you have to run the following command: +passbook needs to know it's primary URL to create links in e-mails and set cookies, so you have to run the following command: ``` export PASSBOOK_DOMAIN=domain.tld # this can be any domain or IP, it just needs to point to passbook. ``` -The compose file references the current latest version, which can be overridden with the `SERVER_TAG` Environment variable. +The compose file references the current latest version, which can be overridden with the `SERVER_TAG` environment variable. -If you plan to use this setup for production, it is also advised to change the PostgreSQL Password by setting `PG_PASS` to a password of your choice. +If you plan to use this setup for production, it is also advised to change the PostgreSQL password by setting `PG_PASS` to a password of your choice. Now you can pull the Docker images needed by running `docker-compose pull`. After this has finished, run `docker-compose up -d` to start passbook. -passbook will then be reachable on Port 80. You can optionally configure the packaged traefik to use Let's Encrypt for TLS Encryption. +passbook will then be reachable on port 80. You can optionally configure the packaged traefik to use Let's Encrypt certificates for TLS Encryption. From 96c41f399eca6da60766203aa3e443b8bbb8dcd6 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 17:37:52 +0100 Subject: [PATCH 03/27] docs(kubernetes.md): grammar --- docs/installation/kubernetes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/kubernetes.md b/docs/installation/kubernetes.md index 1209bea09..c8e4b9340 100644 --- a/docs/installation/kubernetes.md +++ b/docs/installation/kubernetes.md @@ -1,6 +1,6 @@ # Kubernetes -For a mid to high-load Installation, Kubernetes is recommended. passbook is installed using a helm-chart. +For a mid to high-load installation, Kubernetes is recommended. passbook is installed using a helm-chart. ``` # Default values for passbook. From cdad8bb0c3e4e573bafdd41c7b1962342ef9074c Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 18:00:05 +0100 Subject: [PATCH 04/27] docs(flows.md): grammar and clarity --- docs/flow/flows.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/flow/flows.md b/docs/flow/flows.md index 954eee93d..cb9c99c7d 100644 --- a/docs/flow/flows.md +++ b/docs/flow/flows.md @@ -2,17 +2,17 @@ Flows are a method of describing a sequence of stages. A stage represents a single verification or logic step. They are used to authenticate users, enroll them, and more. -Upon Flow execution, a plan is generated, which contains all stages. This means upon execution, all attached policies are evaluated. This behaviour can be altered by enabling the `Re-evaluate Policies` option on the binding. +Upon flow execution, a plan containing all stages is generated. This means that all attached policies are evaluated upon execution. This behaviour can be altered by enabling the `Re-evaluate Policies` option on the binding. -To determine which flow is linked, passbook searches all Flows with the required designation and chooses the first instance the current user has access to. +To determine which flow is linked, passbook searches all flows with the required designation and chooses the first instance the current user has access to. ## Permissions -Flows can have policies assigned to them, which determines if the current user is allowed to see and use this flow. +Flows can have policies assigned to them. These policies determine if the current user is allowed to see and use this flow. ## Designation -Flows are designated for a single Purpose. This designation changes when a Flow is used. The following designations are available: +Flows are designated for a single purpose. This designation changes when a flow is used. The following designations are available: ### Authentication @@ -22,24 +22,24 @@ The authentication flow should always contain a `user_login` stage, which attach ### Invalidation -This designates a flow to be used for the invalidation of a session. +This designates a flow to be used to invalidate a session. This stage should always contain a `user_logout` stage, which resets the current session. ### Enrollment -This designates a flow for enrollment. This flow can contain any amount of Prompt stages, E-Mail verification or Captchas. At the end to create the user, you can use the `user_write` stage, which either updates the currently staged user, or if none exists, creates a new one. +This designates a flow for enrollment. This flow can contain any amount of verification stages, such as email or captcha. At the end, to create the user, you can use the `user_write` stage, which either updates the currently staged user, or if none exists, creates a new one. ### Unenrollment -This designates a flow for unenrollment. This flow can contain any amount of verification, like `email` or captcha. To finally delete the account, use the `user_delete` stage. +This designates a flow for unenrollment. This flow can contain any amount of verification stages, such as email or captcha. As a final stage, to delete the account, use the `user_delete` stage. ### Recovery -This designates a flow for recovery. This flow normally contains an `identification` stage to find the user. Then it can contain any amount of verification, like `email` or captcha. -Afterwards, use the `prompt` stage to ask the user for a new password and use `user_write` to update the password. +This designates a flow for recovery. This flow normally contains an `identification` stage to find the user. It can also contain any amount of verification stages, such as email or captcha. +Afterwards, use the `prompt` stage to ask the user for a new password and the `user_write` stage to update the password. ### Change Password -This designates a flow for password changing. This flow can contain any amount of verification, like `email` or captcha. -Afterwards, use the `prompt` stage to ask the user for a new password and use `user_write` to update the password. +This designates a flow for password changes. This flow can contain any amount of verification stages, such as email or captcha. +Afterwards, use the `prompt` stage to ask the user for a new password and the `user_write` stage to update the password. From 111459dc2526660118fa4b64ca5022ad3b03fe20 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 18:02:58 +0100 Subject: [PATCH 05/27] docs(captcha.md): grammar and clarity --- docs/flow/stages/captcha/captcha.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/flow/stages/captcha/captcha.md b/docs/flow/stages/captcha/captcha.md index f9d730013..422caa4e4 100644 --- a/docs/flow/stages/captcha/captcha.md +++ b/docs/flow/stages/captcha/captcha.md @@ -2,6 +2,6 @@ This stage adds a form of verification using [Google's ReCaptcha](https://www.google.com/recaptcha/intro/v3.html). -This stage has two required fields. You need a Public and a Private key, both of which you can acquire at https://www.google.com/recaptcha/admin. +This stage has two required fields: Public key and private key. These can both be acquired at https://www.google.com/recaptcha/admin. ![](captcha-admin.png) From 8a0b3bd2991eb5fce4abb47ebc966bc682360579 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 18:07:11 +0100 Subject: [PATCH 06/27] docs(dummy.md): punctuation and grammar --- docs/flow/stages/dummy/dummy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/flow/stages/dummy/dummy.md b/docs/flow/stages/dummy/dummy.md index 2321803cb..9564585de 100644 --- a/docs/flow/stages/dummy/dummy.md +++ b/docs/flow/stages/dummy/dummy.md @@ -1,5 +1,5 @@ # Dummy stage -This stage is used for development, and has no function. It presents the User with a form, that requires a single confirmation. +This stage is used for development and has no function. It presents the user with a form which requires a single confirmation. ![](dummy.png) From f0600b54828ced1c881e1454842de9d14c35506b Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 18:14:56 +0100 Subject: [PATCH 07/27] docs(email.md): grammar and clarity --- docs/flow/stages/email/email.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/flow/stages/email/email.md b/docs/flow/stages/email/email.md index c7f2f5e68..75dcb6d57 100644 --- a/docs/flow/stages/email/email.md +++ b/docs/flow/stages/email/email.md @@ -1,5 +1,5 @@ -# E-Mail +# Email -This stage can be used for E-Mail verification. passbook's background worker will send an E-Mail using the specified connection details. When an E-Mail can't be delivered, it is automatically periodically retried. +This stage can be used for email verification. passbook's background worker will send an email using the specified connection details. When an email can't be delivered, delivery is automatically retried periodically. ![](email-recovery.png) From c23646e6f35cb3fe8951934b869320970ad6cce5 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 18:16:28 +0100 Subject: [PATCH 08/27] docs(identification.md): punctuation --- docs/flow/stages/identification/identification.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/flow/stages/identification/identification.md b/docs/flow/stages/identification/identification.md index 4096f40b0..c9b431e29 100644 --- a/docs/flow/stages/identification/identification.md +++ b/docs/flow/stages/identification/identification.md @@ -14,7 +14,7 @@ Valid choices: ### Template -This specifies which template is rendered. Currently there are two templates. +This specifies which template is rendered. Currently there are two templates: The `Login` template shows configured Sources below the login form, as well as linking to the defined Enrollment and Recovery flows. From a05f841bed2aed88f4b0efdc0fd45f228739de14 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 18:19:24 +0100 Subject: [PATCH 09/27] docs(invitation.md): new words --- docs/flow/stages/invitation/invitation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/flow/stages/invitation/invitation.md b/docs/flow/stages/invitation/invitation.md index db01b83be..06fd798ac 100644 --- a/docs/flow/stages/invitation/invitation.md +++ b/docs/flow/stages/invitation/invitation.md @@ -1,7 +1,7 @@ # Invitation Stage -This stage can be used to invite users. You can use this enroll users with preset values. +This stage can be used to invite users. You can use this to enroll users with preset values. -If the option `Continue Flow without Invitation`, this stage will continue when no invitation token is present. +If the option `Continue Flow without Invitation` is enabled, this stage will continue even when no invitation token is present. -If you want to check if a user has used an invitation within a policy, you can check `request.context.invitation_in_effect`. +To check if a user has used an invitation within a policy, you can check `request.context.invitation_in_effect`. From de00f9f41a909b22957bdae77cf26b0c9685239e Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 18:28:56 +0100 Subject: [PATCH 10/27] docs(password.md): clarity and punctuation --- docs/flow/stages/password/password.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/flow/stages/password/password.md b/docs/flow/stages/password/password.md index 319b0f486..3c0aeeaed 100644 --- a/docs/flow/stages/password/password.md +++ b/docs/flow/stages/password/password.md @@ -1,3 +1,3 @@ # Password Stage -This is a generic password prompt, which authenticates the currently `pending_user`. This stage allows the selection of the Backend the user is authenticated against. +This is a generic password prompt which authenticates the current `pending_user`. This stage allows the selection of the source the user is authenticated against. From 703e67a060aeb55e793ff3bc6c5588c2a15deb73 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 18:34:40 +0100 Subject: [PATCH 11/27] docs(prompt.md): grammar and clarity --- docs/flow/stages/prompt/prompt.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/flow/stages/prompt/prompt.md b/docs/flow/stages/prompt/prompt.md index fa95e5e47..c8850449d 100644 --- a/docs/flow/stages/prompt/prompt.md +++ b/docs/flow/stages/prompt/prompt.md @@ -6,20 +6,20 @@ This stage is used to show the user arbitrary prompts. The prompt can be any of the following types: -| | | +| Type | Description | |----------|------------------------------------------------------------------| -| text | Arbitrary text, no client-side validation is done. | -| email | E-Mail input, requires a valid E-Mail adress | -| password | Password Input | -| number | Number Input, any number is allowed | -| checkbox | Simple Checkbox | -| hidden | Hidden Input field, allows for the pre-setting of default values | +| text | Arbitrary text. No client-side validation is done. | +| email | Email input. Requires a valid email adress. | +| password | Password input. | +| number | Number input. Any number is allowed. | +| checkbox | Simple checkbox. | +| hidden | Hidden input field. Allows for the pre-setting of default values.| -A Prompt has the following attributes: +A prompt has the following attributes: ### `field_key` -HTML name used for the prompt. This key is also used to later retrieve the data in expression policies: +The HTML name used for the prompt. This key is also used to later retrieve the data in expression policies: ```jinja2 {{ request.context.prompt_data. }} @@ -27,16 +27,16 @@ HTML name used for the prompt. This key is also used to later retrieve the data ### `label` -Label used to describe the Field. This might not be shown depending on the template selected. +The label used to describe the field. Depending on the selected template, this may not be shown. ### `required` -Flag that decides whether or not this field is required. +A flag which decides whether or not this field is required. ### `placeholder` -Field placeholder, shown within the input field. This field is also used by the `hidden` type as the actual value. +A field placeholder, shown within the input field. This field is also used by the `hidden` type as the actual value. ### `order` -Numerical index of the prompt. This applies to all stages this prompt is a part of. +The numerical index of the prompt. This applies to all stages which this prompt is a part of. From 6dedb17029ddf8deafcc43db5a4765f753721169 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 18:35:59 +0100 Subject: [PATCH 12/27] docs(validation.md): grammar and typo fix --- docs/flow/stages/prompt/validation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/flow/stages/prompt/validation.md b/docs/flow/stages/prompt/validation.md index 8c1ac4f28..8186f9fcc 100644 --- a/docs/flow/stages/prompt/validation.md +++ b/docs/flow/stages/prompt/validation.md @@ -12,6 +12,6 @@ True False {% endif %} ``` -This policy expects you two have two password fields with `field_key` set to `password` and `password_repeat`. +This policy expects you to have two password fields with `field_key` set to `password` and `password_repeat`. -Afterwards bind this policy to the prompt stage you want to validate. +Afterwards, bind this policy to the prompt stage you want to validate. From cf9023269eafadd972cbf127c46c4abca49ea939 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 18:47:45 +0100 Subject: [PATCH 13/27] docs(sources.md): grammar and clarity --- docs/sources.md | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/sources.md b/docs/sources.md index 28c6e6bfd..d1ffab326 100644 --- a/docs/sources.md +++ b/docs/sources.md @@ -1,39 +1,39 @@ # Sources -Sources allow you to connect passbook to an existing User directory. They can also be used for Social-Login, using external Providers like Facebook, Twitter, etc. +Sources allow you to connect passbook to an existing user directory. They can also be used for social logins, using external providers such as Facebook, Twitter, etc. ## Generic OAuth Source **All Integration-specific Sources are documented in the Integrations Section** -This source allows users to enroll themselves with an External OAuth-based Identity Provider. The Generic Provider expects the Endpoint to return OpenID-Connect compatible Information. Vendor specific Implementations have their own OAuth Source. +This source allows users to enroll themselves with an external OAuth-based Identity Provider. The generic provider expects the endpoint to return OpenID-Connect compatible information. Vendor-specific implementations have their own OAuth Source. -- Policies: Allow/Forbid Users from linking their Accounts with this Provider -- Request Token URL: This field is used for OAuth v1 Implementations and will be provided by the Provider. -- Authorization URL: This value will be provided by the Provider. -- Access Token URL: This value will be provided by the Provider. -- Profile URL: This URL is called by passbook to retrieve User information upon successful authentication. -- Consumer key/Consumer secret: These values will be provided by the Provider. +- Policies: Allow/Forbid users from linking their accounts with this provider. +- Request Token URL: This field is used for OAuth v1 implementations and will be provided by the provider. +- Authorization URL: This value will be provided by the provider. +- Access Token URL: This value will be provided by the provider. +- Profile URL: This URL is called by passbook to retrieve user information upon successful authentication. +- Consumer key/Consumer secret: These values will be provided by the provider. ## SAML Source -This source allows passbook to act as a SAML Service Provider. Just like the SAML Provider, it supports signed Requests. Vendor specific documentation can be found in the Integrations Section +This source allows passbook to act as a SAML Service Provider. Just like the SAML Provider, it supports signed requests. Vendor-specific documentation can be found in the Integrations Section. ## LDAP Source -This source allows you to import Users and Groups from an LDAP Server +This source allows you to import users and groups from an LDAP Server. -- Server URI: URI to your LDAP Server/Domain Controller -- Bind CN: CN to bind as, this can also be a UPN in the format of `user@domain.tld` -- Bind password: Password used during the bind process -- Enable Start TLS: Enables StartTLS functionality. To use SSL instead, use port `636` -- Base DN: Base DN used for all LDAP queries -- Addition User DN: Prepended to Base DN for User-queries. -- Addition Group DN: Prepended to Base DN for Group-queries. -- User object filter: Consider Objects matching this filter to be Users. -- Group object filter: Consider Objects matching this filter to be Groups. -- User group membership field: Field which contains Groups of user. -- Object uniqueness field: Field which contains a unique Identifier. -- Sync groups: Enable/disable Group synchronization. Groups are synced in the background every 5 minutes. -- Sync parent group: Optionally set this Group as parent Group for all synced Groups (allows you to, for example, import AD Groups under a root `imported-from-ad` group.) -- Property mappings: Define which LDAP Properties map to which passbook Properties. The default set of Property Mappings is generated for Active Directory. See also [LDAP Property Mappings](property-mappings/index.md#ldap-property-mapping) +- Server URI: URI to your LDAP server/Domain Controller. +- Bind CN: CN of the bind user. This can also be a UPN in the format of `user@domain.tld`. +- Bind password: Password used during the bind process. +- Enable StartTLS: Enables StartTLS functionality. To use LDAPS instead, use port `636`. +- Base DN: Base DN used for all LDAP queries. +- Addition User DN: Prepended to the base DN for user queries. +- Addition Group DN: Prepended to the base DN for group queries. +- User object filter: Consider objects matching this filter to be users. +- Group object filter: Consider objects matching this filter to be groups. +- User group membership field: This field contains the user's group memberships. +- Object uniqueness field: This field contains a unique identifier. +- Sync groups: Enable/disable group synchronization. Groups are synced in the background every 5 minutes. +- Sync parent group: Optionally set this group as the parent group for all synced groups. An example use case of this would be to import Active Directory groups under a root `imported-from-ad` group. +- Property mappings: Define which LDAP properties map to which passbook properties. The default set of property mappings is generated for Active Directory. See also [LDAP Property Mappings](property-mappings/index.md#ldap-property-mapping) From 1cbaf865d8cdd4cb25578599488fe1bdc742d493 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 18:55:01 +0100 Subject: [PATCH 14/27] docs(providers.md): grammar and clarity --- docs/providers.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/providers.md b/docs/providers.md index e7504e532..f40b0b59d 100644 --- a/docs/providers.md +++ b/docs/providers.md @@ -1,17 +1,17 @@ # Providers -Providers allow external Applications to authenticate against passbook and use its User Information. +Providers allow external applications to authenticate against passbook and use its user information. ## OpenID Provider -This provider uses the commonly used OpenID Connect variation of OAuth2. +This provider utilises the commonly used OpenID Connect variation of OAuth2. ## OAuth2 Provider -This provider is slightly different than the OpenID Provider. While it uses the same basic OAuth2 Protocol, it provides a GitHub-compatible Endpoint. This allows you to integrate Applications, which don't support Custom OpenID Providers. -The API exposes Username, E-Mail, Name and Groups in a GitHub-compatible format. +This provider is slightly different than the OpenID Provider. While it uses the same basic OAuth2 Protocol, it provides a GitHub-compatible endpoint. This allows you to integrate applications which don't support custom OpenID providers. +The API exposes username, email, name, and groups in a GitHub-compatible format. ## SAML Provider -This provider allows you to integrate Enterprise Software using the SAML2 Protocol. It supports signed Requests. This Provider uses [Property Mappings](property-mappings/index.md#saml-property-mapping) to determine which fields are exposed and what values they return. This makes it possible to expose Vendor-specific Fields. -Default fields are exposed through Auto-generated Property Mappings, which are prefixed with "Autogenerated..." +This provider allows you to integrate enterprise software using the SAML2 Protocol. It supports signed requests and uses [Property Mappings](property-mappings/index.md#saml-property-mapping) to determine which fields are exposed and what values they return. This makes it possible to expose vendor-specific fields. +Default fields are exposed through auto-generated Property Mappings, which are prefixed with "Autogenerated". From 71df9ea74d2825ae7cd65d30cd7092c618eaa4f4 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 18:57:25 +0100 Subject: [PATCH 15/27] docs(index.md): punctuation & capitalisation --- docs/expressions/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/expressions/index.md b/docs/expressions/index.md index 4355dfca3..9f34050ef 100644 --- a/docs/expressions/index.md +++ b/docs/expressions/index.md @@ -1,6 +1,6 @@ # Expressions -Expressions allow you to write custom Logic using Python code. +Expressions allow you to write custom logic using Python code. Expressions are used in different places throughout passbook, and can do different things. @@ -46,7 +46,7 @@ return pb_is_group_member(request.user, name="test_group") ### `pb_user_by(**filters) -> Optional[User]` -Fetch a user matching `**filters`. Returns None if no user was found. +Fetch a user matching `**filters`. Returns "None" if no user was found. Example: From e07b65401e4a05eae1489a3f0b55bfeb57aad533 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 18:59:03 +0100 Subject: [PATCH 16/27] docs(user-object.md): punctuation & capitalisation --- docs/expressions/reference/user-object.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/expressions/reference/user-object.md b/docs/expressions/reference/user-object.md index 5cdb0780a..69eeeaaac 100644 --- a/docs/expressions/reference/user-object.md +++ b/docs/expressions/reference/user-object.md @@ -2,18 +2,18 @@ The User object has the following attributes: - - `username`: User's Username - - `email` User's E-Mail - - `name` User's Display Name - - `is_staff` Boolean field if user is staff - - `is_active` Boolean field if user is active - - `date_joined` Date User joined/was created - - `password_change_date` Date Password was last changed - - `attributes` Dynamic Attributes + - `username`: User's username. + - `email` User's email. + - `name` User's display mame. + - `is_staff` Boolean field if user is staff. + - `is_active` Boolean field if user is active. + - `date_joined` Date user joined/was created. + - `password_change_date` Date password was last changed. + - `attributes` Dynamic attributes. ## Examples -List all the User's Group Names +List all the User's group names: ```python for group in user.groups.all(): From 4d317a21ced920e0b8ddce8a311e36c679b80d19 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 19:02:58 +0100 Subject: [PATCH 17/27] docs(index.md): capitalisation and clarity --- docs/property-mappings/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/property-mappings/index.md b/docs/property-mappings/index.md index 7e7e21e17..7b7edd0d4 100644 --- a/docs/property-mappings/index.md +++ b/docs/property-mappings/index.md @@ -1,16 +1,16 @@ # Property Mappings -Property Mappings allow you to pass information to external Applications. For example, pass the current user's Groups as a SAML Parameter. Property Mappings are also used to map Source fields to passbook fields, for example when using LDAP. +Property Mappings allow you to pass information to external applications. For example, pass the current user's groups as a SAML parameter. Property Mappings are also used to map Source fields to passbook fields, for example when using LDAP. ## SAML Property Mapping -SAML Property Mappings allow you embed Information into the SAML AuthN Request. THis Information can then be used by the Application to assign permissions for example. +SAML Property Mappings allow you embed information into the SAML AuthN request. This information can then be used by the application to, for example, assign permissions to the object. -You can find examples [here](integrations/) +You can find examples [here](integrations/). ## LDAP Property Mapping -LDAP Property Mappings are used when you define a LDAP Source. These Mappings define which LDAP Property maps to which passbook Property. By default, these mappings are created: +LDAP Property Mappings are used when you define a LDAP Source. These mappings define which LDAP property maps to which passbook property. By default, the following mappings are created: - Autogenerated LDAP Mapping: givenName -> first_name - Autogenerated LDAP Mapping: mail -> email @@ -18,4 +18,4 @@ LDAP Property Mappings are used when you define a LDAP Source. These Mappings de - Autogenerated LDAP Mapping: sAMAccountName -> username - Autogenerated LDAP Mapping: sn -> last_name -These are configured for the most common LDAP Setups. +These are configured with most common LDAP setups. From a5b8c91c0485254773e377dc0dbeaed449c459ef Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 19:06:30 +0100 Subject: [PATCH 18/27] docs(expression.md): clarity --- docs/property-mappings/expression.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/property-mappings/expression.md b/docs/property-mappings/expression.md index a25ee2aad..13cd02262 100644 --- a/docs/property-mappings/expression.md +++ b/docs/property-mappings/expression.md @@ -1,9 +1,9 @@ # Property Mapping Expressions -The property mapping should return a value that is expected by the Provider/Source. What types are supported, is documented in the individual Provider/Source. Returning `None` is always accepted, this simply skips this mapping. +The property mapping should return a value that is expected by the Provider/Source. Supported types are documented in the individual Provider/Source. Returning `None` is always accepted and would simply skip the mapping for which `None` was returned. ### Context Variables -- `user`: The current user, this might be `None` if there is no contextual user. ([ref](../expressions/reference/user-object.md)) -- `request`: The current request, this might be `None` if there is no contextual request. ([ref](https://docs.djangoproject.com/en/3.0/ref/request-response/#httprequest-objects)) -- Arbitrary other arguments given by the provider, this is documented on the Provider/Source. +- `user`: The current user. This may be `None` if there is no contextual user. ([ref](../expressions/reference/user-object.md)) +- `request`: The current request. This may be `None` if there is no contextual request. ([ref](https://docs.djangoproject.com/en/3.0/ref/request-response/#httprequest-objects)) +- Other arbitrary arguments given by the provider, this is documented on the Provider/Source. From 047361600dd75bb6f0bee96c7bd6100cf371aabd Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 19:27:20 +0100 Subject: [PATCH 19/27] docs(terminology.md): clarity & capitalisation --- docs/policies/index.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/policies/index.md b/docs/policies/index.md index 4c86878b2..ad612c3e5 100644 --- a/docs/policies/index.md +++ b/docs/policies/index.md @@ -2,7 +2,7 @@ ## Kinds -There are two different Kind of policies, a Standard Policy and a Password Policy. Normal Policies just evaluate to True or False, and can be used everywhere. Password Policies apply when a Password is set (during User enrollment, Recovery or anywhere else). These policies can be used to apply Password Rules like length, etc. The can also be used to expire passwords after a certain amount of time. +There are two different kinds of policies; Standard Policy and Password Policy. Normal policies evaluate to True or False, and can be used everywhere. Password policies apply when a password is set (during user enrollment, recovery or anywhere else). These policies can be used to apply password rules such as length, complexity, etc. They can also be used to expire passwords after a certain amount of time. ## Standard Policies @@ -10,9 +10,9 @@ There are two different Kind of policies, a Standard Policy and a Password Polic ### Reputation Policy -passbook keeps track of failed login attempts by Source IP and Attempted Username. These values are saved as scores. Each failed login decreases the Score for the Client IP as well as the targeted Username by one. +passbook keeps track of failed login attempts by source IP and attempted username. These values are saved as scores. Each failed login decreases the score for the client IP as well as the targeted username by 1 (one). -This policy can be used to for example prompt Clients with a low score to pass a Captcha before they can continue. +This policy can be used, for example, to prompt clients with a low score to pass a captcha before they can continue. ## Expression Policy @@ -24,19 +24,19 @@ See [Expression Policy](expression.md). ### Password Policy -This Policy allows you to specify Password rules, like Length and required Characters. +This policy allows you to specify password rules, such as length and required characters. The following rules can be set: -- Minimum amount of Uppercase Characters -- Minimum amount of Lowercase Characters -- Minimum amount of Symbols Characters -- Minimum Length -- Symbol charset (define which characters are counted as symbols) +- Minimum amount of uppercase characters. +- Minimum amount of lowercase characters. +- Minimum amount of symbols characters. +- Minimum length. +- Symbol charset (define which characters are counted as symbols). ### Have I Been Pwned Policy -This Policy checks the hashed Password against the [Have I Been Pwned](https://haveibeenpwned.com/) API. This only sends the first 5 characters of the hashed password. The remaining comparison is done within passbook. +This policy checks the hashed password against the [Have I Been Pwned](https://haveibeenpwned.com/) API. This only sends the first 5 characters of the hashed password. The remaining comparison is done within passbook. ### Password-Expiry Policy -This policy can enforce regular password rotation by expiring set Passwords after a finite amount of time. This forces users to set a new password. +This policy can enforce regular password rotation by expiring set passwords after a finite amount of time. This forces users to set a new password. From cbfb509ca9ddd877f3d9cf252dff9dadbb91c9a0 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 19:34:26 +0100 Subject: [PATCH 20/27] docs(expression.md): clarity & punctuation --- docs/policies/expression.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/policies/expression.md b/docs/policies/expression.md index e3d0812cb..22c611605 100644 --- a/docs/policies/expression.md +++ b/docs/policies/expression.md @@ -18,10 +18,10 @@ return False ### Context variables - `request`: A PolicyRequest object, which has the following properties: - - `request.user`: The current User, which the Policy is applied against. ([ref](../expressions/reference/user-object.md)) + - `request.user`: The current user, against which the policy is applied. ([ref](../expressions/reference/user-object.md)) - `request.http_request`: The Django HTTP Request. ([ref](https://docs.djangoproject.com/en/3.0/ref/request-response/#httprequest-objects)) - - `request.obj`: A Django Model instance. This is only set if the Policy is ran against an object. + - `request.obj`: A Django Model instance. This is only set if the policy is ran against an object. - `request.context`: A dictionary with dynamic data. This depends on the origin of the execution. -- `pb_is_sso_flow`: Boolean which is true if request was initiated by authenticating through an external Provider. +- `pb_is_sso_flow`: Boolean which is true if request was initiated by authenticating through an external provider. - `pb_client_ip`: Client's IP Address or '255.255.255.255' if no IP Address could be extracted. - `pb_flow_plan`: Current Plan if Policy is called from the Flow Planner. From 9dc3b1dca0068766545525fedc7b53edec88b4ba Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 19:44:25 +0100 Subject: [PATCH 21/27] docs(index.md): punctuation --- docs/integrations/services/aws/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/integrations/services/aws/index.md b/docs/integrations/services/aws/index.md index af87c8d9d..f4835240f 100644 --- a/docs/integrations/services/aws/index.md +++ b/docs/integrations/services/aws/index.md @@ -9,19 +9,19 @@ The following placeholders will be used: -- `passbook.company` is the FQDN of the passbook Install +- `passbook.company` is the FQDN of the passbook install. -Create an application in passbook and note the slug, as this will be used later. Create a SAML Provider with the following Parameters: +Create an application in passbook and note the slug, as this will be used later. Create a SAML provider with the following parameters: - ACS URL: `https://signin.aws.amazon.com/saml` - Audience: `urn:amazon:webservices` - Issuer: `passbook` -You can of course use a custom Signing Certificate, and adjust durations. +You can of course use a custom signing certificate, and adjust durations. ## AWS -Create a Role with the Permissions you desire, and note the ARN. +Create a role with the permissions you desire, and note the ARN. AWS requires two custom PropertyMappings; `Role` and `RoleSessionName`. Create them as following: @@ -29,4 +29,4 @@ AWS requires two custom PropertyMappings; `Role` and `RoleSessionName`. Create t ![](./property-mapping-role-session-name.png) -Afterwards export the Metadata from passbook, and create an Identity Provider [here](https://console.aws.amazon.com/iam/home#/providers). +Afterwards export the metadata from passbook, and create an Identity Provider [here](https://console.aws.amazon.com/iam/home#/providers). From dc8c1ad29781fae03f617fe56fc45b56dfc6999c Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 19:53:02 +0100 Subject: [PATCH 22/27] docs(index.md): capitalisation --- docs/integrations/services/gitlab/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/integrations/services/gitlab/index.md b/docs/integrations/services/gitlab/index.md index 7b04e5d83..2cd2bf47b 100644 --- a/docs/integrations/services/gitlab/index.md +++ b/docs/integrations/services/gitlab/index.md @@ -14,13 +14,13 @@ The following placeholders will be used: - `gitlab.company` is the FQDN of the GitLab Install - `passbook.company` is the FQDN of the passbook Install -Create an application in passbook and note the slug, as this will be used later. Create a SAML Provider with the following Parameters: +Create an application in passbook and note the slug, as this will be used later. Create a SAML provider with the following parameters: - ACS URL: `https://gitlab.company/users/auth/saml/callback` - Audience: `https://gitlab.company` - Issuer: `https://gitlab.company` -You can of course use a custom Signing Certificate, and adjust durations. To get the value for `idp_cert_fingerprint`, you can use a tool like [this](https://www.samltool.com/fingerprint.php). +You can of course use a custom signing certificate, and adjust durations. To get the value for `idp_cert_fingerprint`, you can use a tool like [this](https://www.samltool.com/fingerprint.php). ## GitLab Configuration From 4be2c66cdf5ef63b9f51698de2625914374c172d Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 19:54:39 +0100 Subject: [PATCH 23/27] docs(index.md): capitalisation & punctuation --- docs/integrations/services/harbor/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/integrations/services/harbor/index.md b/docs/integrations/services/harbor/index.md index fd1ac0142..4058a3e81 100644 --- a/docs/integrations/services/harbor/index.md +++ b/docs/integrations/services/harbor/index.md @@ -11,10 +11,10 @@ From https://goharbor.io The following placeholders will be used: -- `harbor.company` is the FQDN of the Harbor Install -- `passbook.company` is the FQDN of the passbook Install +- `harbor.company` is the FQDN of the Harbor install. +- `passbook.company` is the FQDN of the passbook install. -Create an application in passbook. Create an OpenID Provider with the following Parameters: +Create an application in passbook. Create an OpenID provider with the following parameters: - Client Type: `Confidential` - Response types: `code (Authorization Code Flow)` From afe3259e963e42108f2ee16ae4ef98276e7f761b Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 19:55:55 +0100 Subject: [PATCH 24/27] docs(index.md): capitalisation & punctuation --- docs/integrations/services/rancher/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/integrations/services/rancher/index.md b/docs/integrations/services/rancher/index.md index ccd4e0152..e2c9d8d51 100644 --- a/docs/integrations/services/rancher/index.md +++ b/docs/integrations/services/rancher/index.md @@ -5,23 +5,23 @@ From https://rancher.com/products/rancher !!! note "" - An Enterprise Platform for Managing Kubernetes Everywhere + An enterprise platform for managing Kubernetes Everywhere Rancher is a platform built to address the needs of the DevOps teams deploying applications with Kubernetes, and the IT staff responsible for delivering an enterprise-critical service. ## Preparation The following placeholders will be used: -- `rancher.company` is the FQDN of the Rancher Install -- `passbook.company` is the FQDN of the passbook Install +- `rancher.company` is the FQDN of the Rancher install. +- `passbook.company` is the FQDN of the passbook install. -Create an application in passbook and note the slug, as this will be used later. Create a SAML Provider with the following Parameters: +Create an application in passbook and note the slug, as this will be used later. Create a SAML provider with the following parameters: - ACS URL: `https://rancher.company/v1-saml/adfs/saml/acs` - Audience: `https://rancher.company/v1-saml/adfs/saml/metadata` - Issuer: `passbook` -You can of course use a custom Signing Certificate, and adjust durations. +You can of course use a custom signing certificate, and adjust durations. ## Rancher From e85236959b063bf377737962b7f289de45feba9f Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 19:57:58 +0100 Subject: [PATCH 25/27] docs(index.md): capitalisation & punctuation --- docs/integrations/services/sentry/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/integrations/services/sentry/index.md b/docs/integrations/services/sentry/index.md index bb2456e36..d88de4fa7 100644 --- a/docs/integrations/services/sentry/index.md +++ b/docs/integrations/services/sentry/index.md @@ -15,10 +15,10 @@ From https://sentry.io The following placeholders will be used: -- `sentry.company` is the FQDN of the Sentry Install -- `passbook.company` is the FQDN of the passbook Install +- `sentry.company` is the FQDN of the Sentry install. +- `passbook.company` is the FQDN of the passbook install. -Create an application in passbook. Create an OpenID Provider with the following Parameters: +Create an application in passbook. Create an OpenID provider with the following parameters: - Client Type: `Confidential` - Response types: `code (Authorization Code Flow)` From 647d56e90cdfc703a9f282672189078cecf610ef Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 20:15:15 +0100 Subject: [PATCH 26/27] docs(index.md): capitalisation & formatting --- docs/integrations/services/tower-awx/index.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/integrations/services/tower-awx/index.md b/docs/integrations/services/tower-awx/index.md index 16c210e88..5855b8ab8 100644 --- a/docs/integrations/services/tower-awx/index.md +++ b/docs/integrations/services/tower-awx/index.md @@ -10,30 +10,30 @@ From https://docs.ansible.com/ansible/2.5/reference_appendices/tower.html Tower allows you to control access to who can access what, even allowing sharing of SSH credentials without someone being able to transfer those credentials. Inventory can be graphically managed or synced with a wide variety of cloud sources. It logs all of your jobs, integrates well with LDAP, and has an amazing browsable REST API. Command line tools are available for easy integration with Jenkins as well. Provisioning callbacks provide great support for autoscaling topologies. !!! note - AWX is the Open-Source version of Tower, and AWX will be used interchangeably throughout this document. + AWX is the open-source version of Tower. The term "AWX" will be used interchangeably throughout this document. ## Preparation The following placeholders will be used: -- `awx.company` is the FQDN of the AWX/Tower Install -- `passbook.company` is the FQDN of the passbook Install +- `awx.company` is the FQDN of the AWX/Tower install. +- `passbook.company` is the FQDN of the passbook install. -Create an application in passbook and note the slug, as this will be used later. Create a SAML Provider with the following Parameters: +Create an application in passbook and note the slug, as this will be used later. Create a SAML provider with the following parameters: - ACS URL: `https://awx.company/sso/complete/saml/` - Audience: `awx` - Issuer: `https://awx.company/sso/metadata/saml/` -You can of course use a custom Signing Certificate, and adjust durations. +You can of course use a custom signing certificate, and adjust durations. ## AWX Configuration Navigate to `https://awx.company/#/settings/auth` to configure SAML. Set the Field `SAML SERVICE PROVIDER ENTITY ID` to `awx`. -For the fields `SAML SERVICE PROVIDER PUBLIC CERTIFICATE` and `SAML SERVICE PROVIDER PRIVATE KEY`, you can either use custom Certificates, or use the self-signed Pair generated by Passbook. +For the fields `SAML SERVICE PROVIDER PUBLIC CERTIFICATE` and `SAML SERVICE PROVIDER PRIVATE KEY`, you can either use custom certificates, or use the self-signed pair generated by passbook. -Provide Metadata in the `SAML Service Provider Organization Info` Field: +Provide metadata in the `SAML Service Provider Organization Info` field: ```json { @@ -45,7 +45,7 @@ Provide Metadata in the `SAML Service Provider Organization Info` Field: } ``` -Provide Metadata in the `SAML Service Provider Technical Contact` and `SAML Service Provider Technical Contact` Fields: +Provide metadata in the `SAML Service Provider Technical Contact` and `SAML Service Provider Technical Contact` fields: ```json { @@ -71,4 +71,4 @@ In the `SAML Enabled Identity Providers` paste the following configuration: } ``` -`x509cert` is the Certificate configured in passbook. Remove the --BEGIN CERTIFICATE-- and --END CERTIFICATE-- headers, then enter the cert as one non-breaking string. +`x509cert` is the certificate configured in passbook. Remove the `--BEGIN CERTIFICATE--` and `--END CERTIFICATE--` headers, then enter the cert as one non-breaking string. From c71b15002541d257d751e74ce9bf73e2ea2837c8 Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 18 Jun 2020 20:19:58 +0100 Subject: [PATCH 27/27] docs(upgrading-from-0.8.x.md): formatting --- docs/upgrading-from-0.8.x.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/upgrading-from-0.8.x.md b/docs/upgrading-from-0.8.x.md index 2e9e39d22..d0728f8db 100644 --- a/docs/upgrading-from-0.8.x.md +++ b/docs/upgrading-from-0.8.x.md @@ -4,13 +4,13 @@ Due to some database changes that had to be rather sooner than later, there is n To export data from your old instance, run this command: -(with docker-compose) +- docker-compose ``` docker-compose exec server ./manage.py dumpdata -o /tmp/passbook_dump.json passbook_core.User passbook_core.Group passbook_crypto.CertificateKeyPair passbook_audit.Event docker cp passbook_server_1:/tmp/passbook_dump.json passbook_dump.json ``` -(with kubernetes) +- kubernetes ``` kubectl exec -it passbook-web-... -- ./manage.py dumpdata -o /tmp/passbook_dump.json passbook_core.User passbook_core.Group passbook_crypto.CertificateKeyPair passbook_audit.Event kubectl cp passbook-web-...:/tmp/passbook_dump.json passbook_dump.json @@ -18,13 +18,13 @@ kubectl cp passbook-web-...:/tmp/passbook_dump.json passbook_dump.json After that, create a new passbook instance in a different namespace (kubernetes) or in a different folder (docker-compose). Once this instance is running, you can use the following commands to restore the data. On docker-compose, you still have to run the `migrate` command, to create all database structures. -(docker-compose) +- docker-compose ``` docker cp passbook_dump.json new_passbook_server_1:/tmp/passbook_dump.json docker-compose exec server ./manage.py loaddata /tmp/passbook_dump.json ``` -(with kubernetes) +- kubernetes ``` kubectl cp passbook_dump.json passbook-web-...:/tmp/passbook_dump.json kubectl exec -it passbook-web-... -- ./manage.py loaddata /tmp/passbook_dump.json