Commit Graph

122 Commits

Author SHA1 Message Date
Jens Langhammer 525d271535 *: apply new black styling 2020-09-30 19:34:22 +02:00
Jens Langhammer 59dbc15be7 core: make group_attributes include user's attributes 2020-09-30 11:39:25 +02:00
Jens Langhammer 9724ded194 policies: change .form() and .serializer() to properties, add tests 2020-09-29 10:32:58 +02:00
Jens Langhammer 6e4ce8dbaa core: cache user's is_superuser 2020-09-26 00:34:35 +02:00
Jens Langhammer 52c4fb431f core: add user.group_attributes 2020-09-24 15:45:58 +02:00
Jens Langhammer f99eaa85ac sources/ldap: implement LDAP password validation and syncing 2020-09-21 11:46:35 +02:00
Jens Langhammer cba78b4de7 providers/*: fix launch_url not working 2020-09-17 21:53:57 +02:00
Jens Langhammer 5ff1dd8426 core: move impersonation to core, add tests, add better permission checks 2020-09-17 16:24:53 +02:00
Jens Langhammer 0a5e14a352 core: make is_superuser a group property, remove from user 2020-09-15 23:10:31 +02:00
Jens Langhammer 40614a65fc flows: move complete denied view and template to flows 2020-09-14 21:52:43 +02:00
Jens Langhammer 2c07859b68 core: add automatic launch_url detection based on provider 2020-09-14 18:12:42 +02:00
Jens L 268de20872
Proxy v2 (#189) 2020-09-03 00:04:12 +02:00
Jens Langhammer 7334599efd *: update JSON fields to django 3.1 2020-08-15 21:04:22 +02:00
Jens Langhammer 6fa825e372 providers/*: remove path-based import from all providers 2020-07-20 16:05:09 +02:00
Jens Langhammer ac2dd3611f sources/*: remove path-based import from all sources 2020-07-20 16:05:09 +02:00
Jens Langhammer c60d1e1f9a core: separate expiry logic from tokens and make re-usable 2020-07-20 10:57:12 +02:00
Jens Langhammer 2d2b2d08f4 core: fix source slug not being unique 2020-07-09 23:05:46 +02:00
Jens Langhammer d5a3e09a98 core: add token Intents 2020-07-05 23:14:57 +02:00
Jens Langhammer 16b966c16e policies: Show grouped Dropdown for Target 2020-07-04 00:16:16 +02:00
Jens Langhammer 62c20b6e67 admin: add list of all tokens 2020-07-01 12:27:30 +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 L 73116b9d1a
policies/expression: migrate to raw python instead of jinja2 (#49)
* policies/expression: migrate to raw python instead of jinja2

* lib/expression: create base evaluator, custom subclass for policies

* core: rewrite propertymappings to use python

* providers/saml: update to new PropertyMappings

* sources/ldap: update to new PropertyMappings

* docs: update docs for new propertymappings

* root: remove jinja2

* root: re-add jinja to lock file as its implicitly required
2020-06-05 12:00:27 +02:00
Jens Langhammer 82d12ecfdf policies/expression: use pb_message() for messages instead of returning a tuple 2020-06-01 15:25:38 +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 7bd65120b9 *: migrate from PolicyModel to PolicyBindingModel, move Policy to passbook_policies 2020-05-16 18:07:00 +02:00
Jens Langhammer 227966e727 core: rename nonce to token 2020-05-16 16:11:53 +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 7500e622f6 stages/invitation: start extracting invitation from core 2020-05-11 21:58:02 +02:00
Jens Langhammer 69120da45c core: remove redundant views/forms 2020-05-11 00:49:48 +02:00
Jens Langhammer e989c61793 core: reduce default nonce time to 30 minutes 2020-05-10 20:15:56 +02:00
Jens Langhammer 9bccf9bb0a policies/dummy: separate dummy policy from core into app 2020-05-10 02:14:55 +02:00
Jens Langhammer 212e966dd4 factors: -> stage 2020-05-08 20:59:51 +02:00
Jens Langhammer 995c87938f core: fix default Null causing issues in translation 2020-02-21 23:10:00 +01:00
Jens Langhammer 26bf6fd22f all: add more helpful help_text to models 2020-02-21 15:12:16 +01:00
Jens Langhammer 0b5caa85f5 all: sort imports and cleanup 2020-02-20 17:23:05 +01:00
Jens Langhammer 2bef5f3911 policies: struct -> types to match core 2020-02-20 13:52:05 +01:00
Jens Langhammer 3c2b8e5ee1 all: prefix all UI related methods with ui_, switch to property and return dataclass 2020-02-20 13:51:41 +01:00
Jens Langhammer 2dfd93afb1 core: add more fields for metadata of applications 2020-02-20 13:45:22 +01:00
Jens Langhammer ac273aab75 core: raise PropertyMappingExpressionException when PropertyMapping returns Undefined 2020-02-19 16:18:31 +01:00
Jens Langhammer 9267d0c1dd all: general maintenance, prepare for pyright 2020-02-18 22:12:51 +01:00
Jens Langhammer 9f00843441 policies/expression: add Expression based policy 2020-02-18 15:12:50 +01:00
Jens Langhammer f31cd7dec6 core: check PropertyMapping's expression syntax before save 2020-02-18 15:12:05 +01:00
Jens Langhammer 083e317028 lib: add helper method for 400 response with message 2020-02-18 10:13:53 +01:00
Jens Langhammer 813b2676de providers/saml: better handle PropertyMapping evaluation errors 2020-02-18 10:12:42 +01:00
Jens Langhammer 3aa2f1e892 *: propertymapping template -> expression 2020-02-17 20:38:14 +01:00
Jens Langhammer e6c47fee26 core: add template field to PropertyMapping 2020-02-17 17:47:51 +01:00
Jens Langhammer 2be026dd44 global: fix import order 2020-02-14 15:17:40 +01:00
Jens Langhammer d9ecb7070d core: add more prometheus metrics 2020-01-19 21:01:26 +01:00
Jens Langhammer 3bd1eadd51 all: implement black as code formatter 2019-12-31 12:51:16 +01:00