+
+
+
+
+
+ {% trans 'Name' %}
+ {% trans 'Type' %}
+
+
+
+
+ {% for provider in object_list %}
+
+
+
+
{{ provider.name }}
+ {% if not provider.application %}
+
+
{% trans 'Warning: Provider not assigned to any application.' %}
+ {% else %}
+
+
+ {% blocktrans with app=provider.application %}
+ Assigned to application {{ app }}.
+ {% endblocktrans %}
+
+ {% endif %}
+
+
+
+
+ {{ provider|verbose_name }}
+
+
+
+ {% trans 'Edit' %}
+ {% trans 'Delete' %}
+ {% get_links provider as links %}
+ {% for name, href in links.items %}
+ {% trans name %}
+ {% endfor %}
+ {% get_htmls provider as htmls %}
+ {% for html in htmls %}
+ {{ html|safe }}
+ {% endfor %}
+
+
+ {% endfor %}
+
+
+
+ {% include 'partials/pagination.html' %}
+
+
+
{% endblock %}
diff --git a/passbook/admin/templates/administration/source/list.html b/passbook/admin/templates/administration/source/list.html
index e0e5c9e36..50162d83e 100644
--- a/passbook/admin/templates/administration/source/list.html
+++ b/passbook/admin/templates/administration/source/list.html
@@ -5,53 +5,81 @@
{% load admin_reflection %}
{% block content %}
-
-
{% trans "Sources" %}
-
{% trans "External Sources which can be used to get Identities into passbook, for example Social Providers like Twiter and GitHub or Enterprise Providers like ADFS and LDAP." %}
-
-
-
- {% trans 'Create...' %}
-
-
-
+
+
+
+
+ {% trans 'Source' %}
+
+
{% trans "External Sources which can be used to get Identities into passbook, for example Social Providers like Twiter and GitHub or Enterprise Providers like ADFS and LDAP." %}
+
-
-
-
-
- {% trans 'Name' %}
- {% trans 'Class' %}
- {% trans 'Additional Info' %}
-
-
-
-
- {% for source in object_list %}
-
- {{ source.name }}
- {{ source|fieldtype }}
- {{ source.ui_additional_info|safe|default:"" }}
-
- {% trans 'Edit' %}
- {% trans 'Delete' %}
- {% get_links source as links %}
- {% for name, href in links %}
- {% trans name %}
- {% endfor %}
-
-
- {% endfor %}
-
-
- {% include 'partials/pagination.html' %}
-
+
+
+
+
+
+
+
+ {% trans 'Name' %}
+ {% trans 'Type' %}
+ {% trans 'Additional Info' %}
+
+
+
+
+ {% for source in object_list %}
+
+
+
+
{{ source.name }}
+ {% if not source.enabled %}
+
{% trans 'Disabled' %}
+ {% endif %}
+
+
+
+
+ {{ source|fieldtype }}
+
+
+
+
+ {{ source.ui_additional_info|default:""|safe }}
+
+
+
+ {% trans 'Edit' %}
+ {% trans 'Delete' %}
+ {% get_links source as links %}
+ {% for name, href in links %}
+ {% trans name %}
+ {% endfor %}
+
+
+ {% endfor %}
+
+
+
+ {% include 'partials/pagination.html' %}
+
+
+
{% endblock %}
diff --git a/passbook/admin/templates/administration/user/list.html b/passbook/admin/templates/administration/user/list.html
index 766c59ef0..f4909d464 100644
--- a/passbook/admin/templates/administration/user/list.html
+++ b/passbook/admin/templates/administration/user/list.html
@@ -4,44 +4,63 @@
{% load utils %}
{% block content %}
-
+
+
+
+
+ {% trans 'Users' %}
+
+
+
+
+
+
+
+
+ {% include 'partials/pagination.html' %}
+
+
+
{% endblock %}
diff --git a/passbook/admin/views/overview.py b/passbook/admin/views/overview.py
index f4e8737b6..52025b50e 100644
--- a/passbook/admin/views/overview.py
+++ b/passbook/admin/views/overview.py
@@ -42,7 +42,7 @@ class AdministrationOverviewView(AdminRequiredMixin, TemplateView):
kwargs["providers_without_application"] = Provider.objects.filter(
application=None
)
- kwargs["policies_without_attachment"] = len(
+ kwargs["policies_without_binding"] = len(
Policy.objects.filter(policymodel__isnull=True)
)
kwargs["cached_policies"] = len(cache.keys("policy_*"))
diff --git a/passbook/core/templates/base/skeleton.html b/passbook/core/templates/base/skeleton.html
index 391dbae76..6bc877f80 100644
--- a/passbook/core/templates/base/skeleton.html
+++ b/passbook/core/templates/base/skeleton.html
@@ -3,49 +3,33 @@
{% load utils %}
-
-
-
-
-
-
- {% block title %}
- {% title %}
- {% endblock %}
-
-
-
-
-
-
-
- {% block head %}
- {% endblock %}
-
-
-
- {% if 'impersonate_id' in request.session %}
-
- {% endif %}
- {% block body %}
- {% endblock %}
-
-
-
-
- {% block scripts %}
- {% endblock %}
-
+
+
+
+
+
{% block title %}{% title %}{% endblock %}
+
+
+
+
+
+ {% block head %}
+ {% endblock %}
+
+
+ {% if 'impersonate_id' in request.session %}
+
+ {% endif %}
+ {% block body %}
+ {% endblock %}
+ {% block scripts %}
+ {% endblock %}
+
+
diff --git a/passbook/core/templates/base/skeleton_pf4.html b/passbook/core/templates/base/skeleton_pf4.html
deleted file mode 100644
index 6f422eb3c..000000000
--- a/passbook/core/templates/base/skeleton_pf4.html
+++ /dev/null
@@ -1,33 +0,0 @@
-{% load static %}
-{% load i18n %}
-{% load utils %}
-
-
-
-
-
-
-
-
{% block title %}{% title %}{% endblock %}
-
-
-
-
- {% block head %}
- {% endblock %}
-
-
- {% if 'impersonate_id' in request.session %}
-
- {% endif %}
- {% block body %}
- {% endblock %}
- {% block scripts %}
- {% endblock %}
-
-
diff --git a/passbook/core/templates/login/base.html b/passbook/core/templates/login/base.html
index d0523d465..6c59152f7 100644
--- a/passbook/core/templates/login/base.html
+++ b/passbook/core/templates/login/base.html
@@ -1,4 +1,4 @@
-{% extends 'base/skeleton_pf4.html' %}
+{% extends 'base/skeleton.html' %}
{% load static %}
{% load i18n %}
diff --git a/passbook/core/templates/overview/base.html b/passbook/core/templates/overview/base.html
index a46d5e64a..4c3c7947d 100644
--- a/passbook/core/templates/overview/base.html
+++ b/passbook/core/templates/overview/base.html
@@ -1,4 +1,4 @@
-{% extends "base/skeleton_pf4.html" %}
+{% extends "base/skeleton.html" %}
{% load static %}
{% load i18n %}
@@ -123,16 +123,3 @@
{% endblock %}
-
-{% block scripts %}
-{{ block.super }}
-
-{% endblock %}
diff --git a/passbook/core/templates/overview/index.html b/passbook/core/templates/overview/index.html
index 08ae6e50c..bb9a48ff6 100644
--- a/passbook/core/templates/overview/index.html
+++ b/passbook/core/templates/overview/index.html
@@ -14,7 +14,10 @@
{% block content %}
-
{% trans 'Applications' %}
+
+
+ {% trans 'Applications' %}
+
diff --git a/passbook/core/templates/partials/pagination.html b/passbook/core/templates/partials/pagination.html
index 9b1209269..9fbe8c855 100644
--- a/passbook/core/templates/partials/pagination.html
+++ b/passbook/core/templates/partials/pagination.html
@@ -1,22 +1,43 @@
{% load i18n %}
-
- {% with param=get_param|default:'page' %}
- {% if page_obj.has_previous %}
-
- {% else %}
-
- {% endif %}
-
- {% blocktrans with current=page_obj.number total=page_obj.paginator.num_pages %}
- Page {{ current }} of {{ total }}
- {% endblocktrans %}
-
- {% if page_obj.has_next %}
-
- {% else %}
-
- {% endif %}
- {% endwith %}
+
-
diff --git a/passbook/providers/app_gw/templates/app_gw/docker-compose.yml b/passbook/providers/app_gw/templates/app_gw/docker-compose.yml
new file mode 100644
index 000000000..14b7cbd02
--- /dev/null
+++ b/passbook/providers/app_gw/templates/app_gw/docker-compose.yml
@@ -0,0 +1,15 @@
+version: "3.5"
+
+services:
+ passbook_gatekeeper:
+ container_name: gatekeeper
+ image: beryju/passbook-gatekeeper:{{ version }}
+ ports:
+ - 4180:4180
+ environment:
+ OAUTH2_PROXY_CLIENT_ID: {{ provider.client.client_id }}
+ OAUTH2_PROXY_CLIENT_SECRET: {{ provider.client.client_secret }}
+ OAUTH2_PROXY_REDIRECT_URL: https://{{ provider.external_host }}/oauth2/callback
+ OAUTH2_PROXY_OIDC_ISSUER_URL: https://{{ request.META.HTTP_HOST }}/application/oidc
+ OAUTH2_PROXY_COOKIE_SECRET: {{ cookie_secret }}
+ OAUTH2_PROXY_UPSTREAMS: http://{{ provider.internal_host }}
diff --git a/passbook/providers/app_gw/templates/app_gw/k8s-manifest.yaml b/passbook/providers/app_gw/templates/app_gw/k8s-manifest.yaml
index 239531d86..b99df7421 100644
--- a/passbook/providers/app_gw/templates/app_gw/k8s-manifest.yaml
+++ b/passbook/providers/app_gw/templates/app_gw/k8s-manifest.yaml
@@ -55,7 +55,7 @@ metadata:
namespace: kube-system
spec:
rules:
- - host: {{ provider.host }}
+ - host: {{ provider.external_host }}
http:
paths:
- backend:
diff --git a/passbook/providers/app_gw/templates/app_gw/setup_modal.html b/passbook/providers/app_gw/templates/app_gw/setup_modal.html
index 1f22760dc..74bc10278 100644
--- a/passbook/providers/app_gw/templates/app_gw/setup_modal.html
+++ b/passbook/providers/app_gw/templates/app_gw/setup_modal.html
@@ -7,84 +7,71 @@
-
-
- {% trans 'Setup with...' %}
-
+
+
+ {% trans 'Setup with...' %}
+
-
-
-
-
-
-
- {% trans 'Add the following snippet to your docker-compose file.' %}
-
-
-
+
+
+
+
+
+
+
{% trans 'Setup with docker-compose' %}
+
+ {% trans 'Add the following snippet to your docker-compose file.' %}
+
+
+
+
-
-
-
-
-
-
-
{% trans 'Download the manifest to create the Gatekeeper deployment and service:' %}
-
{% trans 'Here' %}
-
{% trans 'Afterwards, add the following annotations to the Ingress you want to secure:' %}
-
-
-
+
+
+
+
+
+
+
+
{% trans 'Setup with Kubernetes' %}
+
+
{% trans 'Download the manifest to create the Gatekeeper deployment and service:' %}
+
{% trans 'Here' %}
+
{% trans 'Afterwards, add the following annotations to the Ingress you want to secure:' %}
+
+
+
+
-
diff --git a/passbook/providers/oidc/templates/oidc_provider/setup_url_modal.html b/passbook/providers/oidc/templates/oidc_provider/setup_url_modal.html
index 46ba06b3e..ccceddb60 100644
--- a/passbook/providers/oidc/templates/oidc_provider/setup_url_modal.html
+++ b/passbook/providers/oidc/templates/oidc_provider/setup_url_modal.html
@@ -1,49 +1,46 @@
{% load i18n %}
-
{% trans 'View Setup URLs' %}
-
-
-
-
-
diff --git a/passbook/providers/saml/templates/saml/idp/admin_metadata_modal.html b/passbook/providers/saml/templates/saml/idp/admin_metadata_modal.html
index 5795000f1..1e28d3f81 100644
--- a/passbook/providers/saml/templates/saml/idp/admin_metadata_modal.html
+++ b/passbook/providers/saml/templates/saml/idp/admin_metadata_modal.html
@@ -7,35 +7,35 @@
-
{% trans 'View Metadata' %}
-
-
-
-
-
-
-
-{{ metadata }}
-
-
-
-
+
{% trans 'View Metadata' %}
+
+
+
+
+
+
+
+
{% trans 'Metadata' %}
+
+
+
+ {{ metadata }}
+
+
+
+
+
-
+
diff --git a/passbook/static/static/passbook/pf.css b/passbook/static/static/passbook/pf.css
new file mode 100644
index 000000000..1be41fc58
--- /dev/null
+++ b/passbook/static/static/passbook/pf.css
@@ -0,0 +1,7 @@
+.pf-c-page__sidebar {
+ z-index: 0;
+}
+
+.pf-c-page__header {
+ z-index: 0;
+}
diff --git a/passbook/static/static/passbook/pf.js b/passbook/static/static/passbook/pf.js
new file mode 100644
index 000000000..04f0381eb
--- /dev/null
+++ b/passbook/static/static/passbook/pf.js
@@ -0,0 +1,23 @@
+// Button Dropdowns
+document.querySelectorAll("button.pf-c-dropdown__toggle").forEach((b) => {
+ b.addEventListener('click', (e) => {
+ const parent = e.target.closest('.pf-c-dropdown');
+ const menu = parent.querySelector('.pf-c-dropdown__menu');
+ menu.hidden = !menu.hidden;
+ });
+});
+
+// Modal
+document.querySelectorAll("[data-target='modal']").forEach((m) => {
+ m.addEventListener("click", (e) => {
+ const parentContainer = e.target.closest('[data-target="modal"]');
+ const modalId = parentContainer.attributes['data-modal'].value;
+ document.querySelector(`#${modalId}`).removeAttribute("hidden");
+ });
+});
+document.querySelectorAll(".pf-c-modal-box [data-modal-close]").forEach(b => {
+ b.addEventListener("click", (e) => {
+ const parentContainer = e.target.closest('.pf-c-backdrop');
+ parentContainer.setAttribute("hidden", true);
+ });
+});