Migrate to Docusaurus (#329)
* docs: initial migration to docusaurus * website: add custom font, update blurbs and icons * website: update splash * root: update links to docs * flows: use .pbflow extension so docusaurus doesn't mangle the files * e2e: workaround prospector * Squashed commit of the following: commit1248585dca
Author: Jens Langhammer <jens.langhammer@beryju.org> Date: Sun Nov 15 20:46:53 2020 +0100 e2e: attempt to fix prospector error again commit1319c480c4
Author: Jens Langhammer <jens.langhammer@beryju.org> Date: Sun Nov 15 20:41:35 2020 +0100 ci: install previous python version for upgrade testing * web: update accent colours and format * website: format markdown files * website: fix colours for text * website: switch to temporary accent colour to improve readability * flows: fix path for TestTransferDocs * flows: fix formatting of tests
|
@ -199,3 +199,4 @@ local.env.yml
|
||||||
|
|
||||||
# Selenium Screenshots
|
# Selenium Screenshots
|
||||||
selenium_screenshots/**
|
selenium_screenshots/**
|
||||||
|
backups/
|
||||||
|
|
|
@ -13,9 +13,9 @@ passbook is an open-source Identity Provider focused on flexibility and versatil
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
For small/test setups it is recommended to use docker-compose, see the [documentation](https://passbook.beryju.org/installation/docker-compose/)
|
For small/test setups it is recommended to use docker-compose, see the [documentation](https://passbook.beryju.org/docs/installation/docker-compose/)
|
||||||
|
|
||||||
For bigger setups, there is a Helm Chart in the `helm/` directory. This is documented [here](https://passbook.beryju.org//installation/kubernetes/)
|
For bigger setups, there is a Helm Chart in the `helm/` directory. This is documented [here](https://passbook.beryju.org/docs/installation/kubernetes/)
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ For bigger setups, there is a Helm Chart in the `helm/` directory. This is docum
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
To develop on passbook, you need a system with Python 3.7+ (3.8 is recommended). passbook uses [pipenv](https://pipenv.pypa.io/en/latest/) for managing dependencies.
|
To develop on passbook, you need a system with Python 3.8+ (3.9 is recommended). passbook uses [pipenv](https://pipenv.pypa.io/en/latest/) for managing dependencies.
|
||||||
|
|
||||||
To get started, run
|
To get started, run
|
||||||
|
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
# Passbook User Object
|
|
||||||
|
|
||||||
The User object has the following attributes:
|
|
||||||
|
|
||||||
- `username`: User's username.
|
|
||||||
- `email` User's email.
|
|
||||||
- `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.
|
|
||||||
- `pb_groups` This is a queryset of all the user's groups.
|
|
||||||
|
|
||||||
You can do additional filtering like `user.pb_groups.filter(name__startswith='test')`, see [here](https://docs.djangoproject.com/en/3.1/ref/models/querysets/#id4)
|
|
||||||
|
|
||||||
To get the name of all groups, you can do `[group.name for group in user.pb_groups.all()]`
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
List all the User's group names:
|
|
||||||
|
|
||||||
```python
|
|
||||||
for group in user.pb_groups.all():
|
|
||||||
yield group.name
|
|
||||||
```
|
|
|
@ -1,7 +0,0 @@
|
||||||
# OTP Stage
|
|
||||||
|
|
||||||
This stage offers a generic Time-based One-time Password authentication step.
|
|
||||||
|
|
||||||
You can optionally enforce this step, which will force every user without OTP setup to configure it.
|
|
||||||
|
|
||||||
This stage uses a 6-digit Code with a 30 second time-drift. This is currently not changeable.
|
|
|
@ -1,8 +0,0 @@
|
||||||
# User Delete Stage
|
|
||||||
|
|
||||||
!!! danger
|
|
||||||
This stage deletes the `pending_user` without any confirmation. You have to make sure the user is aware of this.
|
|
||||||
|
|
||||||
This stage is intended for an unenrollment flow. It deletes the currently pending user.
|
|
||||||
|
|
||||||
The pending user is also removed from the current session.
|
|
|
@ -1,73 +0,0 @@
|
||||||
# Kubernetes
|
|
||||||
|
|
||||||
For a mid to high-load installation, Kubernetes is recommended. passbook is installed using a helm-chart.
|
|
||||||
|
|
||||||
This installation automatically applies database migrations on startup. After the installation is done, you can use `pbadmin` as username and password.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
###################################
|
|
||||||
# Values directly affecting passbook
|
|
||||||
###################################
|
|
||||||
image:
|
|
||||||
name: beryju/passbook
|
|
||||||
name_static: beryju/passbook-static
|
|
||||||
tag: 0.12.10-stable
|
|
||||||
|
|
||||||
serverReplicas: 1
|
|
||||||
workerReplicas: 1
|
|
||||||
|
|
||||||
# Enable the Kubernetes integration which lets passbook deploy outposts into kubernetes
|
|
||||||
kubernetesIntegration: true
|
|
||||||
|
|
||||||
config:
|
|
||||||
# Optionally specify fixed secret_key, otherwise generated automatically
|
|
||||||
# secretKey: _k*@6h2u2@q-dku57hhgzb7tnx*ba9wodcb^s9g0j59@=y(@_o
|
|
||||||
# Enable error reporting
|
|
||||||
errorReporting:
|
|
||||||
enabled: false
|
|
||||||
environment: customer
|
|
||||||
sendPii: false
|
|
||||||
# Log level used by web and worker
|
|
||||||
# Can be either debug, info, warning, error
|
|
||||||
logLevel: warning
|
|
||||||
|
|
||||||
# Enable Database Backups to S3
|
|
||||||
# backup:
|
|
||||||
# accessKey: access-key
|
|
||||||
# secretKey: secret-key
|
|
||||||
# bucket: s3-bucket
|
|
||||||
# region: eu-central-1
|
|
||||||
# host: s3-host
|
|
||||||
|
|
||||||
ingress:
|
|
||||||
annotations: {}
|
|
||||||
# kubernetes.io/ingress.class: nginx
|
|
||||||
# kubernetes.io/tls-acme: "true"
|
|
||||||
hosts:
|
|
||||||
- passbook.k8s.local
|
|
||||||
tls: []
|
|
||||||
# - secretName: chart-example-tls
|
|
||||||
# hosts:
|
|
||||||
# - passbook.k8s.local
|
|
||||||
|
|
||||||
###################################
|
|
||||||
# Values controlling dependencies
|
|
||||||
###################################
|
|
||||||
|
|
||||||
install:
|
|
||||||
postgresql: true
|
|
||||||
redis: true
|
|
||||||
|
|
||||||
# These values influence the bundled postgresql and redis charts, but are also used by passbook to connect
|
|
||||||
postgresql:
|
|
||||||
postgresqlDatabase: passbook
|
|
||||||
|
|
||||||
redis:
|
|
||||||
cluster:
|
|
||||||
enabled: false
|
|
||||||
master:
|
|
||||||
persistence:
|
|
||||||
enabled: false
|
|
||||||
# https://stackoverflow.com/a/59189742
|
|
||||||
disableCommands: []
|
|
||||||
```
|
|
|
@ -1,75 +0,0 @@
|
||||||
# Ansible Tower / AWX Integration
|
|
||||||
|
|
||||||
## What is Tower
|
|
||||||
|
|
||||||
From https://docs.ansible.com/ansible/2.5/reference_appendices/tower.html
|
|
||||||
|
|
||||||
!!! note ""
|
|
||||||
Ansible Tower (formerly ‘AWX’) is a web-based solution that makes Ansible even more easy to use for IT teams of all kinds. It’s designed to be the hub for all of your automation tasks.
|
|
||||||
|
|
||||||
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. 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.
|
|
||||||
|
|
||||||
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`
|
|
||||||
- Service Provider Binding: Post
|
|
||||||
- Issuer: `https://awx.company/sso/metadata/saml/`
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Provide metadata in the `SAML Service Provider Organization Info` field:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"en-US": {
|
|
||||||
"name": "passbook",
|
|
||||||
"url": "https://passbook.company",
|
|
||||||
"displayname": "passbook"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Provide metadata in the `SAML Service Provider Technical Contact` and `SAML Service Provider Technical Contact` fields:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"givenName": "Admin Name",
|
|
||||||
"emailAddress": "admin@company"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
In the `SAML Enabled Identity Providers` paste the following configuration:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"passbook": {
|
|
||||||
"attr_username": "urn:oid:2.16.840.1.113730.3.1.241",
|
|
||||||
"attr_user_permanent_id": "urn:oid:0.9.2342.19200300.100.1.1",
|
|
||||||
"x509cert": "MIIDEjCCAfqgAwIBAgIRAJZ9pOZ1g0xjiHtQAAejsMEwDQYJKoZIhvcNAQELBQAwMDEuMCwGA1UEAwwlcGFzc2Jvb2sgU2VsZi1zaWduZWQgU0FNTCBDZXJ0aWZpY2F0ZTAeFw0xOTEyMjYyMDEwNDFaFw0yMDEyMjYyMDEwNDFaMFkxLjAsBgNVBAMMJXBhc3Nib29rIFNlbGYtc2lnbmVkIFNBTUwgQ2VydGlmaWNhdGUxETAPBgNVBAoMCHBhc3Nib29rMRQwEgYDVQQLDAtTZWxmLXNpZ25lZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO/ktBYZkY9xAijF4acvzX6Q1K8KoIZeyde8fVgcWBz4L5FgDQ4/dni4k2YAcPdwteGL4nKVzetUzjbRCBUNuO6lqU4J4WNNX4Xg4Ir7XLRoAQeo+omTPBdpJ1p02HjtN5jT01umN3bK2yto1e37CJhK6WJiaXqRewPxh4lI4aqdj3BhFkJ3I3r2qxaWOAXQ6X7fg3w/ny7QP53//ouZo7hSLY3GIcRKgvdjjVM3OW5C3WLpOq5Dez5GWVJ17aeFCfGQ8bwFKde6qfYqyGcU9xHB36TtVHB9hSFP/tUFhkiSOxtsrYwCgCyXm4UTSpP+wiNyjKfFw7qGLBvA2hGTNw8CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAh9PeAqPRQk1/SSygIFADZBi08O/DPCshFwEHvJATIcTzcDD8UGAjXh+H5OlkDyX7KyrcaNvYaafCUo63A+WprdtdY5Ty6SBEwTYyiQyQfwM9BfK+imCoif1Ai7xAelD7p9lNazWq7JU+H/Ep7U7Q7LvpxAbK0JArt+IWTb2NcMb3OWE1r0gFbs44O1l6W9UbJTbyLMzbGbe5i+NHlgnwPwuhtRMh0NUYabGHKcHbhwyFhfGAQv2dAp5KF1E5gu6ZzCiFePzc0FrqXQyb2zpFYcJHXquiqaOeG7cZxRHYcjrl10Vxzki64XVA9BpdELgKSnupDGUEJsRUt3WVOmvZuA==",
|
|
||||||
"url": "https://passbook.company/application/saml/awx/login/",
|
|
||||||
"attr_last_name": "User.LastName",
|
|
||||||
"entity_id": "https://awx.company/sso/metadata/saml/",
|
|
||||||
"attr_email": "urn:oid:0.9.2342.19200300.100.1.3",
|
|
||||||
"attr_first_name": "urn:oid:2.5.4.3"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
`x509cert` is the certificate configured in passbook. Remove the `--BEGIN CERTIFICATE--` and `--END CERTIFICATE--` headers, then enter the cert as one non-breaking string.
|
|
|
@ -1,83 +0,0 @@
|
||||||
# VMware vCenter Integration
|
|
||||||
|
|
||||||
## What is vCenter
|
|
||||||
|
|
||||||
From https://en.wikipedia.org/wiki/VCenter
|
|
||||||
|
|
||||||
!!! note ""
|
|
||||||
|
|
||||||
vCenter Server is the centralized management utility for VMware, and is used to manage virtual machines, multiple ESXi hosts, and all dependent components from a single centralized location. VMware vMotion and svMotion require the use of vCenter and ESXi hosts.
|
|
||||||
|
|
||||||
!!! warning
|
|
||||||
|
|
||||||
This requires passbook 0.10.3 or newer.
|
|
||||||
|
|
||||||
!!! warning
|
|
||||||
|
|
||||||
This requires VMware vCenter 7.0.0 or newer.
|
|
||||||
|
|
||||||
!!! note
|
|
||||||
|
|
||||||
It seems that the vCenter still needs to be joined to the Active Directory Domain, otherwise group membership does not work correctly. We're working on a fix for this, for the meantime your vCenter should be part of your Domain.
|
|
||||||
|
|
||||||
## Preparation
|
|
||||||
|
|
||||||
The following placeholders will be used:
|
|
||||||
|
|
||||||
- `vcenter.company` is the FQDN of the vCenter server.
|
|
||||||
- `passbook.company` is the FQDN of the passbook install.
|
|
||||||
|
|
||||||
Since vCenter only allows OpenID-Connect in combination with Active Directory, it is recommended to have passbook sync with the same Active Directory.
|
|
||||||
|
|
||||||
### Step 1
|
|
||||||
|
|
||||||
Under *Property Mappings*, create a *Scope Mapping*. Give it a name like "OIDC-Scope-VMware-vCenter". Set the scope name to `openid` and the expression to the following
|
|
||||||
|
|
||||||
```python
|
|
||||||
return {
|
|
||||||
"domain": "<your active directory domain>",
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Step 2
|
|
||||||
|
|
||||||
!!! note
|
|
||||||
If your Active Directory Schema is the same as your Email address schema, skip to Step 3.
|
|
||||||
|
|
||||||
Under *Sources*, click *Edit* and ensure that "Autogenerated Active Directory Mapping: userPrincipalName -> attributes.upn" has been added to your source.
|
|
||||||
|
|
||||||
### Step 3
|
|
||||||
|
|
||||||
Under *Providers*, create an OAuth2/OpenID Provider with these settings:
|
|
||||||
|
|
||||||
- Client Type: Confidential
|
|
||||||
- Response Type: code (ADFS Compatibility Mode, sends id_token as access_token)
|
|
||||||
- JWT Algorithm: RS256
|
|
||||||
- Redirect URI: `https://vcenter.company/ui/login/oauth2/authcode`
|
|
||||||
- Post Logout Redirect URIs: `https://vcenter.company/ui/login`
|
|
||||||
- Sub Mode: If your Email address Schema matches your UPN, select "Based on the User's Email...", otherwise select "Based on the User's UPN...".
|
|
||||||
- Scopes: Select the Scope Mapping you've created in Step 1
|
|
||||||
|
|
||||||
![](./passbook_setup.png)
|
|
||||||
|
|
||||||
### Step 4
|
|
||||||
|
|
||||||
Create an application which uses this provider. Optionally apply access restrictions to the application.
|
|
||||||
|
|
||||||
Set the Launch URL to `https://vcenter.company/ui/login/oauth2`. This will skip vCenter's User Prompt and directly log you in.
|
|
||||||
|
|
||||||
## vCenter Setup
|
|
||||||
|
|
||||||
Login as local Administrator account (most likely ends with vsphere.local). Using the Menu in the Navigation bar, navigate to *Administration -> Single Sing-on -> Configuration*.
|
|
||||||
|
|
||||||
Click on *Change Identity Provider* in the top-right corner.
|
|
||||||
|
|
||||||
In the wizard, select "Microsoft ADFS" and click Next.
|
|
||||||
|
|
||||||
Fill in the Client Identifier and Shared Secret from the Provider in passbook. For the OpenID Address, click on *View Setup URLs* in passbook, and copy the OpenID Configuration URL.
|
|
||||||
|
|
||||||
On the next page, fill in your Active Directory Connection Details. These should be similar to what you have set in passbook.
|
|
||||||
|
|
||||||
![](./vcenter_post_setup.png)
|
|
||||||
|
|
||||||
If your vCenter was already setup with LDAP beforehand, your Role assignments will continue to work.
|
|
|
@ -1,20 +0,0 @@
|
||||||
# Outpost deployment in docker-compose
|
|
||||||
|
|
||||||
To deploy an outpost with docker-compose, use this snippet in your docker-compose file.
|
|
||||||
|
|
||||||
You can also run the outpost in a separate docker-compose project, you just have to ensure that the outpost container can reach your application container.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
version: '3.5'
|
|
||||||
|
|
||||||
services:
|
|
||||||
passbook_proxy:
|
|
||||||
image: beryju/passbook-proxy:0.10.0-stable
|
|
||||||
ports:
|
|
||||||
- 4180:4180
|
|
||||||
- 4443:4443
|
|
||||||
environment:
|
|
||||||
PASSBOOK_HOST: https://your-passbook.tld
|
|
||||||
PASSBOOK_INSECURE: 'false'
|
|
||||||
PASSBOOK_TOKEN: token-generated-by-passbook
|
|
||||||
```
|
|
|
@ -1,99 +0,0 @@
|
||||||
# Outpost deployment on Kubernetes
|
|
||||||
|
|
||||||
Use the following manifest, replacing all values surrounded with `__`.
|
|
||||||
|
|
||||||
Afterwards, configure the proxy provider to connect to `<service name>.<namespace>.svc.cluster.local`, and update your Ingress to connect to the `passbook-outpost` service.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/instance: test
|
|
||||||
app.kubernetes.io/managed-by: passbook.beryju.org
|
|
||||||
app.kubernetes.io/name: passbook-proxy
|
|
||||||
app.kubernetes.io/version: 0.10.0
|
|
||||||
name: passbook-outpost-api
|
|
||||||
stringData:
|
|
||||||
passbook_host: '__PASSBOOK_URL__'
|
|
||||||
passbook_host_insecure: 'true'
|
|
||||||
token: '__PASSBOOK_TOKEN__'
|
|
||||||
type: Opaque
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/instance: test
|
|
||||||
app.kubernetes.io/managed-by: passbook.beryju.org
|
|
||||||
app.kubernetes.io/name: passbook-proxy
|
|
||||||
app.kubernetes.io/version: 0.10.0
|
|
||||||
name: passbook-outpost
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 4180
|
|
||||||
protocol: TCP
|
|
||||||
targetPort: http
|
|
||||||
- name: https
|
|
||||||
port: 4443
|
|
||||||
protocol: TCP
|
|
||||||
targetPort: https
|
|
||||||
selector:
|
|
||||||
app.kubernetes.io/instance: test
|
|
||||||
app.kubernetes.io/managed-by: passbook.beryju.org
|
|
||||||
app.kubernetes.io/name: passbook-proxy
|
|
||||||
app.kubernetes.io/version: 0.10.0
|
|
||||||
type: ClusterIP
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/instance: test
|
|
||||||
app.kubernetes.io/managed-by: passbook.beryju.org
|
|
||||||
app.kubernetes.io/name: passbook-proxy
|
|
||||||
app.kubernetes.io/version: 0.10.0
|
|
||||||
name: passbook-outpost
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app.kubernetes.io/instance: test
|
|
||||||
app.kubernetes.io/managed-by: passbook.beryju.org
|
|
||||||
app.kubernetes.io/name: passbook-proxy
|
|
||||||
app.kubernetes.io/version: 0.10.0
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/instance: test
|
|
||||||
app.kubernetes.io/managed-by: passbook.beryju.org
|
|
||||||
app.kubernetes.io/name: passbook-proxy
|
|
||||||
app.kubernetes.io/version: 0.10.0
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- env:
|
|
||||||
- name: PASSBOOK_HOST
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: passbook_host
|
|
||||||
name: passbook-outpost-api
|
|
||||||
- name: PASSBOOK_TOKEN
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: token
|
|
||||||
name: passbook-outpost-api
|
|
||||||
- name: PASSBOOK_INSECURE
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
key: passbook_host_insecure
|
|
||||||
name: passbook-outpost-api
|
|
||||||
image: beryju/passbook-proxy:0.10.0-stable
|
|
||||||
name: proxy
|
|
||||||
ports:
|
|
||||||
- containerPort: 4180
|
|
||||||
name: http
|
|
||||||
protocol: TCP
|
|
||||||
- containerPort: 4443
|
|
||||||
name: https
|
|
||||||
protocol: TCP
|
|
||||||
```
|
|
|
@ -1,14 +0,0 @@
|
||||||
# Outposts
|
|
||||||
|
|
||||||
An outpost is a single deployment of a passbook component, which can be deployed in a completely separate environment. Currently, only the Proxy Provider is supported as outpost.
|
|
||||||
|
|
||||||
![](outposts.png)
|
|
||||||
|
|
||||||
Upon creation, a service account and a token is generated. The service account only has permissions to read the outpost and provider configuration. This token is used by the Outpost to connect to passbook.
|
|
||||||
|
|
||||||
To deploy an outpost, see: <a name="deploy">
|
|
||||||
|
|
||||||
- [Kubernetes](deploy-kubernetes.md)
|
|
||||||
- [docker-compose](deploy-docker-compose.md)
|
|
||||||
|
|
||||||
In future versions, this snippet will be automatically generated. You will also be able to deploy an outpost directly into a kubernetes cluster.
|
|
|
@ -1,41 +0,0 @@
|
||||||
# Expression Policies
|
|
||||||
|
|
||||||
!!! notice
|
|
||||||
These variables are available in addition to the common variables/functions defined in [**Expressions**](../expressions/index.md)
|
|
||||||
|
|
||||||
The passing of the policy is determined by the return value of the code. Use `return True` to pass a policy and `return False` to fail it.
|
|
||||||
|
|
||||||
### Available Functions
|
|
||||||
|
|
||||||
#### `pb_message(message: str)`
|
|
||||||
|
|
||||||
Add a message, visible by the end user. This can be used to show the reason why they were denied.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```python
|
|
||||||
pb_message("Access denied")
|
|
||||||
return False
|
|
||||||
```
|
|
||||||
|
|
||||||
### Context variables
|
|
||||||
|
|
||||||
- `request`: A PolicyRequest object, which has the following properties:
|
|
||||||
- `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.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_client_ip`: Client's IP Address or 255.255.255.255 if no IP Address could be extracted. Can be [compared](../expressions/index.md#comparing-ip-addresses), for example
|
|
||||||
|
|
||||||
```python
|
|
||||||
return pb_client_ip in ip_network('10.0.0.0/24')
|
|
||||||
```
|
|
||||||
|
|
||||||
Additionally, when the policy is executed from a flow, every variable from the flow's current context is accessible under the `context` object.
|
|
||||||
|
|
||||||
This includes the following:
|
|
||||||
|
|
||||||
- `prompt_data`: Data which has been saved from a prompt stage or an external source.
|
|
||||||
- `application`: The application the user is in the process of authorizing.
|
|
||||||
- `pending_user`: The currently pending user
|
|
|
@ -1,12 +0,0 @@
|
||||||
# Property Mapping Expressions
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
!!! notice
|
|
||||||
These variables are available in addition to the common variables/functions defined in [**Expressions**](../expressions/index.md)
|
|
||||||
|
|
||||||
### Context Variables
|
|
||||||
|
|
||||||
- `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.
|
|
|
@ -1,31 +0,0 @@
|
||||||
# OAuth2 Provider
|
|
||||||
|
|
||||||
This provider supports both generic OAuth2 as well as OpenID Connect
|
|
||||||
|
|
||||||
Scopes can be configured using Scope Mappings, a type of [Property Mappings](../property-mappings/index.md#scope-mapping).
|
|
||||||
|
|
||||||
Endpoint | URL
|
|
||||||
---------|---
|
|
||||||
Authorization | `/application/o/authorize/`
|
|
||||||
Token | `/application/o/token/`
|
|
||||||
User Info | `/application/o/userinfo/`
|
|
||||||
End Session | `/application/o/end-session/`
|
|
||||||
Introspect | `/application/o/end-session/`
|
|
||||||
JWKS | `/application/o/<application slug>/jwks/`
|
|
||||||
OpenID Configuration | `/application/o/<application slug>/.well-known/openid-configuration`
|
|
||||||
|
|
||||||
## GitHub Compatibility
|
|
||||||
|
|
||||||
This provider also exposes a GitHub-compatible endpoint. This endpoint can be used by applications, which support authenticating against GitHub Enterprise, but not generic OpenID Connect.
|
|
||||||
|
|
||||||
To use any of the GitHub Compatibility scopes, you have to use the GitHub Compatibility Endpoints.
|
|
||||||
|
|
||||||
|
|
||||||
Endpoint | URL
|
|
||||||
---------|---
|
|
||||||
Authorization | `/login/oauth/authorize`
|
|
||||||
Token | `/login/oauth/access_token`
|
|
||||||
User Info | `/user`
|
|
||||||
User Teams Info | `/user/teams`
|
|
||||||
|
|
||||||
To access the user's email address, a scope of `user:email` is required. To access their groups, `read:org` is required. Because these scopes are handled by a different endpoint, they are not customisable as a Scope Mapping.
|
|
|
@ -1,24 +0,0 @@
|
||||||
# Proxy Provider
|
|
||||||
|
|
||||||
!!! info
|
|
||||||
This provider is to be used in conjunction with [Outposts](../outposts/outposts.md)
|
|
||||||
|
|
||||||
This provider protects applications, which have no built-in support for OAuth2 or SAML. This is done by running a lightweight Reverse Proxy in front of the application, which authenticates the requests.
|
|
||||||
|
|
||||||
passbook Proxy is based on [oauth2_proxy](https://github.com/oauth2-proxy/oauth2-proxy), but has been integrated more tightly with passbook.
|
|
||||||
|
|
||||||
The Proxy these extra headers to the application:
|
|
||||||
|
|
||||||
Header Name | Value
|
|
||||||
-------------|-------
|
|
||||||
X-Forwarded-User | The user's unique identifier (**not the username**)
|
|
||||||
X-Forwarded-Email | The user's email address
|
|
||||||
X-Forwarded-Preferred-Username | The user's username
|
|
||||||
X-Auth-Username | The user's username
|
|
||||||
|
|
||||||
Additionally, you can add more custom headers using `additionalHeaders` in the User or Group Properties, for example
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
additionalHeaders:
|
|
||||||
X-additional-header: bar
|
|
||||||
```
|
|
|
@ -1,12 +0,0 @@
|
||||||
# SAML Provider
|
|
||||||
|
|
||||||
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".
|
|
||||||
|
|
||||||
|
|
||||||
Endpoint | URL
|
|
||||||
---------|---
|
|
||||||
SSO (Redirect binding) | `/application/saml/<application slug>/sso/binding/redirect/`
|
|
||||||
SSO (POST binding) | `/application/saml/<application slug>/sso/binding/post/`
|
|
||||||
IdP-initiated login | `/application/saml/<application slug>/sso/binding/init/`
|
|
||||||
Metadata Download | `/application/saml/<application slug>/metadata/`
|
|
|
@ -1,2 +0,0 @@
|
||||||
mkdocs
|
|
||||||
mkdocs-material
|
|
|
@ -1 +0,0 @@
|
||||||
3.7
|
|
|
@ -1,73 +0,0 @@
|
||||||
# Upgrading to 0.10
|
|
||||||
|
|
||||||
This update brings a lot of big features, such as:
|
|
||||||
|
|
||||||
- New OAuth2/OpenID Provider
|
|
||||||
|
|
||||||
This new provider merges both OAuth2 and OpenID. It is based on the codebase of the old provider, which has been simplified and cleaned from the ground up. Support for Property Mappings has also been added. Because of this change, OpenID and OAuth2 Providers will have to be re-created.
|
|
||||||
|
|
||||||
- Proxy Provider
|
|
||||||
|
|
||||||
Due to this new OAuth2 Provider, the Application Gateway Provider, now simply called "Proxy Provider" has been revamped as well. The new passbook Proxy integrates more tightly with passbook via the new Outposts system. The new proxy also supports multiple applications per proxy instance, can configure TLS based on passbook Keypairs, and more.
|
|
||||||
|
|
||||||
See [Proxy](../providers/proxy.md)
|
|
||||||
|
|
||||||
- Outpost System
|
|
||||||
|
|
||||||
This is a new Object type, currently used only by the Proxy Provider. It manages the creation and permissions of service accounts, which are used by the outposts to communicate with passbook.
|
|
||||||
|
|
||||||
See [Outposts](../outposts/outposts.md)
|
|
||||||
|
|
||||||
- Flow Import/Export
|
|
||||||
|
|
||||||
Flows can now be imported and exported. This feature can be used as a backup system, or to share complex flows with other people. Example flows have also been added to the documentation to help you get going with passbook.
|
|
||||||
|
|
||||||
## Under the hood
|
|
||||||
|
|
||||||
- passbook now runs on Django 3.1 and Channels with complete ASGI enabled
|
|
||||||
- uwsgi has been replaced with Gunicorn and uvicorn
|
|
||||||
- Elastic APM has been replaced with Sentry Performance metrics
|
|
||||||
- Flow title is now configurable separately from the name
|
|
||||||
- All logging output is now json
|
|
||||||
|
|
||||||
## Upgrading
|
|
||||||
|
|
||||||
### docker-compose
|
|
||||||
|
|
||||||
The docker-compose file has been updated, please download the latest from `https://raw.githubusercontent.com/BeryJu/passbook/master/docker-compose.yml`.
|
|
||||||
By default, the new compose file uses a fixed version to prevent unintended updates.
|
|
||||||
|
|
||||||
Before updating the file, stop all containers. Then download the file, pull the new containers and start the database.
|
|
||||||
|
|
||||||
```
|
|
||||||
docker-compose down
|
|
||||||
docker-compose pull
|
|
||||||
docker-compose up --no-start
|
|
||||||
docker-compose start redis postgrseql
|
|
||||||
docker-compose run --rm server migrate
|
|
||||||
docker-compose up -d
|
|
||||||
```
|
|
||||||
|
|
||||||
### Helm
|
|
||||||
|
|
||||||
A few options have changed:
|
|
||||||
|
|
||||||
- `error_reporting` was changed from a simple boolean to a dictionary:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
error_reporting:
|
|
||||||
enabled: false
|
|
||||||
environment: customer
|
|
||||||
send_pii: false
|
|
||||||
```
|
|
||||||
|
|
||||||
- The `apm` and `monitoring` blocks have been removed.
|
|
||||||
- `serverReplicas` and `workerReplicas` have been added
|
|
||||||
|
|
||||||
### Upgrading
|
|
||||||
|
|
||||||
This upgrade only applies if you are upgrading from a running 0.9 instance. Passbook detects this on startup, and automatically executes this upgrade.
|
|
||||||
|
|
||||||
Because this upgrade brings the new OAuth2 Provider, the old providers will be lost in the process. Make sure to take note of the providers you want to bring over.
|
|
||||||
|
|
||||||
Another side-effect of this upgrade is the change of OAuth2 URLs, see [here](../providers/oauth2.md).
|
|
|
@ -1,20 +0,0 @@
|
||||||
# Upgrading to 0.11
|
|
||||||
|
|
||||||
This update brings these headline features:
|
|
||||||
|
|
||||||
- Add Backup and Restore, currently only externally schedulable, documented [here](https://passbook.beryju.org/maintenance/backups/)
|
|
||||||
- New Admin Dashboard with more metrics and Charts
|
|
||||||
|
|
||||||
Shows successful and failed logins from the last 24 hours, as well as the most used applications
|
|
||||||
- Add search to all table views
|
|
||||||
- Outpost now supports a Docker Controller, which installs the Outpost on the same host as passbook, updates and manages it
|
|
||||||
- Add Token Identifier
|
|
||||||
|
|
||||||
Tokens now have an identifier which is used to reference to them, so the Primary key is not shown in URLs
|
|
||||||
- `core/applications/list` API now shows applications the user has access to via policies
|
|
||||||
|
|
||||||
## Upgrading
|
|
||||||
|
|
||||||
This upgrade can be done as with minor upgrades, the only external change is the new docker-compose file, which enabled the Docker Integration for Outposts. To use this feature, please download the latest docker-compose from [here](https://raw.githubusercontent.com/BeryJu/passbook/master/docker-compose.yml).
|
|
||||||
|
|
||||||
Afterwards, you can simply run `docker-compose up -d` and then the normal upgrade command of `docker-compose run --rm server migrate`.
|
|
|
@ -1,63 +0,0 @@
|
||||||
# Upgrading to 0.12
|
|
||||||
|
|
||||||
This update brings these headline features:
|
|
||||||
|
|
||||||
- Rewrite Outpost state Logic, which now supports multiple concurrent Outpost instances.
|
|
||||||
- Add Kubernetes Integration for Outposts, which deploys and maintains Outposts with High Availability in a Kubernetes Cluster
|
|
||||||
- Add System Task Overview to see all background tasks, their status, the log output, and retry them
|
|
||||||
- Alerts now disappear automatically
|
|
||||||
- Audit Logs are now searchable
|
|
||||||
- Users can now create their own Tokens to access the API
|
|
||||||
- docker-compose deployment now uses traefik 2.3
|
|
||||||
|
|
||||||
Fixes:
|
|
||||||
|
|
||||||
- Fix high CPU Usage of the proxy when Websocket connections fail
|
|
||||||
|
|
||||||
## Upgrading
|
|
||||||
|
|
||||||
### docker-compose
|
|
||||||
|
|
||||||
Docker-compose users should download the latest docker-compose file from [here](https://raw.githubusercontent.com/BeryJu/passbook/master/docker-compose.yml). This includes the new traefik 2.3.
|
|
||||||
|
|
||||||
Afterwards, you can simply run `docker-compose up -d` and then the normal upgrade command of `docker-compose run --rm server migrate`.
|
|
||||||
|
|
||||||
### Kubernetes
|
|
||||||
|
|
||||||
For Kubernetes users, there are some changes to the helm values.
|
|
||||||
|
|
||||||
The values change from
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
config:
|
|
||||||
# Optionally specify fixed secret_key, otherwise generated automatically
|
|
||||||
# secret_key: _k*@6h2u2@q-dku57hhgzb7tnx*ba9wodcb^s9g0j59@=y(@_o
|
|
||||||
# Enable error reporting
|
|
||||||
error_reporting:
|
|
||||||
enabled: false
|
|
||||||
environment: customer
|
|
||||||
send_pii: false
|
|
||||||
# Log level used by web and worker
|
|
||||||
# Can be either debug, info, warning, error
|
|
||||||
log_level: warning
|
|
||||||
```
|
|
||||||
|
|
||||||
to
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
config:
|
|
||||||
# Optionally specify fixed secret_key, otherwise generated automatically
|
|
||||||
# secretKey: _k*@6h2u2@q-dku57hhgzb7tnx*ba9wodcb^s9g0j59@=y(@_o
|
|
||||||
# Enable error reporting
|
|
||||||
errorReporting:
|
|
||||||
enabled: false
|
|
||||||
environment: customer
|
|
||||||
sendPii: false
|
|
||||||
# Log level used by web and worker
|
|
||||||
# Can be either debug, info, warning, error
|
|
||||||
logLevel: warning
|
|
||||||
```
|
|
||||||
|
|
||||||
in order to be consistent with the rest of the settings.
|
|
||||||
|
|
||||||
There is also a new setting called `kubernetesIntegration`, which controls the Kubernetes integration for passbook. When enabled (the default), a Service Account is created, which allows passbook to deploy and update Outposts.
|
|
|
@ -25,4 +25,4 @@
|
||||||
| install.redis | true | Enables/disables the packaged Redis Chart
|
| install.redis | true | Enables/disables the packaged Redis Chart
|
||||||
| postgresql.postgresqlPassword | | Password used for PostgreSQL, generated automatically.
|
| postgresql.postgresqlPassword | | Password used for PostgreSQL, generated automatically.
|
||||||
|
|
||||||
For more info, see https://passbook.beryju.org/ and https://passbook.beryju.org/installation/kubernetes/
|
For more info, see https://passbook.beryju.org/ and https://passbook.beryju.org/docs/installation/kubernetes/
|
||||||
|
|
95
mkdocs.yml
|
@ -1,95 +0,0 @@
|
||||||
site_name: passbook Docs
|
|
||||||
site_url: https://passbook.beryju.org/
|
|
||||||
copyright: "Copyright © 2019 - 2020 BeryJu.org"
|
|
||||||
|
|
||||||
nav:
|
|
||||||
- Home: index.md
|
|
||||||
- Terminology: terminology.md
|
|
||||||
- Installation:
|
|
||||||
- docker-compose: installation/docker-compose.md
|
|
||||||
- Kubernetes: installation/kubernetes.md
|
|
||||||
- Reverse Proxy: installation/reverse-proxy.md
|
|
||||||
- Flows:
|
|
||||||
Overview: flow/flows.md
|
|
||||||
Examples: flow/examples/examples.md
|
|
||||||
- Stages:
|
|
||||||
- Captcha Stage: flow/stages/captcha/index.md
|
|
||||||
- Dummy Stage: flow/stages/dummy/index.md
|
|
||||||
- Email Stage: flow/stages/email/index.md
|
|
||||||
- Identification Stage: flow/stages/identification/index.md
|
|
||||||
- Invitation Stage: flow/stages/invitation/index.md
|
|
||||||
- OTP Stage: flow/stages/otp/index.md
|
|
||||||
- Password Stage: flow/stages/password/index.md
|
|
||||||
- Prompt Stage: flow/stages/prompt/index.md
|
|
||||||
- Prompt Stage Validation: flow/stages/prompt/validation.md
|
|
||||||
- User Delete Stage: flow/stages/user_delete.md
|
|
||||||
- User Login Stage: flow/stages/user_login.md
|
|
||||||
- User Logout Stage: flow/stages/user_logout.md
|
|
||||||
- User Write Stage: flow/stages/user_write.md
|
|
||||||
- Sources: sources.md
|
|
||||||
- Providers:
|
|
||||||
- OAuth2: providers/oauth2.md
|
|
||||||
- SAML: providers/saml.md
|
|
||||||
- Proxy: providers/proxy.md
|
|
||||||
- Outposts:
|
|
||||||
- Overview: outposts/outposts.md
|
|
||||||
- Upgrading: outposts/upgrading.md
|
|
||||||
- Deploy on docker-compose: outposts/deploy-docker-compose.md
|
|
||||||
- Deploy on Kubernetes: outposts/deploy-kubernetes.md
|
|
||||||
- Expressions:
|
|
||||||
- Overview: expressions/index.md
|
|
||||||
- Reference:
|
|
||||||
- User Object: expressions/reference/user-object.md
|
|
||||||
- Property Mappings:
|
|
||||||
- Overview: property-mappings/index.md
|
|
||||||
- Expressions: property-mappings/expression.md
|
|
||||||
- Policies:
|
|
||||||
- Overview: policies/index.md
|
|
||||||
- Expression: policies/expression.md
|
|
||||||
- Integrations:
|
|
||||||
- as Source:
|
|
||||||
- Active Directory: integrations/sources/active-directory/index.md
|
|
||||||
- as Provider:
|
|
||||||
- Amazon Web Services: integrations/services/aws/index.md
|
|
||||||
- GitLab: integrations/services/gitlab/index.md
|
|
||||||
- Rancher: integrations/services/rancher/index.md
|
|
||||||
- Harbor: integrations/services/harbor/index.md
|
|
||||||
- Sentry: integrations/services/sentry/index.md
|
|
||||||
- Ansible Tower/AWX: integrations/services/tower-awx/index.md
|
|
||||||
- VMware vCenter: integrations/services/vmware-vcenter/index.md
|
|
||||||
- Ubuntu Landscape: integrations/services/ubuntu-landscape/index.md
|
|
||||||
- Sonarr: integrations/services/sonarr/index.md
|
|
||||||
- Tautulli: integrations/services/tautulli/index.md
|
|
||||||
- Maintenance:
|
|
||||||
- Backups: maintenance/backups/index.md
|
|
||||||
- Upgrading:
|
|
||||||
- to 0.9: upgrading/to-0.9.md
|
|
||||||
- to 0.10: upgrading/to-0.10.md
|
|
||||||
- to 0.11: upgrading/to-0.11.md
|
|
||||||
- to 0.12: upgrading/to-0.12.md
|
|
||||||
- Troubleshooting:
|
|
||||||
- Access problems: troubleshooting/access.md
|
|
||||||
|
|
||||||
repo_name: "BeryJu/passbook"
|
|
||||||
repo_url: https://github.com/BeryJu/passbook
|
|
||||||
theme:
|
|
||||||
name: material
|
|
||||||
logo: images/logo.svg
|
|
||||||
favicon: images/logo.svg
|
|
||||||
palette:
|
|
||||||
scheme: slate
|
|
||||||
primary: white
|
|
||||||
|
|
||||||
markdown_extensions:
|
|
||||||
- toc:
|
|
||||||
permalink: "¶"
|
|
||||||
- admonition
|
|
||||||
- codehilite
|
|
||||||
- pymdownx.betterem:
|
|
||||||
smart_enable: all
|
|
||||||
- pymdownx.inlinehilite
|
|
||||||
- pymdownx.magiclink
|
|
||||||
- attr_list
|
|
||||||
|
|
||||||
plugins:
|
|
||||||
- search
|
|
|
@ -147,5 +147,5 @@ class FlowExportView(LoginRequiredMixin, PermissionRequiredMixin, DetailView):
|
||||||
flow: Flow = self.get_object()
|
flow: Flow = self.get_object()
|
||||||
exporter = FlowExporter(flow)
|
exporter = FlowExporter(flow)
|
||||||
response = JsonResponse(exporter.export(), encoder=DataclassEncoder, safe=False)
|
response = JsonResponse(exporter.export(), encoder=DataclassEncoder, safe=False)
|
||||||
response["Content-Disposition"] = f'attachment; filename="{flow.slug}.json"'
|
response["Content-Disposition"] = f'attachment; filename="{flow.slug}.pbflow"'
|
||||||
return response
|
return response
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
"""Flow and Stage forms"""
|
"""Flow and Stage forms"""
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
|
from django.core.validators import FileExtensionValidator
|
||||||
from django.forms import ValidationError
|
from django.forms import ValidationError
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
@ -62,7 +63,9 @@ class FlowStageBindingForm(forms.ModelForm):
|
||||||
class FlowImportForm(forms.Form):
|
class FlowImportForm(forms.Form):
|
||||||
"""Form used for flow importing"""
|
"""Form used for flow importing"""
|
||||||
|
|
||||||
flow = forms.FileField()
|
flow = forms.FileField(
|
||||||
|
validators=[FileExtensionValidator(allowed_extensions=["pbflow"])]
|
||||||
|
)
|
||||||
|
|
||||||
def clean_flow(self):
|
def clean_flow(self):
|
||||||
"""Check if the flow is valid and rewind the file to the start"""
|
"""Check if the flow is valid and rewind the file to the start"""
|
||||||
|
|
|
@ -12,7 +12,7 @@ class TestTransferDocs(TransactionTestCase):
|
||||||
"""Empty class, test methods are added dynamically"""
|
"""Empty class, test methods are added dynamically"""
|
||||||
|
|
||||||
|
|
||||||
def generic_view_tester(file_name: str) -> Callable:
|
def pbflow_tester(file_name: str) -> Callable:
|
||||||
"""This is used instead of subTest for better visibility"""
|
"""This is used instead of subTest for better visibility"""
|
||||||
|
|
||||||
def tester(self: TestTransferDocs):
|
def tester(self: TestTransferDocs):
|
||||||
|
@ -24,8 +24,6 @@ def generic_view_tester(file_name: str) -> Callable:
|
||||||
return tester
|
return tester
|
||||||
|
|
||||||
|
|
||||||
for flow_file in glob("docs/flow/examples/*.json"):
|
for flow_file in glob("website/static/flows/*.pbflow"):
|
||||||
method_name = Path(flow_file).stem.replace("-", "_").replace(".", "_")
|
method_name = Path(flow_file).stem.replace("-", "_").replace(".", "_")
|
||||||
setattr(
|
setattr(TestTransferDocs, f"test_flow_{method_name}", pbflow_tester(flow_file))
|
||||||
TestTransferDocs, f"test_flow_{method_name}", generic_view_tester(flow_file)
|
|
||||||
)
|
|
||||||
|
|
|
@ -30,6 +30,6 @@ passbook:
|
||||||
# Optionally add links to the footer on the login page
|
# Optionally add links to the footer on the login page
|
||||||
footer_links:
|
footer_links:
|
||||||
- name: Documentation
|
- name: Documentation
|
||||||
href: https://passbook.beryju.org/
|
href: https://passbook.beryju.org/docs/
|
||||||
# - name: test
|
# - name: test
|
||||||
# href: https://test
|
# href: https://test
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<h1 class="pf-c-title pf-m-2xl" id="modal-title">{% trans 'Outpost Deployment Info' %}</h1>
|
<h1 class="pf-c-title pf-m-2xl" id="modal-title">{% trans 'Outpost Deployment Info' %}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="pf-c-modal-box__body" id="modal-description">
|
<div class="pf-c-modal-box__body" id="modal-description">
|
||||||
<p><a href="https://passbook.beryju.org/outposts/outposts/#deploy">{% trans 'View deployment documentation' %}</a></p>
|
<p><a href="https://passbook.beryju.org/docs/outposts/outposts/#deploy">{% trans 'View deployment documentation' %}</a></p>
|
||||||
<form class="pf-c-form">
|
<form class="pf-c-form">
|
||||||
<div class="pf-c-form__group">
|
<div class="pf-c-form__group">
|
||||||
<label class="pf-c-form__label" for="help-text-simple-form-name">
|
<label class="pf-c-form__label" for="help-text-simple-form-name">
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
# Dependencies
|
||||||
|
/node_modules
|
||||||
|
|
||||||
|
# Production
|
||||||
|
/build
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
.docusaurus
|
||||||
|
.cache-loader
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
.DS_Store
|
||||||
|
.env.local
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
|
@ -0,0 +1,4 @@
|
||||||
|
# Ignore artifacts:
|
||||||
|
build
|
||||||
|
coverage
|
||||||
|
.docusaurus
|
|
@ -0,0 +1 @@
|
||||||
|
{}
|
|
@ -0,0 +1,33 @@
|
||||||
|
# Website
|
||||||
|
|
||||||
|
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```console
|
||||||
|
yarn install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Local Development
|
||||||
|
|
||||||
|
```console
|
||||||
|
yarn start
|
||||||
|
```
|
||||||
|
|
||||||
|
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
```console
|
||||||
|
yarn build
|
||||||
|
```
|
||||||
|
|
||||||
|
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||||
|
|
||||||
|
## Deployment
|
||||||
|
|
||||||
|
```console
|
||||||
|
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
|
@ -0,0 +1,3 @@
|
||||||
|
module.exports = {
|
||||||
|
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
|
||||||
|
};
|
|
@ -1,16 +1,19 @@
|
||||||
# Expressions
|
---
|
||||||
|
title: 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.
|
Expressions are used in different places throughout passbook, and can do different things.
|
||||||
|
|
||||||
!!! info
|
:::info
|
||||||
These functions/objects are available wherever expressions are used. For more specific information, see [Expression Policies](../policies/expression.md) and [Property Mappings](../property-mappings/expression.md)
|
These functions/objects are available wherever expressions are used. For more specific information, see [Expression Policies](../policies/expression.md) and [Property Mappings](../property-mappings/expression.md)
|
||||||
|
:::
|
||||||
|
|
||||||
## Global objects
|
## Global objects
|
||||||
|
|
||||||
- `pb_logger`: structlog BoundLogger. ([ref](https://www.structlog.org/en/stable/api.html#structlog.BoundLogger))
|
- `pb_logger`: structlog BoundLogger. ([ref](https://www.structlog.org/en/stable/api.html#structlog.BoundLogger))
|
||||||
- `requests`: requests Session object. ([ref](https://requests.readthedocs.io/en/master/user/advanced/))
|
- `requests`: requests Session object. ([ref](https://requests.readthedocs.io/en/master/user/advanced/))
|
||||||
|
|
||||||
## Generally available functions
|
## Generally available functions
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
title: User Object
|
||||||
|
---
|
||||||
|
|
||||||
|
The User object has the following attributes:
|
||||||
|
|
||||||
|
- `username`: User's username.
|
||||||
|
- `email` User's email.
|
||||||
|
- `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.
|
||||||
|
- `group_attributes` Merged attributes of all groups the user is member of and the user's own attributes.
|
||||||
|
- `pb_groups` This is a queryset of all the user's groups.
|
||||||
|
|
||||||
|
You can do additional filtering like `user.pb_groups.filter(name__startswith='test')`, see [here](https://docs.djangoproject.com/en/3.1/ref/models/querysets/#id4)
|
||||||
|
|
||||||
|
To get the name of all groups, you can do `[group.name for group in user.pb_groups.all()]`
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
List all the User's group names:
|
||||||
|
|
||||||
|
```python
|
||||||
|
for group in user.pb_groups.all():
|
||||||
|
yield group.name
|
||||||
|
```
|
|
@ -1,18 +1,20 @@
|
||||||
# Example Flows
|
---
|
||||||
|
title: Example Flows
|
||||||
!!! info
|
---
|
||||||
You can apply theses flows multiple times to stay updated, however this will discard all changes you've made.
|
|
||||||
|
|
||||||
|
:::info
|
||||||
|
You can apply theses flows multiple times to stay updated, however this will discard all changes you've made.
|
||||||
|
:::
|
||||||
|
|
||||||
## Enrollment (2 Stage)
|
## Enrollment (2 Stage)
|
||||||
|
|
||||||
Flow: right-click [here](enrollment-2-stage.json) and save the file.
|
Flow: right-click [here](/flows/enrollment-2-stage.pbflow) and save the file.
|
||||||
|
|
||||||
Sign-up flow for new users, which prompts them for their username, email, password and name. No verification is done. Users are also immediately logged on after this flow.
|
Sign-up flow for new users, which prompts them for their username, email, password and name. No verification is done. Users are also immediately logged on after this flow.
|
||||||
|
|
||||||
## Enrollment with email verification
|
## Enrollment with email verification
|
||||||
|
|
||||||
Flow: right-click [here](enrollment-email-verification.json) and save the file.
|
Flow: right-click [here](/flows/enrollment-email-verification.pbflow) and save the file.
|
||||||
|
|
||||||
Same flow as above, with an extra email verification stage.
|
Same flow as above, with an extra email verification stage.
|
||||||
|
|
||||||
|
@ -20,13 +22,13 @@ You'll probably have to adjust the Email stage and set your connection details.
|
||||||
|
|
||||||
## Two-factor Login
|
## Two-factor Login
|
||||||
|
|
||||||
Flow: right-click [here](login-2fa.json) and save the file.
|
Flow: right-click [here](/flows/login-2fa.pbflow) and save the file.
|
||||||
|
|
||||||
Login flow which follows the default pattern (username/email, then password), but also checks for the user's OTP token, if they have one configured
|
Login flow which follows the default pattern (username/email, then password), but also checks for the user's OTP token, if they have one configured
|
||||||
|
|
||||||
## Login with conditional Captcha
|
## Login with conditional Captcha
|
||||||
|
|
||||||
Flow: right-click [here](login-conditional-captcha.json) and save the file.
|
Flow: right-click [here](/flows/login-conditional-captcha.pbflow) and save the file.
|
||||||
|
|
||||||
Login flow which conditionally shows the users a captcha, based on the reputation of their IP and Username.
|
Login flow which conditionally shows the users a captcha, based on the reputation of their IP and Username.
|
||||||
|
|
||||||
|
@ -34,16 +36,16 @@ By default, the captcha test keys are used. You can get a proper key [here](http
|
||||||
|
|
||||||
## Recovery with email verification
|
## Recovery with email verification
|
||||||
|
|
||||||
Flow: right-click [here](recovery-email-verification.json) and save the file.
|
Flow: right-click [here](/flows/recovery-email-verification.pbflow) and save the file.
|
||||||
|
|
||||||
Recovery flow, the user is sent an email after they've identified themselves. After they click on the link in the email, they are prompted for a new password and immediately logged on.
|
Recovery flow, the user is sent an email after they've identified themselves. After they click on the link in the email, they are prompted for a new password and immediately logged on.
|
||||||
|
|
||||||
## User deletion
|
## User deletion
|
||||||
|
|
||||||
Flow: right-click [here](unenrollment.json) and save the file.
|
Flow: right-click [here](/flows/unenrollment.pbflow) and save the file.
|
||||||
|
|
||||||
Flow for users to delete their account,
|
Flow for users to delete their account,
|
||||||
|
|
||||||
!!! warning
|
:::warning
|
||||||
This is done without any warning.
|
This is done without any warning.
|
||||||
|
:::
|
|
@ -1,4 +1,6 @@
|
||||||
# Flows
|
---
|
||||||
|
title: Flows
|
||||||
|
---
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
|
@ -1,4 +1,6 @@
|
||||||
# Captcha stage
|
---
|
||||||
|
title: Captcha stage
|
||||||
|
---
|
||||||
|
|
||||||
This stage adds a form of verification using [Google's ReCaptcha](https://www.google.com/recaptcha/intro/v3.html).
|
This stage adds a form of verification using [Google's ReCaptcha](https://www.google.com/recaptcha/intro/v3.html).
|
||||||
|
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
|
@ -1,4 +1,6 @@
|
||||||
# Dummy stage
|
---
|
||||||
|
title: Dummy stage
|
||||||
|
---
|
||||||
|
|
||||||
This stage is used for development and has no function. It presents the user with a form which 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.
|
||||||
|
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
@ -1,4 +1,6 @@
|
||||||
# Email
|
---
|
||||||
|
title: Email stage
|
||||||
|
---
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
# Identification
|
---
|
||||||
|
title: Identification stage
|
||||||
|
---
|
||||||
|
|
||||||
This stage provides a ready-to-go form for users to identify themselves.
|
This stage provides a ready-to-go form for users to identify themselves.
|
||||||
|
|
||||||
|
@ -9,8 +11,8 @@ This stage provides a ready-to-go form for users to identify themselves.
|
||||||
Select which fields the user can use to identify themselves. Multiple fields can be specified and separated with a comma.
|
Select which fields the user can use to identify themselves. Multiple fields can be specified and separated with a comma.
|
||||||
Valid choices:
|
Valid choices:
|
||||||
|
|
||||||
- email
|
- email
|
||||||
- username
|
- username
|
||||||
|
|
||||||
### Template
|
### Template
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
# Invitation Stage
|
---
|
||||||
|
title: Invitation stage
|
||||||
|
---
|
||||||
|
|
||||||
This stage can be used to invite users. You can use this to enroll users with preset values.
|
This stage can be used to invite users. You can use this to enroll users with preset values.
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
title: OTP Static stage
|
||||||
|
---
|
||||||
|
|
||||||
|
This stage configures static OTP Tokens, which can be used as a backup method to time-based OTP tokens.
|
||||||
|
|
||||||
|
You can configure how many tokens are shown to the user.
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
title: OTP Time stage
|
||||||
|
---
|
||||||
|
|
||||||
|
This stage configures a time-based OTP Device, such as Google Authenticator or Authy.
|
||||||
|
|
||||||
|
You can configure how many digest should be used for the OTP Token.
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: OTP Validation stage
|
||||||
|
---
|
||||||
|
|
||||||
|
This stage validates an already configured OTP Device. This device has to be configured using an [OTP Time stage](../otp_time/index.md) or [OTP Static stage](../otp_static/index.md).
|
|
@ -1,3 +1,5 @@
|
||||||
# Password Stage
|
---
|
||||||
|
title: Password stage
|
||||||
|
---
|
||||||
|
|
||||||
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.
|
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.
|
|
@ -1,4 +1,6 @@
|
||||||
# Prompt Stage
|
---
|
||||||
|
title: Prompt stage
|
||||||
|
---
|
||||||
|
|
||||||
This stage is used to show the user arbitrary prompts.
|
This stage is used to show the user arbitrary prompts.
|
||||||
|
|
||||||
|
@ -6,14 +8,14 @@ This stage is used to show the user arbitrary prompts.
|
||||||
|
|
||||||
The prompt can be any of the following types:
|
The prompt can be any of the following types:
|
||||||
|
|
||||||
| Type | Description |
|
| Type | Description |
|
||||||
|----------|------------------------------------------------------------------|
|
| -------- | ----------------------------------------------------------------- |
|
||||||
| text | Arbitrary text. No client-side validation is done. |
|
| text | Arbitrary text. No client-side validation is done. |
|
||||||
| email | Email input. Requires a valid email adress. |
|
| email | Email input. Requires a valid email adress. |
|
||||||
| password | Password input. |
|
| password | Password input. |
|
||||||
| number | Number input. Any number is allowed. |
|
| number | Number input. Any number is allowed. |
|
||||||
| checkbox | Simple checkbox. |
|
| checkbox | Simple checkbox. |
|
||||||
| hidden | Hidden input field. Allows for the pre-setting of default values.|
|
| hidden | Hidden input field. Allows for the pre-setting of default values. |
|
||||||
|
|
||||||
A prompt has the following attributes:
|
A prompt has the following attributes:
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
# Prompt Validation
|
---
|
||||||
|
title: Prompt stage validation
|
||||||
|
---
|
||||||
|
|
||||||
Further validation of prompts can be done using policies.
|
Further validation of prompts can be done using policies.
|
||||||
|
|
||||||
|
@ -11,6 +13,7 @@ if request.context.get('prompt_data').get('password') == request.context.get('pr
|
||||||
pb_message("Passwords don't match.")
|
pb_message("Passwords don't match.")
|
||||||
return False
|
return False
|
||||||
```
|
```
|
||||||
|
|
||||||
This policy expects you to 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.
|
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
title: User delete stage
|
||||||
|
---
|
||||||
|
|
||||||
|
:::danger
|
||||||
|
This stage deletes the `pending_user` without any confirmation. You have to make sure the user is aware of this.
|
||||||
|
:::
|
||||||
|
|
||||||
|
This stage is intended for an unenrollment flow. It deletes the currently pending user.
|
||||||
|
|
||||||
|
The pending user is also removed from the current session.
|
|
@ -1,4 +1,6 @@
|
||||||
# User Login Stage
|
---
|
||||||
|
title: User login stage
|
||||||
|
---
|
||||||
|
|
||||||
This stage attaches a currently pending user to the current session.
|
This stage attaches a currently pending user to the current session.
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
# User Logout Stage
|
---
|
||||||
|
title: User logout stage
|
||||||
|
---
|
||||||
|
|
||||||
Opposite stage of [User Login Stages](user_login.md). It removes the user from the current session.
|
Opposite stage of [User Login Stages](user_login.md). It removes the user from the current session.
|
|
@ -1,3 +1,5 @@
|
||||||
# User Write Stage
|
---
|
||||||
|
title: User write stage
|
||||||
|
---
|
||||||
|
|
||||||
This stages writes data from the current context to the current pending user. If no user is pending, a new one is created.
|
This stages writes data from the current context to the current pending user. If no user is pending, a new one is created.
|
|
@ -1,6 +1,7 @@
|
||||||
#
|
---
|
||||||
![passbook logo](images/logo.svg){: style="height:50px"}
|
title: Welcome to passbook
|
||||||
![passbook brand](images/brand.svg){: style="height:50px"}
|
slug: /
|
||||||
|
---
|
||||||
|
|
||||||
## What is passbook?
|
## What is passbook?
|
||||||
|
|
||||||
|
@ -12,5 +13,5 @@ See [Docker-compose](installation/docker-compose.md) or [Kubernetes](installatio
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
![](images/screen_apps.png)
|
![](/img/screen_apps.png)
|
||||||
![](images/screen_admin.png)
|
![](/img/screen_admin.png)
|
|
@ -1,11 +1,13 @@
|
||||||
# docker-compose
|
---
|
||||||
|
title: docker-compose installation
|
||||||
|
---
|
||||||
|
|
||||||
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
|
## Prerequisites
|
||||||
|
|
||||||
- docker
|
- docker
|
||||||
- docker-compose
|
- docker-compose
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
title: Installation
|
||||||
|
---
|
||||||
|
|
||||||
|
If you want to try out passbook, or only want a small deployment (< 100 Users), you should use [docker-compose](./docker-compose).
|
||||||
|
|
||||||
|
If you want a larger deployment, or you want High-Availability, you should use [Kubernetes](./kubernetes).
|
|
@ -0,0 +1,76 @@
|
||||||
|
---
|
||||||
|
title: Kubernetes installation
|
||||||
|
---
|
||||||
|
|
||||||
|
For a mid to high-load installation, Kubernetes is recommended. passbook is installed using a helm-chart.
|
||||||
|
|
||||||
|
This installation automatically applies database migrations on startup. After the installation is done, you can use `pbadmin` as username and password.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
###################################
|
||||||
|
# Values directly affecting passbook
|
||||||
|
###################################
|
||||||
|
image:
|
||||||
|
name: beryju/passbook
|
||||||
|
name_static: beryju/passbook-static
|
||||||
|
tag: 0.12.10-stable
|
||||||
|
|
||||||
|
serverReplicas: 1
|
||||||
|
workerReplicas: 1
|
||||||
|
|
||||||
|
# Enable the Kubernetes integration which lets passbook deploy outposts into kubernetes
|
||||||
|
kubernetesIntegration: true
|
||||||
|
|
||||||
|
config:
|
||||||
|
# Optionally specify fixed secret_key, otherwise generated automatically
|
||||||
|
# secretKey: _k*@6h2u2@q-dku57hhgzb7tnx*ba9wodcb^s9g0j59@=y(@_o
|
||||||
|
# Enable error reporting
|
||||||
|
errorReporting:
|
||||||
|
enabled: false
|
||||||
|
environment: customer
|
||||||
|
sendPii: false
|
||||||
|
# Log level used by web and worker
|
||||||
|
# Can be either debug, info, warning, error
|
||||||
|
logLevel: warning
|
||||||
|
|
||||||
|
# Enable Database Backups to S3
|
||||||
|
# backup:
|
||||||
|
# accessKey: access-key
|
||||||
|
# secretKey: secret-key
|
||||||
|
# bucket: s3-bucket
|
||||||
|
# region: eu-central-1
|
||||||
|
# host: s3-host
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
annotations:
|
||||||
|
{}
|
||||||
|
# kubernetes.io/ingress.class: nginx
|
||||||
|
# kubernetes.io/tls-acme: "true"
|
||||||
|
hosts:
|
||||||
|
- passbook.k8s.local
|
||||||
|
tls: []
|
||||||
|
# - secretName: chart-example-tls
|
||||||
|
# hosts:
|
||||||
|
# - passbook.k8s.local
|
||||||
|
|
||||||
|
###################################
|
||||||
|
# Values controlling dependencies
|
||||||
|
###################################
|
||||||
|
|
||||||
|
install:
|
||||||
|
postgresql: true
|
||||||
|
redis: true
|
||||||
|
|
||||||
|
# These values influence the bundled postgresql and redis charts, but are also used by passbook to connect
|
||||||
|
postgresql:
|
||||||
|
postgresqlDatabase: passbook
|
||||||
|
|
||||||
|
redis:
|
||||||
|
cluster:
|
||||||
|
enabled: false
|
||||||
|
master:
|
||||||
|
persistence:
|
||||||
|
enabled: false
|
||||||
|
# https://stackoverflow.com/a/59189742
|
||||||
|
disableCommands: []
|
||||||
|
```
|
|
@ -1,4 +1,6 @@
|
||||||
# passbook behind a reverse-proxy
|
---
|
||||||
|
title: passbook behind a reverse-proxy
|
||||||
|
---
|
||||||
|
|
||||||
If you want to access passbook behind a reverse-proxy, use a config like this. It is important that Websocket is enabled, so that Outposts can connect.
|
If you want to access passbook behind a reverse-proxy, use a config like this. It is important that Websocket is enabled, so that Outposts can connect.
|
||||||
|
|
|
@ -1,22 +1,25 @@
|
||||||
# Amazon Web Services Integration
|
---
|
||||||
|
title: Amazon Web Services
|
||||||
|
---
|
||||||
|
|
||||||
## What is AWS
|
## What is AWS
|
||||||
|
|
||||||
!!! note ""
|
:::note
|
||||||
Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform, offering over 175 fully featured services from data centers globally. Millions of customers—including the fastest-growing startups, largest enterprises, and leading government agencies—are using AWS to lower costs, become more agile, and innovate faster.
|
Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform, offering over 175 fully featured services from data centers globally. Millions of customers—including the fastest-growing startups, largest enterprises, and leading government agencies—are using AWS to lower costs, become more agile, and innovate faster.
|
||||||
|
:::
|
||||||
|
|
||||||
## Preparation
|
## Preparation
|
||||||
|
|
||||||
The following placeholders will be used:
|
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`
|
- ACS URL: `https://signin.aws.amazon.com/saml`
|
||||||
- Audience: `urn:amazon:webservices`
|
- Audience: `urn:amazon:webservices`
|
||||||
- Issuer: `passbook`
|
- Issuer: `passbook`
|
||||||
- Binding: `Post`
|
- Binding: `Post`
|
||||||
|
|
||||||
You can of course use a custom signing certificate, and adjust durations.
|
You can of course use a custom signing certificate, and adjust durations.
|
||||||
|
|
|
@ -1,25 +1,28 @@
|
||||||
# GitLab Integration
|
---
|
||||||
|
title: GitLab
|
||||||
|
---
|
||||||
|
|
||||||
## What is GitLab
|
## What is GitLab
|
||||||
|
|
||||||
From https://about.gitlab.com/what-is-gitlab/
|
From https://about.gitlab.com/what-is-gitlab/
|
||||||
|
|
||||||
!!! note ""
|
:::note
|
||||||
GitLab is a complete DevOps platform, delivered as a single application. This makes GitLab unique and makes Concurrent DevOps possible, unlocking your organization from the constraints of a pieced together toolchain. Join us for a live Q&A to learn how GitLab can give you unmatched visibility and higher levels of efficiency in a single application across the DevOps lifecycle.
|
GitLab is a complete DevOps platform, delivered as a single application. This makes GitLab unique and makes Concurrent DevOps possible, unlocking your organization from the constraints of a pieced together toolchain. Join us for a live Q&A to learn how GitLab can give you unmatched visibility and higher levels of efficiency in a single application across the DevOps lifecycle.
|
||||||
|
:::
|
||||||
|
|
||||||
## Preparation
|
## Preparation
|
||||||
|
|
||||||
The following placeholders will be used:
|
The following placeholders will be used:
|
||||||
|
|
||||||
- `gitlab.company` is the FQDN of the GitLab Install
|
- `gitlab.company` is the FQDN of the GitLab Install
|
||||||
- `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://gitlab.company/users/auth/saml/callback`
|
- ACS URL: `https://gitlab.company/users/auth/saml/callback`
|
||||||
- Audience: `https://gitlab.company`
|
- Audience: `https://gitlab.company`
|
||||||
- Issuer: `https://gitlab.company`
|
- Issuer: `https://gitlab.company`
|
||||||
- Binding: `Post`
|
- Binding: `Post`
|
||||||
|
|
||||||
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).
|
||||||
|
|
Before Width: | Height: | Size: 348 KiB After Width: | Height: | Size: 348 KiB |
|
@ -1,11 +1,14 @@
|
||||||
# Harbor Integration
|
---
|
||||||
|
title: Harbor
|
||||||
|
---
|
||||||
|
|
||||||
## What is Harbor
|
## What is Harbor
|
||||||
|
|
||||||
From https://goharbor.io
|
From https://goharbor.io
|
||||||
|
|
||||||
!!! note ""
|
:::note
|
||||||
Harbor is an open source container image registry that secures images with role-based access control, scans images for vulnerabilities, and signs images as trusted. A CNCF Incubating project, Harbor delivers compliance, performance, and interoperability to help you consistently and securely manage images across cloud native compute platforms like Kubernetes and Docker.
|
Harbor is an open source container image registry that secures images with role-based access control, scans images for vulnerabilities, and signs images as trusted. A CNCF Incubating project, Harbor delivers compliance, performance, and interoperability to help you consistently and securely manage images across cloud native compute platforms like Kubernetes and Docker.
|
||||||
|
:::
|
||||||
|
|
||||||
## Preparation
|
## Preparation
|
||||||
|
|
|
@ -1,23 +1,25 @@
|
||||||
# Home-Assistant Integration
|
---
|
||||||
|
title: Home-Assistant
|
||||||
|
---
|
||||||
|
|
||||||
## What is Home-Assistant
|
## What is Home-Assistant
|
||||||
|
|
||||||
From https://www.home-assistant.io/
|
From https://www.home-assistant.io/
|
||||||
|
|
||||||
!!! note ""
|
:::note
|
||||||
Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.
|
Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.
|
||||||
|
:::
|
||||||
|
|
||||||
## Preparation
|
## Preparation
|
||||||
|
|
||||||
The following placeholders will be used:
|
The following placeholders will be used:
|
||||||
|
|
||||||
- `hass.company` is the FQDN of the Home-Assistant install.
|
- `hass.company` is the FQDN of the Home-Assistant install.
|
||||||
- `passbook.company` is the FQDN of the passbook install.
|
- `passbook.company` is the FQDN of the passbook install.
|
||||||
|
|
||||||
!!! note
|
:::note
|
||||||
|
This setup uses https://github.com/BeryJu/hass-auth-header and the passbook proxy for authentication. When this [PR](https://github.com/home-assistant/core/pull/32926) is merged, this will no longer be necessary.
|
||||||
This setup uses https://github.com/BeryJu/hass-auth-header and the passbook proxy for authentication. When this [PR](https://github.com/home-assistant/core/pull/32926) is merged, this will no longer be necessary.
|
:::
|
||||||
|
|
||||||
## Home-Assistant
|
## Home-Assistant
|
||||||
|
|
||||||
|
@ -33,20 +35,20 @@ For example add this to your user's properties and set the Header to `X-pb-hass-
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
additionalHeaders:
|
additionalHeaders:
|
||||||
X-pb-hass-user: some other name
|
X-pb-hass-user: some other name
|
||||||
```
|
```
|
||||||
|
|
||||||
## passbook
|
## passbook
|
||||||
|
|
||||||
Create a Proxy Provider with the following values
|
Create a Proxy Provider with the following values
|
||||||
|
|
||||||
- Internal host
|
- Internal host
|
||||||
|
|
||||||
If Home-Assistant is running in docker, and you're deploying the passbook proxy on the same host, set the value to `http://homeassistant:8123`, where Home-Assistant is the name of your container.
|
If Home-Assistant is running in docker, and you're deploying the passbook proxy on the same host, set the value to `http://homeassistant:8123`, where Home-Assistant is the name of your container.
|
||||||
|
|
||||||
If Home-Assistant is running on a different server than where you are deploying the passbook proxy, set the value to `http://hass.company:8123`.
|
If Home-Assistant is running on a different server than where you are deploying the passbook proxy, set the value to `http://hass.company:8123`.
|
||||||
|
|
||||||
- External host
|
- External host
|
||||||
|
|
||||||
Set this to the external URL you will be accessing Home-Assistant from.
|
Set this to the external URL you will be accessing Home-Assistant from.
|
||||||
|
|
|
@ -1,12 +1,15 @@
|
||||||
# Rancher Integration
|
---
|
||||||
|
title: Rancher
|
||||||
|
---
|
||||||
|
|
||||||
## What is Rancher
|
## What is Rancher
|
||||||
|
|
||||||
From https://rancher.com/products/rancher
|
From https://rancher.com/products/rancher
|
||||||
|
|
||||||
!!! note ""
|
:::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.
|
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
|
## Preparation
|
||||||
|
|
Before Width: | Height: | Size: 525 KiB After Width: | Height: | Size: 525 KiB |
Before Width: | Height: | Size: 316 KiB After Width: | Height: | Size: 316 KiB |
|
@ -1,30 +1,33 @@
|
||||||
# Sentry Integration
|
---
|
||||||
|
title: Sentry
|
||||||
|
---
|
||||||
|
|
||||||
## What is Sentry
|
## What is Sentry
|
||||||
|
|
||||||
From https://sentry.io
|
From https://sentry.io
|
||||||
|
|
||||||
!!! note ""
|
:::note
|
||||||
Sentry provides self-hosted and cloud-based error monitoring that helps all software
|
Sentry provides self-hosted and cloud-based error monitoring that helps all software
|
||||||
teams discover, triage, and prioritize errors in real-time.
|
teams discover, triage, and prioritize errors in real-time.
|
||||||
|
|
||||||
One million developers at over fifty thousand companies already ship
|
One million developers at over fifty thousand companies already ship
|
||||||
better software faster with Sentry. Won’t you join them?
|
better software faster with Sentry. Won’t you join them?
|
||||||
|
:::
|
||||||
|
|
||||||
## Preparation
|
## Preparation
|
||||||
|
|
||||||
The following placeholders will be used:
|
The following placeholders will be used:
|
||||||
|
|
||||||
- `sentry.company` is the FQDN of the Sentry install.
|
- `sentry.company` is the FQDN of the Sentry install.
|
||||||
- `passbook.company` is the FQDN of the passbook install.
|
- `passbook.company` is the FQDN of the passbook install.
|
||||||
|
|
||||||
Create an application in passbook. Create a SAML Provider with the following values
|
Create an application in passbook. Create a SAML Provider with the following values
|
||||||
|
|
||||||
- ACS URL: `https://sentry.company/saml/acs/<sentry organisation name>/`
|
- ACS URL: `https://sentry.company/saml/acs/<sentry organisation name>/`
|
||||||
- Audience: `https://sentry.company/saml/metadata/<sentry organisation name>/`
|
- Audience: `https://sentry.company/saml/metadata/<sentry organisation name>/`
|
||||||
- Issuer: `passbook`
|
- Issuer: `passbook`
|
||||||
- Service Provider Binding: `Post`
|
- Service Provider Binding: `Post`
|
||||||
- Property Mapping: Select all Autogenerated Mappings
|
- Property Mapping: Select all Autogenerated Mappings
|
||||||
|
|
||||||
## Sentry
|
## Sentry
|
||||||
|
|
|
@ -1,32 +1,37 @@
|
||||||
|
---
|
||||||
|
title: Sonarr
|
||||||
|
---
|
||||||
|
|
||||||
# Sonarr Integration
|
# Sonarr Integration
|
||||||
|
|
||||||
!!! note
|
:::note
|
||||||
These instructions apply to all projects in the *arr Family. If you use multiple of these projects, you can assign them to the same Outpost.
|
These instructions apply to all projects in the \*arr Family. If you use multiple of these projects, you can assign them to the same Outpost.
|
||||||
|
:::
|
||||||
|
|
||||||
## What is Sonarr
|
## What is Sonarr
|
||||||
|
|
||||||
From https://github.com/Sonarr/Sonarr
|
From https://github.com/Sonarr/Sonarr
|
||||||
|
|
||||||
!!! note ""
|
:::note
|
||||||
Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
|
Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.
|
||||||
|
:::
|
||||||
|
|
||||||
## Preparation
|
## Preparation
|
||||||
|
|
||||||
The following placeholders will be used:
|
The following placeholders will be used:
|
||||||
|
|
||||||
- `sonarr.company` is the FQDN of the Sonarr install.
|
- `sonarr.company` is the FQDN of the Sonarr install.
|
||||||
- `passbook.company` is the FQDN of the passbook install.
|
- `passbook.company` is the FQDN of the passbook install.
|
||||||
|
|
||||||
Create a Proxy Provider with the following values
|
Create a Proxy Provider with the following values
|
||||||
|
|
||||||
- Internal host
|
- Internal host
|
||||||
|
|
||||||
If Sonarr is running in docker, and you're deploying the passbook proxy on the same host, set the value to `http://sonarr:8989`, where sonarr is the name of your container.
|
If Sonarr is running in docker, and you're deploying the passbook proxy on the same host, set the value to `http://sonarr:8989`, where sonarr is the name of your container.
|
||||||
|
|
||||||
If Sonarr is running on a different server than where you are deploying the passbook proxy, set the value to `http://sonarr.company:8989`.
|
If Sonarr is running on a different server than where you are deploying the passbook proxy, set the value to `http://sonarr.company:8989`.
|
||||||
|
|
||||||
- External host
|
- External host
|
||||||
|
|
||||||
Set this to the external URL you will be accessing Sonarr from.
|
Set this to the external URL you will be accessing Sonarr from.
|
||||||
|
|
|
@ -1,18 +1,21 @@
|
||||||
# Tautulli Integration
|
---
|
||||||
|
title: Tautulli
|
||||||
|
---
|
||||||
|
|
||||||
## What is Tautulli
|
## What is Tautulli
|
||||||
|
|
||||||
From https://tautulli.com/
|
From https://tautulli.com/
|
||||||
|
|
||||||
!!! note
|
:::note
|
||||||
Tautulli is a 3rd party application that you can run alongside your Plex Media Server to monitor activity and track various statistics. Most importantly, these statistics include what has been watched, who watched it, when and where they watched it, and how it was watched. The only thing missing is "why they watched it", but who am I to question your 42 plays of Frozen. All statistics are presented in a nice and clean interface with many tables and graphs, which makes it easy to brag about your server to everyone else.
|
Tautulli is a 3rd party application that you can run alongside your Plex Media Server to monitor activity and track various statistics. Most importantly, these statistics include what has been watched, who watched it, when and where they watched it, and how it was watched. The only thing missing is "why they watched it", but who am I to question your 42 plays of Frozen. All statistics are presented in a nice and clean interface with many tables and graphs, which makes it easy to brag about your server to everyone else.
|
||||||
|
:::
|
||||||
|
|
||||||
## Preparation
|
## Preparation
|
||||||
|
|
||||||
The following placeholders will be used:
|
The following placeholders will be used:
|
||||||
|
|
||||||
- `tautulli.company` is the FQDN of the Tautulli install.
|
- `tautulli.company` is the FQDN of the Tautulli install.
|
||||||
- `passbook.company` is the FQDN of the passbook install.
|
- `passbook.company` is the FQDN of the passbook install.
|
||||||
|
|
||||||
## passbook Setup
|
## passbook Setup
|
||||||
|
|
||||||
|
@ -27,13 +30,13 @@ Add all Tautulli users to the Group. You should also create a Group Membership P
|
||||||
|
|
||||||
Create an application in passbook. Create a Proxy provider with the following parameters:
|
Create an application in passbook. Create a Proxy provider with the following parameters:
|
||||||
|
|
||||||
- Internal host
|
- Internal host
|
||||||
|
|
||||||
If Tautulli is running in docker, and you're deploying the passbook proxy on the same host, set the value to `http://tautulli:3579`, where tautulli is the name of your container.
|
If Tautulli is running in docker, and you're deploying the passbook proxy on the same host, set the value to `http://tautulli:3579`, where tautulli is the name of your container.
|
||||||
|
|
||||||
If Tautulli is running on a different server to where you are deploying the passbook proxy, set the value to `http://tautulli.company:3579`.
|
If Tautulli is running on a different server to where you are deploying the passbook proxy, set the value to `http://tautulli.company:3579`.
|
||||||
|
|
||||||
- External host
|
- External host
|
||||||
|
|
||||||
Set this to the external URL you will be accessing Tautulli from.
|
Set this to the external URL you will be accessing Tautulli from.
|
||||||
|
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
|
@ -0,0 +1,79 @@
|
||||||
|
---
|
||||||
|
title: Ansible Tower / AWX
|
||||||
|
---
|
||||||
|
|
||||||
|
## What is Tower
|
||||||
|
|
||||||
|
From https://docs.ansible.com/ansible/2.5/reference_appendices/tower.html
|
||||||
|
|
||||||
|
:::note
|
||||||
|
Ansible Tower (formerly ‘AWX’) is a web-based solution that makes Ansible even more easy to use for IT teams of all kinds. It’s designed to be the hub for all of your automation tasks.
|
||||||
|
|
||||||
|
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. 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.
|
||||||
|
|
||||||
|
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`
|
||||||
|
- Service Provider Binding: Post
|
||||||
|
- Issuer: `https://awx.company/sso/metadata/saml/`
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Provide metadata in the `SAML Service Provider Organization Info` field:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"en-US": {
|
||||||
|
"name": "passbook",
|
||||||
|
"url": "https://passbook.company",
|
||||||
|
"displayname": "passbook"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Provide metadata in the `SAML Service Provider Technical Contact` and `SAML Service Provider Technical Contact` fields:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"givenName": "Admin Name",
|
||||||
|
"emailAddress": "admin@company"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
In the `SAML Enabled Identity Providers` paste the following configuration:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"passbook": {
|
||||||
|
"attr_username": "urn:oid:2.16.840.1.113730.3.1.241",
|
||||||
|
"attr_user_permanent_id": "urn:oid:0.9.2342.19200300.100.1.1",
|
||||||
|
"x509cert": "MIIDEjCCAfqgAwIBAgIRAJZ9pOZ1g0xjiHtQAAejsMEwDQYJKoZIhvcNAQELBQAwMDEuMCwGA1UEAwwlcGFzc2Jvb2sgU2VsZi1zaWduZWQgU0FNTCBDZXJ0aWZpY2F0ZTAeFw0xOTEyMjYyMDEwNDFaFw0yMDEyMjYyMDEwNDFaMFkxLjAsBgNVBAMMJXBhc3Nib29rIFNlbGYtc2lnbmVkIFNBTUwgQ2VydGlmaWNhdGUxETAPBgNVBAoMCHBhc3Nib29rMRQwEgYDVQQLDAtTZWxmLXNpZ25lZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO/ktBYZkY9xAijF4acvzX6Q1K8KoIZeyde8fVgcWBz4L5FgDQ4/dni4k2YAcPdwteGL4nKVzetUzjbRCBUNuO6lqU4J4WNNX4Xg4Ir7XLRoAQeo+omTPBdpJ1p02HjtN5jT01umN3bK2yto1e37CJhK6WJiaXqRewPxh4lI4aqdj3BhFkJ3I3r2qxaWOAXQ6X7fg3w/ny7QP53//ouZo7hSLY3GIcRKgvdjjVM3OW5C3WLpOq5Dez5GWVJ17aeFCfGQ8bwFKde6qfYqyGcU9xHB36TtVHB9hSFP/tUFhkiSOxtsrYwCgCyXm4UTSpP+wiNyjKfFw7qGLBvA2hGTNw8CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAh9PeAqPRQk1/SSygIFADZBi08O/DPCshFwEHvJATIcTzcDD8UGAjXh+H5OlkDyX7KyrcaNvYaafCUo63A+WprdtdY5Ty6SBEwTYyiQyQfwM9BfK+imCoif1Ai7xAelD7p9lNazWq7JU+H/Ep7U7Q7LvpxAbK0JArt+IWTb2NcMb3OWE1r0gFbs44O1l6W9UbJTbyLMzbGbe5i+NHlgnwPwuhtRMh0NUYabGHKcHbhwyFhfGAQv2dAp5KF1E5gu6ZzCiFePzc0FrqXQyb2zpFYcJHXquiqaOeG7cZxRHYcjrl10Vxzki64XVA9BpdELgKSnupDGUEJsRUt3WVOmvZuA==",
|
||||||
|
"url": "https://passbook.company/application/saml/awx/login/",
|
||||||
|
"attr_last_name": "User.LastName",
|
||||||
|
"entity_id": "https://awx.company/sso/metadata/saml/",
|
||||||
|
"attr_email": "urn:oid:0.9.2342.19200300.100.1.3",
|
||||||
|
"attr_first_name": "urn:oid:2.5.4.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
`x509cert` is the certificate configured in passbook. Remove the `--BEGIN CERTIFICATE--` and `--END CERTIFICATE--` headers, then enter the cert as one non-breaking string.
|
|
@ -1,23 +1,25 @@
|
||||||
# Ubuntu Landscape Integration
|
---
|
||||||
|
title: Ubuntu Landscape
|
||||||
|
---
|
||||||
|
|
||||||
## What is Ubuntu Landscape
|
## What is Ubuntu Landscape
|
||||||
|
|
||||||
From https://en.wikipedia.org/wiki/Landscape_(software)
|
From https://en.wikipedia.org/wiki/Landscape_(software)
|
||||||
|
|
||||||
!!! note ""
|
:::note
|
||||||
|
Landscape is a systems management tool developed by Canonical. It can be run on-premises or in the cloud depending on the needs of the user. It is primarily designed for use with Ubuntu derivatives such as Desktop, Server, and Core.
|
||||||
|
:::
|
||||||
|
|
||||||
Landscape is a systems management tool developed by Canonical. It can be run on-premises or in the cloud depending on the needs of the user. It is primarily designed for use with Ubuntu derivatives such as Desktop, Server, and Core.
|
:::warning
|
||||||
|
This requires passbook 0.10.3 or newer.
|
||||||
!!! warning
|
:::
|
||||||
|
|
||||||
This requires passbook 0.10.3 or newer.
|
|
||||||
|
|
||||||
## Preparation
|
## Preparation
|
||||||
|
|
||||||
The following placeholders will be used:
|
The following placeholders will be used:
|
||||||
|
|
||||||
- `landscape.company` is the FQDN of the Landscape server.
|
- `landscape.company` is the FQDN of the Landscape server.
|
||||||
- `passbook.company` is the FQDN of the passbook install.
|
- `passbook.company` is the FQDN of the passbook install.
|
||||||
|
|
||||||
Landscape uses the OpenID-Connect Protocol for single-sign on.
|
Landscape uses the OpenID-Connect Protocol for single-sign on.
|
||||||
|
|
|
@ -0,0 +1,86 @@
|
||||||
|
---
|
||||||
|
title: VMware vCenter
|
||||||
|
---
|
||||||
|
|
||||||
|
## What is vCenter
|
||||||
|
|
||||||
|
From https://en.wikipedia.org/wiki/VCenter
|
||||||
|
|
||||||
|
:::note
|
||||||
|
vCenter Server is the centralized management utility for VMware, and is used to manage virtual machines, multiple ESXi hosts, and all dependent components from a single centralized location. VMware vMotion and svMotion require the use of vCenter and ESXi hosts.
|
||||||
|
:::
|
||||||
|
|
||||||
|
:::warning
|
||||||
|
This requires passbook 0.10.3 or newer.
|
||||||
|
:::
|
||||||
|
|
||||||
|
:::warning
|
||||||
|
This requires VMware vCenter 7.0.0 or newer.
|
||||||
|
:::
|
||||||
|
|
||||||
|
:::note
|
||||||
|
It seems that the vCenter still needs to be joined to the Active Directory Domain, otherwise group membership does not work correctly. We're working on a fix for this, for the meantime your vCenter should be part of your Domain.
|
||||||
|
:::
|
||||||
|
|
||||||
|
## Preparation
|
||||||
|
|
||||||
|
The following placeholders will be used:
|
||||||
|
|
||||||
|
- `vcenter.company` is the FQDN of the vCenter server.
|
||||||
|
- `passbook.company` is the FQDN of the passbook install.
|
||||||
|
|
||||||
|
Since vCenter only allows OpenID-Connect in combination with Active Directory, it is recommended to have passbook sync with the same Active Directory.
|
||||||
|
|
||||||
|
### Step 1
|
||||||
|
|
||||||
|
Under _Property Mappings_, create a _Scope Mapping_. Give it a name like "OIDC-Scope-VMware-vCenter". Set the scope name to `openid` and the expression to the following
|
||||||
|
|
||||||
|
```python
|
||||||
|
return {
|
||||||
|
"domain": "<your active directory domain>",
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 2
|
||||||
|
|
||||||
|
:::note
|
||||||
|
If your Active Directory Schema is the same as your Email address schema, skip to Step 3.
|
||||||
|
:::
|
||||||
|
|
||||||
|
Under _Sources_, click _Edit_ and ensure that "Autogenerated Active Directory Mapping: userPrincipalName -> attributes.upn" has been added to your source.
|
||||||
|
|
||||||
|
### Step 3
|
||||||
|
|
||||||
|
Under _Providers_, create an OAuth2/OpenID Provider with these settings:
|
||||||
|
|
||||||
|
- Client Type: Confidential
|
||||||
|
- Response Type: code (ADFS Compatibility Mode, sends id_token as access_token)
|
||||||
|
- JWT Algorithm: RS256
|
||||||
|
- Redirect URI: `https://vcenter.company/ui/login/oauth2/authcode`
|
||||||
|
- Post Logout Redirect URIs: `https://vcenter.company/ui/login`
|
||||||
|
- Sub Mode: If your Email address Schema matches your UPN, select "Based on the User's Email...", otherwise select "Based on the User's UPN...".
|
||||||
|
- Scopes: Select the Scope Mapping you've created in Step 1
|
||||||
|
|
||||||
|
![](./passbook_setup.png)
|
||||||
|
|
||||||
|
### Step 4
|
||||||
|
|
||||||
|
Create an application which uses this provider. Optionally apply access restrictions to the application.
|
||||||
|
|
||||||
|
Set the Launch URL to `https://vcenter.company/ui/login/oauth2`. This will skip vCenter's User Prompt and directly log you in.
|
||||||
|
|
||||||
|
## vCenter Setup
|
||||||
|
|
||||||
|
Login as local Administrator account (most likely ends with vsphere.local). Using the Menu in the Navigation bar, navigate to _Administration -> Single Sing-on -> Configuration_.
|
||||||
|
|
||||||
|
Click on _Change Identity Provider_ in the top-right corner.
|
||||||
|
|
||||||
|
In the wizard, select "Microsoft ADFS" and click Next.
|
||||||
|
|
||||||
|
Fill in the Client Identifier and Shared Secret from the Provider in passbook. For the OpenID Address, click on _View Setup URLs_ in passbook, and copy the OpenID Configuration URL.
|
||||||
|
|
||||||
|
On the next page, fill in your Active Directory Connection Details. These should be similar to what you have set in passbook.
|
||||||
|
|
||||||
|
![](./vcenter_post_setup.png)
|
||||||
|
|
||||||
|
If your vCenter was already setup with LDAP beforehand, your Role assignments will continue to work.
|
Before Width: | Height: | Size: 173 KiB After Width: | Height: | Size: 173 KiB |
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
|
@ -1,11 +1,13 @@
|
||||||
# Active Directory Integration
|
---
|
||||||
|
title: Active Directory
|
||||||
|
---
|
||||||
|
|
||||||
## Preparation
|
## Preparation
|
||||||
|
|
||||||
The following placeholders will be used:
|
The following placeholders will be used:
|
||||||
|
|
||||||
- `ad.company` is the Name of the Active Directory domain.
|
- `ad.company` is the Name of the Active Directory domain.
|
||||||
- `passbook.company` is the FQDN of the passbook install.
|
- `passbook.company` is the FQDN of the passbook install.
|
||||||
|
|
||||||
## Active Directory Setup
|
## Active Directory Setup
|
||||||
|
|
||||||
|
@ -31,24 +33,24 @@ In passbook, create a new LDAP Source in Administration -> Sources.
|
||||||
|
|
||||||
Use these settings:
|
Use these settings:
|
||||||
|
|
||||||
- Server URI: `ldap://ad.company`
|
- Server URI: `ldap://ad.company`
|
||||||
|
|
||||||
For passbook to be able to write passwords back to Active Directory, make sure to use `ldaps://`
|
For passbook to be able to write passwords back to Active Directory, make sure to use `ldaps://`
|
||||||
|
|
||||||
- Bind CN: `<name of your service user>@ad.company`
|
- Bind CN: `<name of your service user>@ad.company`
|
||||||
- Bind Password: The password you've given the user above
|
- Bind Password: The password you've given the user above
|
||||||
- Base DN: The base DN which you want passbook to sync
|
- Base DN: The base DN which you want passbook to sync
|
||||||
- Property Mappings: Select all and click the right arrow
|
- Property Mappings: Select all and click the right arrow
|
||||||
|
|
||||||
The other settings might need to be adjusted based on the setup of your domain.
|
The other settings might need to be adjusted based on the setup of your domain.
|
||||||
|
|
||||||
- Addition User/Group DN: Additional DN which is *prepended* to your Base DN for user synchronization.
|
- Addition User/Group DN: Additional DN which is _prepended_ to your Base DN for user synchronization.
|
||||||
- Addition Group DN: Additional DN which is *prepended* to your Base DN for group synchronization.
|
- Addition Group DN: Additional DN which is _prepended_ to your Base DN for group synchronization.
|
||||||
- User object filter: Which objects should be considered users.
|
- User object filter: Which objects should be considered users.
|
||||||
- Group object filter: Which objects should be considered groups.
|
- Group object filter: Which objects should be considered groups.
|
||||||
- User group membership field: Which user field saves the group membership
|
- User group membership field: Which user field saves the group membership
|
||||||
- Object uniqueness field: A user field which contains a unique Identifier
|
- Object uniqueness field: A user field which contains a unique Identifier
|
||||||
- Sync parent group: If enabled, all synchronized groups will be given this group as a parent.
|
- Sync parent group: If enabled, all synchronized groups will be given this group as a parent.
|
||||||
|
|
||||||
After you save the source, a synchronization will start in the background. When its done, you cen see the summary on the System Tasks page.
|
After you save the source, a synchronization will start in the background. When its done, you cen see the summary on the System Tasks page.
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
# Backup and restore
|
---
|
||||||
|
title: Backup and restore
|
||||||
|
---
|
||||||
|
|
||||||
!!! warning
|
:::warning
|
||||||
|
Local backups are only supported for docker-compose installs. If you want to backup a Kubernetes instance locally, use an S3-compatible server such as [minio](https://min.io/)
|
||||||
Local backups are only supported for docker-compose installs. If you want to backup a Kubernetes instance locally, use an S3-compatible server such as [minio](https://min.io/)
|
:::
|
||||||
|
|
||||||
### Backup
|
### Backup
|
||||||
|
|
||||||
!!! notice
|
:::note
|
||||||
|
Local backups are **enabled** by default, and will be run daily at 00:00
|
||||||
Local backups are **enabled** by default, and will be run daily at 00:00
|
:::
|
||||||
|
|
||||||
Local backups can be created by running the following command in your passbook installation directory
|
Local backups can be created by running the following command in your passbook installation directory
|
||||||
|
|
||||||
|
@ -18,7 +20,6 @@ docker-compose run --rm worker backup
|
||||||
|
|
||||||
This will dump the current database into the `./backups` folder. By defaults, the last 10 Backups are kept.
|
This will dump the current database into the `./backups` folder. By defaults, the last 10 Backups are kept.
|
||||||
|
|
||||||
|
|
||||||
### Restore
|
### Restore
|
||||||
|
|
||||||
Run this command in your passbook installation directory
|
Run this command in your passbook installation directory
|
||||||
|
@ -92,11 +93,11 @@ Simply enable these options in your values.yaml file
|
||||||
```yaml
|
```yaml
|
||||||
# Enable Database Backups to S3
|
# Enable Database Backups to S3
|
||||||
backup:
|
backup:
|
||||||
accessKey: access-key
|
accessKey: access-key
|
||||||
secretKey: secret-key
|
secretKey: secret-key
|
||||||
bucket: s3-bucket
|
bucket: s3-bucket
|
||||||
region: eu-central-1
|
region: eu-central-1
|
||||||
host: s3-host
|
host: s3-host
|
||||||
```
|
```
|
||||||
|
|
||||||
Afterwards, run a `helm upgrade` to update the ConfigMap. Backups are done automatically as above, at 00:00 every day.
|
Afterwards, run a `helm upgrade` to update the ConfigMap. Backups are done automatically as above, at 00:00 every day.
|
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
title: Manual Outpost deployment in docker-compose
|
||||||
|
---
|
||||||
|
|
||||||
|
To deploy an outpost with docker-compose, use this snippet in your docker-compose file.
|
||||||
|
|
||||||
|
You can also run the outpost in a separate docker-compose project, you just have to ensure that the outpost container can reach your application container.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
version: "3.5"
|
||||||
|
|
||||||
|
services:
|
||||||
|
passbook_proxy:
|
||||||
|
image: beryju/passbook-proxy:0.10.0-stable
|
||||||
|
ports:
|
||||||
|
- 4180:4180
|
||||||
|
- 4443:4443
|
||||||
|
environment:
|
||||||
|
PASSBOOK_HOST: https://your-passbook.tld
|
||||||
|
PASSBOOK_INSECURE: "false"
|
||||||
|
PASSBOOK_TOKEN: token-generated-by-passbook
|
||||||
|
```
|
|
@ -0,0 +1,101 @@
|
||||||
|
---
|
||||||
|
title: Manual Outpost deployment on Kubernetes
|
||||||
|
---
|
||||||
|
|
||||||
|
Use the following manifest, replacing all values surrounded with `__`.
|
||||||
|
|
||||||
|
Afterwards, configure the proxy provider to connect to `<service name>.<namespace>.svc.cluster.local`, and update your Ingress to connect to the `passbook-outpost` service.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: test
|
||||||
|
app.kubernetes.io/managed-by: passbook.beryju.org
|
||||||
|
app.kubernetes.io/name: passbook-proxy
|
||||||
|
app.kubernetes.io/version: 0.10.0
|
||||||
|
name: passbook-outpost-api
|
||||||
|
stringData:
|
||||||
|
passbook_host: "__PASSBOOK_URL__"
|
||||||
|
passbook_host_insecure: "true"
|
||||||
|
token: "__PASSBOOK_TOKEN__"
|
||||||
|
type: Opaque
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: test
|
||||||
|
app.kubernetes.io/managed-by: passbook.beryju.org
|
||||||
|
app.kubernetes.io/name: passbook-proxy
|
||||||
|
app.kubernetes.io/version: 0.10.0
|
||||||
|
name: passbook-outpost
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 4180
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: http
|
||||||
|
- name: https
|
||||||
|
port: 4443
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: https
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/instance: test
|
||||||
|
app.kubernetes.io/managed-by: passbook.beryju.org
|
||||||
|
app.kubernetes.io/name: passbook-proxy
|
||||||
|
app.kubernetes.io/version: 0.10.0
|
||||||
|
type: ClusterIP
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: test
|
||||||
|
app.kubernetes.io/managed-by: passbook.beryju.org
|
||||||
|
app.kubernetes.io/name: passbook-proxy
|
||||||
|
app.kubernetes.io/version: 0.10.0
|
||||||
|
name: passbook-outpost
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/instance: test
|
||||||
|
app.kubernetes.io/managed-by: passbook.beryju.org
|
||||||
|
app.kubernetes.io/name: passbook-proxy
|
||||||
|
app.kubernetes.io/version: 0.10.0
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: test
|
||||||
|
app.kubernetes.io/managed-by: passbook.beryju.org
|
||||||
|
app.kubernetes.io/name: passbook-proxy
|
||||||
|
app.kubernetes.io/version: 0.10.0
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- env:
|
||||||
|
- name: PASSBOOK_HOST
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: passbook_host
|
||||||
|
name: passbook-outpost-api
|
||||||
|
- name: PASSBOOK_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: token
|
||||||
|
name: passbook-outpost-api
|
||||||
|
- name: PASSBOOK_INSECURE
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: passbook_host_insecure
|
||||||
|
name: passbook-outpost-api
|
||||||
|
image: beryju/passbook-proxy:0.10.0-stable
|
||||||
|
name: proxy
|
||||||
|
ports:
|
||||||
|
- containerPort: 4180
|
||||||
|
name: http
|
||||||
|
protocol: TCP
|
||||||
|
- containerPort: 4443
|
||||||
|
name: https
|
||||||
|
protocol: TCP
|
||||||
|
```
|
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
title: Outposts
|
||||||
|
---
|
||||||
|
|
||||||
|
An outpost is a single deployment of a passbook component, which can be deployed in a completely separate environment. Currently, only the Proxy Provider is supported as outpost.
|
||||||
|
|
||||||
|
![](outposts.png)
|
||||||
|
|
||||||
|
Upon creation, a service account and a token is generated. The service account only has permissions to read the outpost and provider configuration. This token is used by the Outpost to connect to passbook.
|
||||||
|
|
||||||
|
passbook can manage the deployment, updating and general lifecycle of an Outpost. To communicate with the underlying platforms on which the outpost is deployed, passbook has "Service Connections".
|
||||||
|
|
||||||
|
- If you've deployed passbook on docker-compose, passbook automatically create a Service Connection for the local docker socket.
|
||||||
|
- If you've deployed passbook on Kubernetes, with `kubernetesIntegration` set to true (default), passbook automatically creates a Service Connection for the local Kubernetes Cluster.
|
||||||
|
|
||||||
|
To deploy an outpost with these service connections, simply selected them during the creation of an Outpost. A background task is started, which creates the container/deployment. You can see that Status on the System Tasks page.
|
||||||
|
|
||||||
|
To deploy an outpost manually, see:
|
||||||
|
|
||||||
|
- [Kubernetes](./manual-deploy-kubernetes.md)
|
||||||
|
- [docker-compose](./manual-deploy-docker-compose.md)
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 122 KiB |
|
@ -1,4 +1,6 @@
|
||||||
# Upgrading an Outpost
|
---
|
||||||
|
title: Upgrading an Outpost
|
||||||
|
---
|
||||||
|
|
||||||
In the Outpost Overview list, you'll see if any deployed outposts are out of date.
|
In the Outpost Overview list, you'll see if any deployed outposts are out of date.
|
||||||
|
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
@ -0,0 +1,44 @@
|
||||||
|
---
|
||||||
|
title: Expression Policies
|
||||||
|
---
|
||||||
|
|
||||||
|
:::note
|
||||||
|
These variables are available in addition to the common variables/functions defined in [**Expressions**](../expressions/index.md)
|
||||||
|
:::
|
||||||
|
|
||||||
|
The passing of the policy is determined by the return value of the code. Use `return True` to pass a policy and `return False` to fail it.
|
||||||
|
|
||||||
|
### Available Functions
|
||||||
|
|
||||||
|
#### `pb_message(message: str)`
|
||||||
|
|
||||||
|
Add a message, visible by the end user. This can be used to show the reason why they were denied.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```python
|
||||||
|
pb_message("Access denied")
|
||||||
|
return False
|
||||||
|
```
|
||||||
|
|
||||||
|
### Context variables
|
||||||
|
|
||||||
|
- `request`: A PolicyRequest object, which has the following properties:
|
||||||
|
- `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.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_client_ip`: Client's IP Address or 255.255.255.255 if no IP Address could be extracted. Can be [compared](../expressions/index.md#comparing-ip-addresses), for example
|
||||||
|
|
||||||
|
```python
|
||||||
|
return pb_client_ip in ip_network('10.0.0.0/24')
|
||||||
|
```
|
||||||
|
|
||||||
|
Additionally, when the policy is executed from a flow, every variable from the flow's current context is accessible under the `context` object.
|
||||||
|
|
||||||
|
This includes the following:
|
||||||
|
|
||||||
|
- `prompt_data`: Data which has been saved from a prompt stage or an external source.
|
||||||
|
- `application`: The application the user is in the process of authorizing.
|
||||||
|
- `pending_user`: The currently pending user
|
|
@ -1,8 +1,6 @@
|
||||||
# Policies
|
---
|
||||||
|
title: Policies
|
||||||
## Kinds
|
---
|
||||||
|
|
||||||
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
|
## Standard Policies
|
||||||
|
|
||||||
|
@ -27,11 +25,11 @@ See [Expression Policy](expression.md).
|
||||||
This policy allows you to specify password rules, such as length and required characters.
|
This policy allows you to specify password rules, such as length and required characters.
|
||||||
The following rules can be set:
|
The following rules can be set:
|
||||||
|
|
||||||
- Minimum amount of uppercase characters.
|
- Minimum amount of uppercase characters.
|
||||||
- Minimum amount of lowercase characters.
|
- Minimum amount of lowercase characters.
|
||||||
- Minimum amount of symbols characters.
|
- Minimum amount of symbols characters.
|
||||||
- Minimum length.
|
- Minimum length.
|
||||||
- Symbol charset (define which characters are counted as symbols).
|
- Symbol charset (define which characters are counted as symbols).
|
||||||
|
|
||||||
### Have I Been Pwned Policy
|
### Have I Been Pwned Policy
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
title: Property Mapping Expressions
|
||||||
|
---
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
:::note
|
||||||
|
These variables are available in addition to the common variables/functions defined in [**Expressions**](../expressions/index.md)
|
||||||
|
:::
|
||||||
|
|
||||||
|
### Context Variables
|
||||||
|
|
||||||
|
- `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.
|
|
@ -1,4 +1,6 @@
|
||||||
# Property Mappings
|
---
|
||||||
|
title: 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.
|
||||||
|
|
||||||
|
@ -6,17 +8,15 @@ Property Mappings allow you to pass information to external applications. For ex
|
||||||
|
|
||||||
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.
|
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/).
|
|
||||||
|
|
||||||
## LDAP Property Mapping
|
## 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, the following 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: givenName -> first_name
|
||||||
- Autogenerated LDAP Mapping: mail -> email
|
- Autogenerated LDAP Mapping: mail -> email
|
||||||
- Autogenerated LDAP Mapping: name -> name
|
- Autogenerated LDAP Mapping: name -> name
|
||||||
- Autogenerated LDAP Mapping: sAMAccountName -> username
|
- Autogenerated LDAP Mapping: sAMAccountName -> username
|
||||||
- Autogenerated LDAP Mapping: sn -> last_name
|
- Autogenerated LDAP Mapping: sn -> last_name
|
||||||
|
|
||||||
These are configured with most common LDAP setups.
|
These are configured with most common LDAP setups.
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
---
|
||||||
|
title: OAuth2 Provider
|
||||||
|
---
|
||||||
|
|
||||||
|
This provider supports both generic OAuth2 as well as OpenID Connect
|
||||||
|
|
||||||
|
Scopes can be configured using Scope Mappings, a type of [Property Mappings](../property-mappings/index.md#scope-mapping).
|
||||||
|
|
||||||
|
| Endpoint | URL |
|
||||||
|
| -------------------- | -------------------------------------------------------------------- |
|
||||||
|
| Authorization | `/application/o/authorize/` |
|
||||||
|
| Token | `/application/o/token/` |
|
||||||
|
| User Info | `/application/o/userinfo/` |
|
||||||
|
| End Session | `/application/o/end-session/` |
|
||||||
|
| Introspect | `/application/o/end-session/` |
|
||||||
|
| JWKS | `/application/o/<application slug>/jwks/` |
|
||||||
|
| OpenID Configuration | `/application/o/<application slug>/.well-known/openid-configuration` |
|
||||||
|
|
||||||
|
## GitHub Compatibility
|
||||||
|
|
||||||
|
This provider also exposes a GitHub-compatible endpoint. This endpoint can be used by applications, which support authenticating against GitHub Enterprise, but not generic OpenID Connect.
|
||||||
|
|
||||||
|
To use any of the GitHub Compatibility scopes, you have to use the GitHub Compatibility Endpoints.
|
||||||
|
|
||||||
|
| Endpoint | URL |
|
||||||
|
| --------------- | --------------------------- |
|
||||||
|
| Authorization | `/login/oauth/authorize` |
|
||||||
|
| Token | `/login/oauth/access_token` |
|
||||||
|
| User Info | `/user` |
|
||||||
|
| User Teams Info | `/user/teams` |
|
||||||
|
|
||||||
|
To access the user's email address, a scope of `user:email` is required. To access their groups, `read:org` is required. Because these scopes are handled by a different endpoint, they are not customisable as a Scope Mapping.
|
|
@ -0,0 +1,27 @@
|
||||||
|
---
|
||||||
|
title: Proxy Provider
|
||||||
|
---
|
||||||
|
|
||||||
|
:::info
|
||||||
|
This provider is to be used in conjunction with [Outposts](../outposts/outposts.md)
|
||||||
|
:::
|
||||||
|
|
||||||
|
This provider protects applications, which have no built-in support for OAuth2 or SAML. This is done by running a lightweight Reverse Proxy in front of the application, which authenticates the requests.
|
||||||
|
|
||||||
|
passbook Proxy is based on [oauth2_proxy](https://github.com/oauth2-proxy/oauth2-proxy), but has been integrated more tightly with passbook.
|
||||||
|
|
||||||
|
The Proxy these extra headers to the application:
|
||||||
|
|
||||||
|
| Header Name | Value |
|
||||||
|
| ------------------------------ | --------------------------------------------------- |
|
||||||
|
| X-Forwarded-User | The user's unique identifier (**not the username**) |
|
||||||
|
| X-Forwarded-Email | The user's email address |
|
||||||
|
| X-Forwarded-Preferred-Username | The user's username |
|
||||||
|
| X-Auth-Username | The user's username |
|
||||||
|
|
||||||
|
Additionally, you can add more custom headers using `additionalHeaders` in the User or Group Properties, for example
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
additionalHeaders:
|
||||||
|
X-additional-header: bar
|
||||||
|
```
|
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
title: SAML Provider
|
||||||
|
---
|
||||||
|
|
||||||
|
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".
|
||||||
|
|
||||||
|
| Endpoint | URL |
|
||||||
|
| ---------------------- | ------------------------------------------------------------ |
|
||||||
|
| SSO (Redirect binding) | `/application/saml/<application slug>/sso/binding/redirect/` |
|
||||||
|
| SSO (POST binding) | `/application/saml/<application slug>/sso/binding/post/` |
|
||||||
|
| IdP-initiated login | `/application/saml/<application slug>/sso/binding/init/` |
|
||||||
|
| Metadata Download | `/application/saml/<application slug>/metadata/` |
|
|
@ -1,4 +1,6 @@
|
||||||
# Sources
|
---
|
||||||
|
title: Sources
|
||||||
|
---
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
---
|
||||||
|
id: terminology
|
||||||
|
title: Terminology
|
||||||
|
---
|
||||||
|
|
||||||
### Policy
|
### Policy
|
||||||
|
|
||||||
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.
|
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.
|
|
@ -1,6 +1,8 @@
|
||||||
# Troubleshooting access problems
|
---
|
||||||
|
title: Troubleshooting access problems
|
||||||
|
---
|
||||||
|
|
||||||
## I get an access denied error when trying to access an application.
|
### I get an access denied error when trying to access an application.
|
||||||
|
|
||||||
If your user is a superuser, or has the attribute `passbook_user_debug` set to true:
|
If your user is a superuser, or has the attribute `passbook_user_debug` set to true:
|
||||||
|
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |