Commit Graph

63 Commits

Author SHA1 Message Date
Jens Langhammer 73e7158178 e2e: add OIDC Provider test against grafana, more formatting, minor bug fixes 2020-06-19 19:45:27 +02:00
Jens Langhammer c83216ece0 Merge branch 'master' into e2e
# Conflicts:
#	Pipfile.lock
#	docs/installation/docker-compose.md
2020-06-19 09:00:46 +02:00
Jens Langhammer dab53cfd03 flows/executor: call plan.next before pop so we can save plan
ReevaluateMarker: use PolicyEngine without cache
2020-06-18 22:54:09 +02:00
Jens L 6a4086c490
flows: introduce FlowPlan markers, which indicate when a stage needs … (#79)
* flows: introduce FlowPlan markers, which indicate when a stage needs re-evaluation

Implement re_evaluate_policies
add unittests for several different scenarios
closes #78

* flows: move markers to separate files, cleanup formatting

* flows: fix self.next is not callable
2020-06-18 22:43:51 +02:00
Jens Langhammer afc8baff5f flows/shell: check for elements with autofocus attribute and call .focus();
closes #76
2020-06-18 19:09:12 +02:00
Jens Langhammer ee8313142f Merge branch 'docs-flows'
# Conflicts:
#	passbook/core/templates/partials/form_horizontal.html
2020-06-08 15:43:46 +02:00
Jens Langhammer fc2eb003ea e2e: add apply_default_data to load data from migrations after tables have been truncated 2020-06-07 19:31:16 +02:00
Jens L 4915205678
WIP Use Flows for Sources and Providers (#32)
* core: start migrating to flows for authorisation

* sources/oauth: start type-hinting

* core: create default user

* core: only show user delete button if an unenrollment flow exists

* flows: Correctly check initial policies on flow with context

* policies: add more verbosity to engine

* sources/oauth: migrate to flows

* sources/oauth: fix typing errors

* flows: add more tests

* sources/oauth: start implementing unittests

* sources/ldap: add option to disable user sync, move connection init to model

* sources/ldap: re-add default PropertyMappings

* providers/saml: re-add default PropertyMappings

* admin: fix missing stage count

* stages/identification: fix sources not being shown

* crypto: fix being unable to save with private key

* crypto: re-add default self-signed keypair

* policies: rewrite cache_key to prevent wrong cache

* sources/saml: migrate to flows for auth and enrollment

* stages/consent: add new stage

* admin: fix PropertyMapping widget not rendering properly

* core: provider.authorization_flow is mandatory

* flows: add support for "autosubmit" attribute on form

* flows: add InMemoryStage for dynamic stages

* flows: optionally allow empty flows from FlowPlanner

* providers/saml: update to authorization_flow

* sources/*: fix flow executor URL

* flows: fix pylint error

* flows: wrap responses in JSON object to easily handle redirects

* flow: dont cache plan's context

* providers/oauth: rewrite OAuth2 Provider to use flows

* providers/*: update docstrings of models

* core: fix forms not passing help_text through safe

* flows: fix HttpResponses not being converted to JSON

* providers/oidc: rewrite to use flows

* flows: fix linting
2020-06-07 16:35:08 +02:00
Jens Langhammer 07da5f7122 Merge branch 'master' into docs-flows 2020-06-05 20:30:59 +02:00
Jens Langhammer f91e02a0ec flows: allow username for default flow 2020-06-05 20:30:47 +02:00
Jens Langhammer 9f3f34389e root: update docs URL 2020-06-05 20:18:26 +02:00
Jens Langhammer c4facd53b4 Merge branch 'master' into docs-flows 2020-06-02 20:25:43 +02:00
Jens Langhammer 3f92d1c420 flows: Correctly check initial policies on flow with context
# Conflicts:
#	passbook/flows/planner.py
#	passbook/flows/tests/test_planner.py
#	passbook/flows/tests/test_views.py
#	passbook/flows/views.py
2020-06-02 16:53:40 +02:00
Jens Langhammer 23193314f1 Merge branch 'master' into docs-flows 2020-06-02 15:20:24 +02:00
Jens Langhammer 4d1658b35e stages/identification: explicitly define enrollment and recovery 2020-05-31 23:01:08 +02:00
Jens Langhammer 08302a04bf docs: add docs for flows, start docs for stages 2020-05-30 22:36:01 +02:00
Jens Langhammer b1b63fbb7f stages/prompt: add prompt order field 2020-05-28 23:21:43 +02:00
Jens Langhammer 270739a45a admin: fix policy testing form not showing the correct result 2020-05-28 21:50:43 +02:00
Jens L df8995deed
policies/*: remove Policy.negate, order, timeout (#39)
policies: rewrite engine to use PolicyBinding for order/negate/timeout
policies: rewrite engine to use PolicyResult instead of tuple
2020-05-28 21:45:54 +02:00
Jens Langhammer fdfc6472d2 admin: fixup some urls 2020-05-28 10:36:27 +02:00
Jens L beabba2890
flows: Load Stages without refreshing the whole page (#33)
* flows: initial implementation of FlowExecutorShell

* flows: load messages dynamically upon card refresh
2020-05-24 00:57:25 +02:00
Jens Langhammer 0664f0b6b2 flows: add support for default_context, etc
default_context can be used to influence policies during the planning. This should be used when the Planner is called from other views to correctly preseed the plan.
This also checks if there is a PENDING_USER set, and uses that user for the cache key instead
2020-05-20 16:15:16 +02:00
Jens Langhammer e08c5ff875 helm: fully remove domain, add log_level 2020-05-20 12:16:56 +02:00
Jens L 24a3e787dd
migrate to per-model UUID Primary key, remove UUIDModel (#26)
* *: migrate to per-model UUID Primary key, remove UUIDModel

* *: fix import order, fix unittests
2020-05-20 09:17:06 +02:00
Jens Langhammer 09ef58350c flows: rename AuthenticationStage to StageView as its a general base view 2020-05-17 00:03:06 +02:00
Jens Langhammer e68352b09c admin: add flow-stage-bindings, add policy-bindings, add prompts 2020-05-16 19:55:59 +02:00
Jens Langhammer 7bd65120b9 *: migrate from PolicyModel to PolicyBindingModel, move Policy to passbook_policies 2020-05-16 18:07:00 +02:00
Jens Langhammer 406f69080b Revert "*: providers and sources -> channels, PolicyModel to PolicyBindingModel that uses custom M2M through"
This reverts commit 7ed3ceb960.
2020-05-16 16:02:42 +02:00
Jens Langhammer 7ed3ceb960 *: providers and sources -> channels, PolicyModel to PolicyBindingModel that uses custom M2M through 2020-05-16 14:03:57 +02:00
Jens Langhammer a5319fc2fe *: rename templatetags to clearly identify 2020-05-15 10:54:31 +02:00
Jens Langhammer 80c3246333 policies/expression: add pb_flow_plan variable 2020-05-13 18:44:36 +02:00
Jens Langhammer c42ed6bc99 admin: sort types, minor fixups 2020-05-13 11:57:10 +02:00
Jens Langhammer 57fed2b92b stages/user_delete: fix formatting 2020-05-12 15:23:17 +02:00
Jens Langhammer e45b33c6c2 stages/user_delete: add user delete stage, remove view from core 2020-05-12 14:50:00 +02:00
Jens Langhammer 137e90355b flows: default-auth -> default-authentication 2020-05-12 14:49:47 +02:00
Jens Langhammer d49c58f326 flows: fix linting 2020-05-11 21:27:46 +02:00
Jens Langhammer 9814d3be03 flows: add Planner and Executor unittests 2020-05-11 15:01:14 +02:00
Jens Langhammer 6fd19c0a37 flows: add caching of plan, add planner unittests 2020-05-11 11:39:58 +02:00
Jens Langhammer 10cb412532 flows: fix linting of migrations 2020-05-11 09:08:15 +02:00
Jens Langhammer e12780f78f flows: add invalidation designation, use as default logout action 2020-05-11 01:12:57 +02:00
Jens Langhammer 69120da45c core: remove redundant views/forms 2020-05-11 00:49:48 +02:00
Jens Langhammer 5b2bf7519a stages/user_create -> user_write: Stage can create and update existing users 2020-05-10 23:38:15 +02:00
Jens Langhammer d4f149bc02 stages/email: add form for sending email to prevent spam
stages/email: make token validity configurable
2020-05-10 20:50:27 +02:00
Jens Langhammer 99bab03cce flows: add check if current plan matches current flow 2020-05-10 20:15:24 +02:00
Jens Langhammer 1d03b36750 stages/identification: show sign up url when related flow exists 2020-05-10 18:14:10 +02:00
Jens Langhammer f111604b70 stages/login: -> stages/user_login: rename login to user_login for user_create stage 2020-05-10 16:20:44 +02:00
Jens Langhammer fbc3ac6b30 flows: make FlowExecutor fully working without pending user 2020-05-10 15:28:52 +02:00
Jens Langhammer 9a700e506b stages/identification: simplify unittests 2020-05-10 01:01:58 +02:00
Jens Langhammer 8e488670ad stages/identification: load uid_fields from stage in form, add more unit tests 2020-05-10 00:05:36 +02:00
Jens Langhammer fd5b2298e5 flows: fix unittests and migrations 2020-05-09 23:31:35 +02:00