Compare commits
3330 Commits
version/0.
...
version/20
Author | SHA1 | Date | |
---|---|---|---|
d420719649 | |||
0018fbacd3 | |||
8c41d2f4cb | |||
3941590d0c | |||
dc4a7c35da | |||
e8c9b70ae8 | |||
74d240dfd4 | |||
7d296b2119 | |||
373793ce9a | |||
5c0ec7554b | |||
792fa45dca | |||
743aaea15e | |||
de03ed0aec | |||
e68ec16a34 | |||
68a0219d0f | |||
38d9533afd | |||
7538af5e09 | |||
2e659c1ab0 | |||
ad0cc5f0be | |||
7ae9482e7b | |||
7fb95dfabf | |||
83cc5d24f2 | |||
38b3096c9a | |||
df8f21e559 | |||
f4979fcf19 | |||
431b7375c1 | |||
a6627145c8 | |||
3045cf1aef | |||
c65b2944b3 | |||
2ae5a81c15 | |||
ed8b78600e | |||
644a03e40e | |||
88ce93ab04 | |||
8878dc61d3 | |||
03d38557e5 | |||
37b59bb5b9 | |||
19eea68e0f | |||
ce7aae16c9 | |||
fd9ba97479 | |||
919debdd13 | |||
36690de285 | |||
ca4ead8fd8 | |||
a81f981471 | |||
d6fd2b0afa | |||
0478ae3da8 | |||
9c33f4858f | |||
f2eaa9052e | |||
21d0641110 | |||
67d05f99e9 | |||
21d6a28715 | |||
1149a8d9a4 | |||
5e98172afb | |||
9b3e94c7c8 | |||
30a1b65e94 | |||
9bb46ecb88 | |||
269e6c4f38 | |||
7f65ae3f92 | |||
ee6b365003 | |||
2ad4bd5c0a | |||
0958740b51 | |||
9cdfd8b75a | |||
3c8a0081bc | |||
088e0e736a | |||
cbb0681f95 | |||
55c408a8bf | |||
07379acf7f | |||
a1af93f8be | |||
b9a9da4ec7 | |||
05a5b5b675 | |||
0fb17eee43 | |||
a1474e09e5 | |||
a33c7d7786 | |||
c08d9762d9 | |||
d43e6e5736 | |||
380786bfde | |||
ffcf064f83 | |||
252718bbaf | |||
5725e54334 | |||
c20856ca17 | |||
402afa1e85 | |||
5b4e75000b | |||
9c73e9cf4e | |||
b10c3db13d | |||
1a052913e9 | |||
e930a1d0dc | |||
fe290aa214 | |||
a2e69bd250 | |||
d2a35eb8de | |||
3437d8b4b0 | |||
b862bf4284 | |||
de22a367b1 | |||
17ab895652 | |||
a4d5815e1b | |||
4cbfaaa72b | |||
92943f08d9 | |||
10ef1c7e93 | |||
02c762c268 | |||
bbf0ca92af | |||
d2dfc6d63b | |||
a18240fcd7 | |||
d36e5dccf9 | |||
9af1d6f63b | |||
ab6d46558b | |||
e94abfc986 | |||
5c652c1f79 | |||
89aa0f0cc8 | |||
085589bcec | |||
95d0d6f3e8 | |||
c62ef4ae81 | |||
3df81ca6f0 | |||
578326eccd | |||
2335ccddaa | |||
477e30f542 | |||
7bf3d7e10a | |||
1bef659b10 | |||
e3f7bd8ab8 | |||
45c731de3c | |||
535770abbd | |||
eccea8eba0 | |||
ab200a1dfb | |||
ca122b20c9 | |||
74b407ebc7 | |||
fbf2fe2404 | |||
b968adffc1 | |||
c275992f7b | |||
4e2c686db1 | |||
bfc69562d8 | |||
9e6a7bf16b | |||
890e0e9054 | |||
cf7e7c44ff | |||
0f169f176d | |||
429fc921b1 | |||
e7a9a41a2f | |||
d1c24f47b2 | |||
007676b400 | |||
c0c235bead | |||
a3aacb5285 | |||
5977c09b05 | |||
e81d3dad3e | |||
5aabaebd96 | |||
7b60bca297 | |||
a07d7456c8 | |||
f33369bf0c | |||
1abcff39c7 | |||
c1caf84d92 | |||
86c069fe64 | |||
ce0140ef67 | |||
bba43c5109 | |||
d99a415502 | |||
9049593ff5 | |||
e74c098b7a | |||
d06a44378d | |||
0a8da376fc | |||
2a0f940a42 | |||
8aa067795a | |||
3cdb81c5ba | |||
e8259791f0 | |||
55af786852 | |||
8a916602c4 | |||
7101c7987c | |||
bd48955f39 | |||
53adcd9157 | |||
c5a2bb8914 | |||
66e5958283 | |||
9db445c3ee | |||
574438b51e | |||
a05885140d | |||
8878fac4e7 | |||
7ee97a961c | |||
737ff62e92 | |||
07ada5a1b7 | |||
8caeed6b18 | |||
b5adff5327 | |||
3894895d32 | |||
7f53c97fb2 | |||
44bd4b9511 | |||
2a1b5e0154 | |||
8c0d48fe0a | |||
0863e60d29 | |||
451c117ea4 | |||
388c8c8bec | |||
5904070bb2 | |||
35ac87ec10 | |||
8f8c2a291b | |||
592a2dcede | |||
a3221475e5 | |||
25f5031422 | |||
63b94263af | |||
217595bb01 | |||
2dd8119abe | |||
20e0fe3941 | |||
0fa97de06e | |||
38da13fea3 | |||
fb9880bff4 | |||
acc790f590 | |||
76c572cf7c | |||
0904fea109 | |||
6df89e7abf | |||
21afda6dc2 | |||
74c0ed27ba | |||
dc680a3385 | |||
88e5b22d16 | |||
27cd10e072 | |||
d35f524865 | |||
ca223fa4df | |||
14962eb6cc | |||
b9f409d6d9 | |||
a8681ac88f | |||
c1e6786ea1 | |||
1c8d101fc3 | |||
7a9140bdcd | |||
511f94fc7f | |||
548b1ead2f | |||
33f67140f2 | |||
8787dc23d0 | |||
e0ae92ccc7 | |||
bdb86d7119 | |||
a1a3d316e3 | |||
672b86ef88 | |||
a3c9d5873c | |||
0e975757b8 | |||
391ee10cb8 | |||
4f374c0c01 | |||
dde303f13a | |||
264c678eaa | |||
854d94056e | |||
9d4c22c706 | |||
9b12895fab | |||
93478a55d7 | |||
a76cbf8b70 | |||
6597d5bd28 | |||
fd28f37c0d | |||
d219f65e7a | |||
865f652476 | |||
8008918d8b | |||
75d0bd01c2 | |||
029c6cd182 | |||
71f771c22c | |||
0993d5ce4a | |||
38bd05867d | |||
79089d8981 | |||
44e51970e1 | |||
47bde052ca | |||
bd6a473d4f | |||
cd23053007 | |||
6e11fd0f2e | |||
277b4336d3 | |||
1c1f9b6cb8 | |||
c23df5e1d5 | |||
c47cef6fbf | |||
83b7b3257a | |||
270be95e68 | |||
1c919b8b88 | |||
1e51a2cdd7 | |||
7ba44b15a7 | |||
4a94f515b3 | |||
b229b2f40d | |||
e4f0613fab | |||
ecff810021 | |||
fdde97cbbf | |||
c2a5641e6a | |||
5a47c4850d | |||
70b8a941bb | |||
eb01b42425 | |||
8708e487ae | |||
e020b8bf32 | |||
8e27121e10 | |||
06870b4f64 | |||
4cfcc48b23 | |||
60c244c31d | |||
d122bddae2 | |||
69e6221906 | |||
68eefd083e | |||
a647917074 | |||
099197ba8c | |||
baa2ed5ecc | |||
f8ba623fc1 | |||
6bcdf36ca6 | |||
416d949d80 | |||
0b75a0028b | |||
0901d7461e | |||
61772b75ff | |||
0ade57b5a6 | |||
61604adf9a | |||
8bd147b205 | |||
724f53e972 | |||
c10478ec68 | |||
cdf12ee03d | |||
964a8dbb82 | |||
7ad48bfc44 | |||
da90510b98 | |||
4bd1598c2c | |||
6aa8d56d9f | |||
ccf7d794e9 | |||
50ed2fb257 | |||
5ae030997a | |||
52dabcaad9 | |||
35e8a0c374 | |||
be292729a5 | |||
1649c478b6 | |||
42feb54d80 | |||
bbd088a957 | |||
5417d0a90c | |||
417b5d61a4 | |||
f13aad21cb | |||
79e8ee46c0 | |||
e3eaaeaf17 | |||
e550216f85 | |||
1afb4a7a76 | |||
391eb9d469 | |||
494f094fa1 | |||
aa0f5df218 | |||
6fc740a98b | |||
7da90ff7e4 | |||
61b5714652 | |||
d2df426489 | |||
e6c75ed173 | |||
a353c6956e | |||
a367d8515f | |||
2b7a22a29a | |||
e6712a50d2 | |||
c621f62d92 | |||
a0648cd925 | |||
2650e672bb | |||
53b9376789 | |||
d15e50025c | |||
0af66a26ab | |||
bf754369d9 | |||
02dc112f8f | |||
2d4e7ebab5 | |||
a7d0a50859 | |||
71c9108f89 | |||
f8bcdb26b3 | |||
45f1d95bf9 | |||
5dab198c47 | |||
ad91abe9de | |||
fa30755241 | |||
552f8c6a9a | |||
101f916247 | |||
2acdcf74e1 | |||
ddb8610032 | |||
22ad850e6c | |||
57925ed60a | |||
48cc2f17c1 | |||
448108fca0 | |||
c1254f6212 | |||
c8120c0d3e | |||
52016e0806 | |||
e555bdd42b | |||
1a619c90de | |||
18faf30b0c | |||
b3bd979ecd | |||
db113c5e8f | |||
78bcb90a1e | |||
b64ecbde22 | |||
43bab840ec | |||
f020b79384 | |||
820f658b49 | |||
5d460a2537 | |||
efc46f52e6 | |||
9fac51f8c7 | |||
fe4b2d1a34 | |||
f8abe3e210 | |||
3ced67b151 | |||
cd5631ec76 | |||
95df7c7f30 | |||
1e934aa5d5 | |||
d93927755a | |||
ddb3b71dce | |||
bf9826873e | |||
6869b3c16a | |||
9b71b8da5f | |||
bfc8e9200f | |||
c4311abc9f | |||
ec42869e00 | |||
45963c2ffc | |||
1aa27b5e80 | |||
1737feec91 | |||
a0e0fb930a | |||
4a32c3ca11 | |||
d307539fd0 | |||
c060a3eec2 | |||
4612ae1ff4 | |||
7af883d80c | |||
4a5374d03f | |||
3b536f6e55 | |||
6aa13a8666 | |||
24e4924dec | |||
a252f303c0 | |||
33cdbd7776 | |||
18bc54214d | |||
db7e9f9b95 | |||
a885247d36 | |||
91282c7bd8 | |||
830b8bcd5b | |||
0f5e6d0d8c | |||
6aa6615608 | |||
91d6a3c8c7 | |||
a6ac82c492 | |||
05d777c373 | |||
32cf960053 | |||
83bf639926 | |||
2717742bd2 | |||
ef70e93bbd | |||
478d3430eb | |||
9c1ade59e9 | |||
fadf746234 | |||
397dfc29f1 | |||
b0e3b8b39d | |||
df9ae796d4 | |||
dfdad5388f | |||
c38ea69bdd | |||
dca6f43858 | |||
51cbb7cc8e | |||
1f8130e685 | |||
580d59e921 | |||
e639d8ab56 | |||
9f478bb46a | |||
7a16f97908 | |||
dd8c1eeb52 | |||
005b4d8dda | |||
de2d8b2d85 | |||
7d107991a2 | |||
14dc420747 | |||
89dc4db30b | |||
cc3fccb27e | |||
add20de8de | |||
7e2a471903 | |||
9ca9e67ffa | |||
178417fe67 | |||
53f002a123 | |||
c7c387eb38 | |||
1b3760a4b7 | |||
704a502089 | |||
3b12ef80eb | |||
1101810fea | |||
1ab5289e2e | |||
ac24fc9ce3 | |||
4b24b185f2 | |||
ea0ba5ae30 | |||
44686de74e | |||
b74c08620a | |||
e25d03d8f4 | |||
f8f26d2a23 | |||
1f2e177e3e | |||
cfed41439e | |||
3ac148d01c | |||
3e696d6ac8 | |||
0114bc0d6a | |||
c60934f9b1 | |||
09bdcfaab0 | |||
624206281e | |||
4d7e64c48c | |||
3d112e7688 | |||
3c4ff65a01 | |||
d7f54ce5d5 | |||
bc55c97fa2 | |||
d9a907e39e | |||
8616647045 | |||
4d861e2830 | |||
881730f52e | |||
e78577d470 | |||
d502f4d77d | |||
3c5f7deba9 | |||
b61334c482 | |||
eb762632d0 | |||
6a882249aa | |||
94f6bbd431 | |||
3926ee9eb6 | |||
7fbf915e0a | |||
5af9e8c05d | |||
7c0c453d9f | |||
d8ae56ed19 | |||
a9a65ceca6 | |||
c11fd884b8 | |||
3e3f29973b | |||
af7e1fd0c5 | |||
2556a106a0 | |||
2f3a086f29 | |||
239af7048a | |||
188ef0f58f | |||
5ef4354723 | |||
66a8b52c7c | |||
c1563f4cff | |||
ac7b0ac965 | |||
da37b42bcf | |||
f4bb22138c | |||
605213821c | |||
2b34ac7545 | |||
542a4b9bdf | |||
b0a791711e | |||
c0199933c8 | |||
5c3f410016 | |||
02e4a71e25 | |||
bfe8bb5e61 | |||
b1591618ae | |||
55bcc254c1 | |||
2798a3edc9 | |||
e2aaa26ce7 | |||
81e4d2d1d7 | |||
f663b66c19 | |||
9a7b343120 | |||
02c1a7f7d0 | |||
b2f65a7ed2 | |||
8071692739 | |||
8d11934caa | |||
6076ae2f9e | |||
78b4b61882 | |||
91df37a4a0 | |||
2566af231b | |||
80f7b5656d | |||
23cb8f44a6 | |||
c3a0aa594a | |||
6b7977ad86 | |||
d7dfd6e7df | |||
fc5842be67 | |||
b03677a077 | |||
d136890415 | |||
3ea76f1d86 | |||
1ab9683ec6 | |||
1e16c9b1e8 | |||
b242ba03a0 | |||
49294b4a43 | |||
80e5c25c01 | |||
ed267a4a1a | |||
7d844d1821 | |||
6f1fb9ca43 | |||
09f56f1f01 | |||
3d3a0cd9e3 | |||
32667f37d1 | |||
9532c4df9d | |||
fd90979832 | |||
2e20d5dfbf | |||
33f06f0799 | |||
920736fc77 | |||
ee8e42728e | |||
204792b750 | |||
8ffa3e5885 | |||
175d3b3377 | |||
d5f35798dc | |||
1a0aa7e944 | |||
677a181b9c | |||
4b551add1a | |||
90220e911f | |||
217cca822d | |||
e6f897c7e6 | |||
65c9d4bf4c | |||
6e88e52d78 | |||
4e884e80ab | |||
d19bfebce3 | |||
b86d4a455d | |||
222cece3e1 | |||
6e69edf1af | |||
55aab5660b | |||
08e7ef3c1e | |||
d728163eea | |||
cbf246694c | |||
9d0a01012d | |||
cf76652a4c | |||
c525ecc334 | |||
49d40d4337 | |||
94182f88a4 | |||
1c25f4f09b | |||
6495d6c50a | |||
b81f3e4a38 | |||
aad3b43ac3 | |||
60f52f102a | |||
f3ccb5341d | |||
cb73210447 | |||
81efc9a673 | |||
72c6c0da9b | |||
8fef839965 | |||
87b830ff9a | |||
8acb9dde5f | |||
36e8b1004c | |||
f959212692 | |||
2d2a404028 | |||
394ad6ade5 | |||
4baf9e4a22 | |||
d020599e09 | |||
4f28a89e63 | |||
f8b4b92e8d | |||
33f208657c | |||
c1fbfc63ab | |||
192dbe05c4 | |||
0b41cb84f0 | |||
d637bd0bf9 | |||
a2bddc6d91 | |||
2e42da11ea | |||
f297d1256d | |||
5e1e5afb24 | |||
da59e7c4a7 | |||
8684d106d5 | |||
2579e168c3 | |||
7f5caf901d | |||
1c686e19b5 | |||
3cc92f6c97 | |||
8f5b33a3a2 | |||
4447345345 | |||
42c6401ba7 | |||
eef111bcfd | |||
6192b2787f | |||
c7d28f8ca9 | |||
1342266368 | |||
7ff679b1a3 | |||
8beddcddb0 | |||
9fe8554f28 | |||
812fe72e60 | |||
d0e4533cdd | |||
b1b5d94ddc | |||
59722e0bbe | |||
9c5bb3998c | |||
c180c4b1a2 | |||
308896719d | |||
95c1473dd2 | |||
b14c5039ed | |||
b6948334f2 | |||
29e08e7477 | |||
36bc1dc020 | |||
61d1407804 | |||
47ddf0d7f2 | |||
cb36a3c8c7 | |||
cac94792fa | |||
6f56c37d2f | |||
8369fa16ae | |||
f30bdbecd6 | |||
c727c845df | |||
b2b737e59e | |||
e2b930afe3 | |||
36c0b924bc | |||
1ccf6dcf6f | |||
f8a426f0e8 | |||
f8756d0fc9 | |||
fd6d99f4f9 | |||
04379f2c90 | |||
ba1195cf70 | |||
b0bd9212c7 | |||
209179e012 | |||
df16f635fa | |||
14ccf47a2b | |||
2aac024477 | |||
4743e72e18 | |||
cab2942c4e | |||
9fb5ce2a1a | |||
0eab4489c5 | |||
3aae030b23 | |||
e7060cb90a | |||
6c0b9e3525 | |||
82bb179bc2 | |||
774eb0388b | |||
6ed78830a0 | |||
6fe323f1a7 | |||
85c2db018e | |||
bc9e7e8b93 | |||
08c58ce3fb | |||
c3bc986473 | |||
2e69efe699 | |||
4daa373dcf | |||
a85b8a65c0 | |||
d8dc1f8bb5 | |||
0f4d5bc3b0 | |||
6eed549577 | |||
be54ba4fe2 | |||
68b9c34f78 | |||
3584bdf530 | |||
e712719333 | |||
9a21c2f6bd | |||
0632d8ff37 | |||
6bfaf71c12 | |||
b6c8c319e5 | |||
4fde1b7365 | |||
412f5b9210 | |||
a9e53cd52a | |||
d0ee7908ab | |||
e69834dec4 | |||
1b9d22615c | |||
e995536a15 | |||
e6818faab1 | |||
010e834149 | |||
16d5e1d9ff | |||
765ae80698 | |||
bbd0ff24d8 | |||
7a403613b2 | |||
4ad184a3fb | |||
48d5f28e7a | |||
0cb48121b2 | |||
4194ffe2d4 | |||
4636fe7e64 | |||
182d714b16 | |||
540c22ce15 | |||
8c3008abce | |||
8a22c86aaa | |||
22ce142cb8 | |||
1a292feebb | |||
09f4d812b3 | |||
2bab4ebfe8 | |||
a8647caca9 | |||
590597caf6 | |||
7b43777b22 | |||
77861b52e3 | |||
5f9c1e229c | |||
119adb3e7b | |||
5db38bd0b7 | |||
0e1587bc1a | |||
dc16a8a4c9 | |||
a6d0c8c26c | |||
5797a3743a | |||
b7e43efb34 | |||
48df12d045 | |||
4fea0f5939 | |||
a7bdd63e4d | |||
e216efb6ec | |||
378fe38b12 | |||
ce9fb8801c | |||
67ca83c228 | |||
ee2e737782 | |||
b04c9a2098 | |||
7f7b7e37c1 | |||
e7c96eb70d | |||
e8debce9c8 | |||
bcd0686a33 | |||
55322995a1 | |||
dff5eb69c8 | |||
b747022bc1 | |||
885fcff495 | |||
5b18e28753 | |||
9848c5f3eb | |||
fc98c3934a | |||
7964061466 | |||
5f90f54195 | |||
49eb568d3c | |||
d47d9103c7 | |||
12cbe464fc | |||
d17b2b0d1b | |||
f17d809219 | |||
6c8e9fb553 | |||
43bb29e16a | |||
29edbb0357 | |||
12ae867759 | |||
a20ca9136b | |||
3759e96e7d | |||
480d882a82 | |||
e5e1e3737d | |||
8dddcf891e | |||
319104c39b | |||
a9336f069c | |||
33f5169f36 | |||
4c690a20ef | |||
f68c8f7d90 | |||
95b56a0005 | |||
811c569b54 | |||
3ac3a8eebe | |||
6a5a243dac | |||
3549a9ecdd | |||
ee916a68a4 | |||
e9ca42cbb9 | |||
692d577217 | |||
f192ee5052 | |||
c95f8e8418 | |||
9549a7188b | |||
4998ccbe41 | |||
a56ddb2b8e | |||
3cc6b8ee38 | |||
927ab509a1 | |||
c85506f43c | |||
4157a0780d | |||
79da2bf698 | |||
c3e9168b46 | |||
d16838bbed | |||
6032efb67d | |||
322c6f01c2 | |||
71a58955f2 | |||
f035da440a | |||
001de38d85 | |||
3ea39fe122 | |||
7bfa217cae | |||
fdb9b45c51 | |||
116375084c | |||
1fca1df9dc | |||
4464ecc060 | |||
1af4373d97 | |||
28bbf5ac7f | |||
23f61e6b4f | |||
db135a6dbc | |||
a4dc6d13b5 | |||
4d88dcff08 | |||
6a835ad192 | |||
efc849e760 | |||
e62333dfb3 | |||
e23afd18e4 | |||
c2a30b760a | |||
6e24856d45 | |||
98a58b74e3 | |||
5f3ab22bea | |||
1ed5d5da35 | |||
76193e0031 | |||
50109ca7ad | |||
e4b66d991c | |||
68adc2d5a5 | |||
349a3a67d5 | |||
e1394207e7 | |||
f265c1f10b | |||
1aecdc7f8f | |||
a18edaf62b | |||
c91abe448c | |||
e531e52403 | |||
cae536fa65 | |||
316b15b8a9 | |||
e6ccd4fa76 | |||
86aabba3ed | |||
0b36aad5c8 | |||
64d2a216f0 | |||
a5e5e140d6 | |||
29f98abd00 | |||
7b5ce4e98a | |||
d7fa52ebf3 | |||
2ffaa94825 | |||
b80b2626a6 | |||
3b7bba5a62 | |||
2d9efe035e | |||
48438e28fd | |||
885a2f0a58 | |||
cf46ee06b7 | |||
9e33b49d29 | |||
1179ba4ef2 | |||
3c12c8b3ff | |||
4d22659b6e | |||
2c0709eeee | |||
c24d1b6b84 | |||
040e148a73 | |||
b85d550ee0 | |||
ce95139d66 | |||
46436a5780 | |||
835a9aaaf2 | |||
42005e7def | |||
d9956e1e9c | |||
4b1e73251a | |||
736dbdca33 | |||
789b8e5d3e | |||
074b55f66b | |||
d9bc5ea4d1 | |||
716bb9f188 | |||
dd496619a2 | |||
51d07f7913 | |||
5c4163579b | |||
5a73413d58 | |||
51a5d4bf49 | |||
8bbb854073 | |||
9f2e9e8444 | |||
a3d361f500 | |||
e9bb583b32 | |||
efccf47c83 | |||
a5b144cf8f | |||
afc5a17fc2 | |||
b3e0884b2e | |||
078d648551 | |||
41f9097592 | |||
562175741c | |||
24e24cb97e | |||
69b0a23a7d | |||
f0f3245388 | |||
99ca0d1f9f | |||
c9f0d048a8 | |||
90a94b5e3e | |||
ae1a8842db | |||
a3b17d1ed4 | |||
41576e27be | |||
07082cb3aa | |||
426cb33fab | |||
9e4f840d2d | |||
e120d274e9 | |||
977d3f6ef9 | |||
ecdbc917a5 | |||
0083cd55df | |||
d380194e13 | |||
32f5d5ba72 | |||
e818416863 | |||
7eed70cfe9 | |||
ea6ca23f57 | |||
f056b026d6 | |||
1c0a6efeb1 | |||
17732eea08 | |||
aa5381fd59 | |||
ffee86fcf3 | |||
7ff7398aff | |||
67925a39f2 | |||
3b5e1c7b34 | |||
3e49acf7ae | |||
76764c4374 | |||
9f6f8e1b55 | |||
9590180c6c | |||
aef5c60a7b | |||
d4c9c667c9 | |||
96f0d582f0 | |||
7e8702a71e | |||
1524061480 | |||
434922f702 | |||
d2862ddc93 | |||
6e55431d4c | |||
01548c5e9c | |||
bf1dae2dbe | |||
59c93defcf | |||
a2a1a27502 | |||
e3227e7d54 | |||
1f4a8fffdb | |||
86b1183883 | |||
f781f4848c | |||
19824d693c | |||
0694b911a4 | |||
71e7a03f71 | |||
0a874c98cb | |||
488e8f769a | |||
e6a776be07 | |||
4fd1dafd82 | |||
e535cb0ec8 | |||
8c1f55d3e3 | |||
c3a2cb44cd | |||
682401bbf2 | |||
3e6e167348 | |||
d08c1b7b02 | |||
94d70d252c | |||
ccfe746dd5 | |||
ef5dffa96a | |||
2caa1e7650 | |||
2246f3a534 | |||
95ba00cb79 | |||
2ab4d6620f | |||
01482d8468 | |||
45c4469d47 | |||
8a526ad452 | |||
773943e044 | |||
c0166aec20 | |||
c03754abec | |||
3487c41ce0 | |||
d4d4a4ab94 | |||
05d87a2314 | |||
5b83c5a191 | |||
867e161f32 | |||
ff15514d5b | |||
58497bb63f | |||
e0bc4f1da5 | |||
1cfe1aff13 | |||
810a7ab50b | |||
3b12de23ff | |||
12f788661c | |||
6164db5a18 | |||
c17623323a | |||
05aeeafacc | |||
dc4a7d98e8 | |||
cc5a0c23aa | |||
821458373d | |||
832a3dda41 | |||
728befbda8 | |||
a77c3f73cc | |||
ebae03c399 | |||
ffa4ac7efa | |||
16373d2143 | |||
1779b4d888 | |||
b218ded241 | |||
8c8ff4643a | |||
e6391b64f0 | |||
7195b77606 | |||
add7ecc7aa | |||
bce75dc047 | |||
71fbb23a2f | |||
7bb26b5903 | |||
93bfe60369 | |||
93bf977709 | |||
760dca0f76 | |||
a777ecc933 | |||
0231bcf685 | |||
a312ad2ad1 | |||
8e25970c01 | |||
b1c4d0c716 | |||
43c391aa1c | |||
2a0b4c8f14 | |||
1193608631 | |||
775d80de6d | |||
05f8f92082 | |||
f7022dd11f | |||
606e32603e | |||
5c5adfcccc | |||
0a2c0464df | |||
902953a2c7 | |||
a8dad2e393 | |||
2417d5a59e | |||
66b3635648 | |||
7f821c484c | |||
f51acb97a9 | |||
c4db907a50 | |||
5650bd2d4c | |||
9466f91466 | |||
127ffbd456 | |||
2fbf06a1aa | |||
55f2ae5d08 | |||
47fe867803 | |||
28980d932a | |||
1e640fac76 | |||
c7b6eac33d | |||
f83087d04d | |||
14ab9bbd05 | |||
a91d0ddc6c | |||
89400b4ea4 | |||
afcbe24ff5 | |||
9c00c86e9b | |||
7efed56acc | |||
81a2c3992a | |||
feabd38173 | |||
1432f0648f | |||
04f876af7b | |||
2449c63d0a | |||
c738ea573c | |||
987b3a47d0 | |||
4dd397d9d9 | |||
5973f8bbca | |||
43f27c2401 | |||
7c73d2c2fb | |||
3f67da8f54 | |||
afbecadba0 | |||
2de4023d43 | |||
6573d2e8f6 | |||
bc412466b2 | |||
7a481396c6 | |||
7f40c89ade | |||
3c0f640b48 | |||
2f6ba42ce3 | |||
aa8589d377 | |||
cb2bad0a36 | |||
665839133f | |||
91e9f176a5 | |||
1a64edb89f | |||
6874265f94 | |||
9889dedcac | |||
275ac587a1 | |||
2f43b5b5ec | |||
416b2c60a1 | |||
b39bee7a30 | |||
9714e5583d | |||
bef25929a7 | |||
34f54a96cf | |||
401359a73f | |||
88f1cbb29c | |||
bd9bce4c9b | |||
49c7ab701e | |||
35db60f2c8 | |||
c0fd3e79bc | |||
8a54014a13 | |||
3cfe144394 | |||
5da8caf0d4 | |||
c26d928eb0 | |||
02d4118f73 | |||
d97b2bf503 | |||
2a50e36027 | |||
eff3208ff7 | |||
551aff9455 | |||
22b4757971 | |||
fa004876e9 | |||
d5e34bb71d | |||
e0dbeca657 | |||
1b6bd5b997 | |||
a340378ce1 | |||
962f7d5f5c | |||
a10404f34b | |||
ed72595ae0 | |||
82dd597881 | |||
0c2d46e0af | |||
8b11616cf8 | |||
4b4a49bc66 | |||
b770508d68 | |||
8934a0d4f0 | |||
fcf763ed3e | |||
be8cc77086 | |||
ffea308480 | |||
c9712facf3 | |||
07773ed934 | |||
3c311ca527 | |||
bc02fb04f8 | |||
37979291b5 | |||
49899a9ceb | |||
bc2113a935 | |||
eb9df38e92 | |||
372e51ee07 | |||
30bf4f5747 | |||
ef2b8cf802 | |||
c455a9a6b6 | |||
7dac6841fb | |||
a8669ffe40 | |||
1ed392c53c | |||
4bd433d69e | |||
f3010726d6 | |||
812d699fd6 | |||
e32cbec072 | |||
1cb227305c | |||
e42ad3f659 | |||
6a2ae67c31 | |||
aa1b99204a | |||
6681289a5a | |||
322ad0890a | |||
b849b2aef3 | |||
92c0ad4154 | |||
49397cef70 | |||
517b811a99 | |||
6bdcbfbf0e | |||
b555c151dc | |||
12f211d07d | |||
277f960113 | |||
aa6eacaf6b | |||
80866f00f4 | |||
59e7d9b81e | |||
d6d91c8180 | |||
d10d645c02 | |||
a2c7921c1f | |||
582dfface9 | |||
592f2cc558 | |||
1e1a002ab2 | |||
ba2bd4fdaf | |||
9a407dcc5a | |||
f8c720f8cd | |||
9c3bc4eb38 | |||
0a8d4eecae | |||
120f5f2e44 | |||
e99812a6f5 | |||
1c5fedb177 | |||
8cc063ded2 | |||
5faafbbca6 | |||
dda1217735 | |||
d21f187673 | |||
8a105cf5a0 | |||
9e384df79e | |||
c0bfd32d39 | |||
7be680cbe5 | |||
93bf8eaa82 | |||
1248585dca | |||
1319c480c4 | |||
1911e8e3a9 | |||
4198c5363f | |||
207aae15a8 | |||
50531b8a36 | |||
e5e4824920 | |||
085247e2dc | |||
f766594ab0 | |||
d1e469e282 | |||
79e4500827 | |||
42702fa96a | |||
9deb3ad80f | |||
9877ef99c4 | |||
c304b40e1b | |||
f0e6d6f417 | |||
54de5c981e | |||
a446775fe2 | |||
7393d8720b | |||
287cb72d6f | |||
c5eff4bdd6 | |||
e9a33ed8ab | |||
875173a86e | |||
df7642b365 | |||
3bc1c0aa8b | |||
8951f5695e | |||
7401278707 | |||
e99f6e289b | |||
07da6ffa69 | |||
dc18730094 | |||
a202679bfb | |||
1edcda58ba | |||
5cb7f0794e | |||
7e8e3893eb | |||
e91e286ebc | |||
ef4a115b61 | |||
b79b73f5c6 | |||
056e3ed15b | |||
fb5e210af8 | |||
e5e2615f15 | |||
6c72a9e2e8 | |||
c04d0a373a | |||
bd74e518a7 | |||
3b76af4eaa | |||
706448dc14 | |||
34793f7cef | |||
ba96c9526e | |||
617432deaa | |||
36bf2be16d | |||
912ed343e6 | |||
2e15df295a | |||
eaab3f62cb | |||
aa615b0fd6 | |||
b775f2788c | |||
9c28db3d89 | |||
67360bd6e9 | |||
4f6f8c7cae | |||
3b82ad798b | |||
8827f06ac1 | |||
251672a67d | |||
4ffc0e2a08 | |||
4e1808632d | |||
791627d3ce | |||
f3df3a0157 | |||
6aaae53a19 | |||
4d84f6d598 | |||
4e2349b6d9 | |||
cd57b8f7f3 | |||
40b1fc06b0 | |||
02fa217e28 | |||
6652514358 | |||
dcd3dc9744 | |||
d6afdc575e | |||
287b38efee | |||
e805fb62fb | |||
c92dda77f1 | |||
f12fd78822 | |||
caba183c9b | |||
3aeaa121a3 | |||
a9f3118a7d | |||
054b819262 | |||
6b3411f63b | |||
6a8000ea0d | |||
352d4db0d7 | |||
4b665cfb8f | |||
4e12003944 | |||
6bfd465855 | |||
e8670aa693 | |||
5263e750b1 | |||
a2a9d73296 | |||
6befc9d627 | |||
73497a27cc | |||
f3098418f2 | |||
a5197963b2 | |||
e4634bcc78 | |||
74da44a6a9 | |||
3324473cd0 | |||
39d8038533 | |||
bbcf58705f | |||
7b5a0964b2 | |||
8eca76e464 | |||
fb9ab368f8 | |||
877279b2ee | |||
301be4b411 | |||
728f527ccb | |||
3f1c790b1d | |||
b00573bde2 | |||
aeee3ad7f9 | |||
ef021495ef | |||
061eab4b36 | |||
870e01f836 | |||
e2ca72adf0 | |||
395ef43eae | |||
a4cc653757 | |||
db4ff20906 | |||
1f0fbd33b6 | |||
5de8d2721e | |||
0d65da9a9e | |||
4316ee4330 | |||
2ed9a1dbe3 | |||
8e03824d20 | |||
754dbdd0e5 | |||
e13d348315 | |||
169f3ebe5b | |||
f8ad604e85 | |||
774b9c8a61 | |||
d8c522233e | |||
82d50f7eaa | |||
1c426c5136 | |||
d6e14cc551 | |||
c3917ebc2e | |||
7203bd37a3 | |||
597188c7ee | |||
ac4c314042 | |||
05866d3544 | |||
6596bc6034 | |||
c6661ef4d2 | |||
386e23dfac | |||
5d7220ca70 | |||
5de0d03acf | |||
b0cc91f343 | |||
029a78f108 | |||
3f4a8dc4f6 | |||
32f6ba6302 | |||
8da0b14f29 | |||
83eb4aff02 | |||
927d02f591 | |||
d04afcd6d0 | |||
89c6db66fd | |||
e6ffa65a7e | |||
8a2f982a77 | |||
16cf6315e3 | |||
1d85874f41 | |||
ff64182ae8 | |||
a9ee67bf2d | |||
e87d52a76b | |||
8b09cf55a2 | |||
0203d20759 | |||
7861e2e0bd | |||
ad29d54bbf | |||
c698ba37d9 | |||
6a53069653 | |||
152b2d863d | |||
ee670d5e19 | |||
36e095671c | |||
1088b947a8 | |||
c4a30c50ac | |||
2831df45a0 | |||
ee5bac099f | |||
69f7b41044 | |||
f9cede7b31 | |||
903cdeaa7f | |||
e909e7fa8a | |||
bee38551f3 | |||
c0ec6388df | |||
8f08836885 | |||
dd0d7e7481 | |||
25d0ac6534 | |||
971713d1aa | |||
5135d828b4 | |||
b2c571bf1b | |||
6b1d30d230 | |||
3454760731 | |||
96846220c3 | |||
a4f5678144 | |||
a18baa3cb3 | |||
dfedd4a7f1 | |||
897f64600a | |||
c6eb015d18 | |||
54088239ab | |||
aa9c7a6567 | |||
6c0c12c90a | |||
c49b57ad1d | |||
2339e855bb | |||
bdc019c7cf | |||
5e2fb6d56e | |||
3b9524cdfc | |||
7154f19668 | |||
8fedd9ec07 | |||
4ac87d8739 | |||
e4f45eba0a | |||
4b3e0f0f96 | |||
482da81522 | |||
c5226fd0e8 | |||
7806cff96f | |||
fa504e4bf9 | |||
86cfb10b9b | |||
f6b8171624 | |||
91ce7f7363 | |||
17060238f0 | |||
c392c2a74b | |||
8cbaec8ba8 | |||
4750f8c653 | |||
69d2a1cf3b | |||
635f6c1ef2 | |||
18da7565c2 | |||
45699a1a69 | |||
5556e9f8e7 | |||
327bb09dd4 | |||
8ca23451c6 | |||
b99e2b10fe | |||
e966dff1a7 | |||
481fbedef2 | |||
d104012eee | |||
b03a508475 | |||
8ede4b6a13 | |||
41323afccc | |||
4a10b4999b | |||
20ee634cda | |||
713025d218 | |||
58ae159835 | |||
c95efe3cde | |||
b6eb0bf53d | |||
610b6c7f70 | |||
1ea2d99ff2 | |||
67be43679c | |||
fd42389bd5 | |||
71b1df2fec | |||
7a3122f25c | |||
63041d788b | |||
bfc1bae0bb | |||
8ab7f7fcbb | |||
c1eb8317f7 | |||
7a578e5e83 | |||
b10912d8ba | |||
ef24b1cde2 | |||
26cacc2a06 | |||
ca0e89c799 | |||
17950119ad | |||
876618c1ec | |||
2293ab69b9 | |||
9df00e09a4 | |||
cf6ce9c915 | |||
3b61191614 | |||
9954eeac86 | |||
ac88bd5d44 | |||
2406a619df | |||
63087c9393 | |||
da9aaf69df | |||
ae125dd1f0 | |||
f636595230 | |||
d506e8f1a3 | |||
d3a96ac7aa | |||
189b0ec324 | |||
c5a6b4961f | |||
b590589324 | |||
9fb1ac98ec | |||
195d8fe71f | |||
b0602a3215 | |||
0150a5c58c | |||
b35d27c83e | |||
801bb90806 | |||
55a83abb26 | |||
c09b4e9713 | |||
247015e955 | |||
fe3634be64 | |||
ead20b03aa | |||
932a475af7 | |||
e9a1a18ba3 | |||
6cd9edd38a | |||
9b5f9167cd | |||
1f30bcd335 | |||
94eaeb5a60 | |||
a5420fe019 | |||
2e1849a732 | |||
4039e96803 | |||
8f585eca70 | |||
516455f482 | |||
719099a5af | |||
7f74d32253 | |||
525d271535 | |||
9ef39f1e04 | |||
9099dc5713 | |||
c3c525a3f0 | |||
e699dfe88c | |||
c0b334eb02 | |||
815ad26b91 | |||
03647fa6af | |||
5aec581585 | |||
68e9b7e140 | |||
b42bca4e3e | |||
42c9ac61b2 | |||
7cdc5f0568 | |||
a063613f4c | |||
3af04bf1e4 | |||
74f8b68af8 | |||
59dbc15be7 | |||
9d5dd896f3 | |||
02f5f12089 | |||
90ea6dba90 | |||
b0b2c0830b | |||
acb2b825f3 | |||
e956b86649 | |||
739c66da1c | |||
e8c7cce68f | |||
f741d382c2 | |||
a13d4047b6 | |||
e0d8189442 | |||
760352202e | |||
9724ded194 | |||
5da4ff4ff1 | |||
e54b98a80e | |||
67b69cb5d3 | |||
863111ac57 | |||
bd78087582 | |||
8f4e954160 | |||
553f184aad | |||
b6d7847eae | |||
ad0d339794 | |||
737cd22bb9 | |||
6ad1465f8f | |||
d74fa4abbf | |||
b24938fc6b | |||
ea1564548c | |||
3663c3c8a1 | |||
07e20a2950 | |||
6366d50a0e | |||
c3e64df95b | |||
d2bf2c8896 | |||
f27b43507c | |||
c1058c7438 | |||
c37901feb9 | |||
44b815efae | |||
64a71a3663 | |||
ae435f423e | |||
7aa89c6d4f | |||
7e9d7e5198 | |||
2be6cd70d9 | |||
2b9705b33c | |||
502e43085f | |||
40f1de3b11 | |||
899c5b63ea | |||
e104c74761 | |||
5d46c1ea5a | |||
7d533889bc | |||
d9c2b32cba | |||
6e4ce8dbaa | |||
03d58b439f | |||
ea38da441b | |||
bdaf0111c2 | |||
974c2ddb11 | |||
769ce1c642 | |||
f294791d41 | |||
4ee22f8ec1 | |||
74d3cfbba0 | |||
d278acb83b | |||
84da454612 | |||
52101007aa | |||
dc57f433fd | |||
3d4c5b8f4e | |||
e66424cc49 | |||
8fa83a8d08 | |||
397892b282 | |||
7be50c2574 | |||
2aad523596 | |||
6982b97eb0 | |||
3de879496d | |||
4e75118a43 | |||
52c4fb431f | |||
d696d854ff | |||
6966c119a7 | |||
8cf5e647e3 | |||
99bc6241f6 | |||
e5f837ebb7 | |||
9d93da3d45 | |||
9f6f18f9bb | |||
6458b1dbf8 | |||
1aff9afca6 | |||
e0bc7d3932 | |||
9fd9b2611c | |||
6f3a1dfd08 | |||
464b2cce88 | |||
4eaa46e717 | |||
59e8dca499 | |||
945d5bfaf6 | |||
dbcdab05ff | |||
e2cc2843d8 | |||
241d59be8d | |||
74251a8883 | |||
585afd1bcd | |||
8358574484 | |||
cbcdaaf532 | |||
f99eaa85ac | |||
5007a6befe | |||
50c75087b8 | |||
438e4efd49 | |||
c7ca95ff2b | |||
9f403a71ed | |||
2f4139df65 | |||
f3ee8f7d9c | |||
5fa3729702 | |||
87f44fada4 | |||
c0026f3e16 | |||
c1051059f4 | |||
c25eda63ba | |||
c90906c968 | |||
f6b52b9281 | |||
b04f92c8b4 | |||
a02fcb0a7a | |||
c1ea605c7e | |||
116be0b3c0 | |||
438250b3a9 | |||
5e6acee2a5 | |||
8b4222e7bb | |||
4af563ce89 | |||
77842fab58 | |||
5689f25c39 | |||
a69c494feb | |||
83408b6ae0 | |||
d30abc64d0 | |||
6674d3e017 | |||
4749c3fad0 | |||
18886697d6 | |||
e75c9e9a79 | |||
5a3c1137ab | |||
ddca46e24a | |||
22a9abf7bf | |||
fb16502466 | |||
421bd13ddf | |||
404c9ef753 | |||
a57b545093 | |||
d8530f238d | |||
fe4a0c3b44 | |||
e0c104ee5c | |||
6ab8794754 | |||
316e6cb17f | |||
9d5d99290c | |||
20ffe833de | |||
d4d026bf6a | |||
dfe093b2b9 | |||
60739e620e | |||
d6cc6770b8 | |||
ddc1022461 | |||
2c2226610e | |||
cba78b4de7 | |||
1eeb64ee39 | |||
22dea62084 | |||
5ff1dd8426 | |||
da15a8878f | |||
bf33828ac1 | |||
950a1fc77e | |||
895e7d7393 | |||
3beca0574d | |||
990f5f0a43 | |||
97ce143efe | |||
cbbe174fd8 | |||
da3c640343 | |||
4b39c71de0 | |||
818f417fd8 | |||
f1ccef7f6a | |||
6187436518 | |||
9559ee7cb9 | |||
72e9c4e6fa | |||
97b8a025b3 | |||
ea9687c30b | |||
0a5e14a352 | |||
0325847c22 | |||
491dcc1159 | |||
6292049c74 | |||
1e97af772f | |||
5c622cd4d2 | |||
c4de808c4e | |||
8c604d225b | |||
c7daadfb18 | |||
683968c96e | |||
c94added99 | |||
61c00e5b39 | |||
566ebae065 | |||
9b62a6403b | |||
8c465b2026 | |||
6b7da71aa8 | |||
e95bbfab9a | |||
e401575894 | |||
6428801270 | |||
3e13c13619 | |||
92f79eb30e | |||
e7472de4bf | |||
494950ac65 | |||
4d51295db2 | |||
3bbded3555 | |||
b3262e2a82 | |||
40614a65fc | |||
3cf558d594 | |||
812cc0d2f1 | |||
e21ed92848 | |||
5184c4b7ef | |||
2c07859b68 | |||
ae6304c05e | |||
501683e3cb | |||
cc8afa8706 | |||
17a9e02bc0 | |||
6a669992a8 | |||
7ea5c22b6c | |||
b11d6a5891 | |||
49830367a7 | |||
e69ca5a229 | |||
a57d21f5e8 | |||
c7026407c6 | |||
69eecd6b60 | |||
810f10edfe | |||
1c57128f11 | |||
82eade3eb1 | |||
56a9dcc88d | |||
fe70d80189 | |||
e97e22c58a | |||
bb4e39aab6 | |||
a8744f443c | |||
7fe9b8f0b4 | |||
696aa7e5f6 | |||
e1d82aee1d | |||
151374f565 | |||
bebeff9f7f | |||
8b99afa34d | |||
b317852e8a | |||
24ae35c35a | |||
8e6bb48227 | |||
7a4e8af1ae | |||
0161205c82 | |||
ca0ba85023 | |||
c2ebaa7f64 | |||
23cccebb96 | |||
3f5d30e6fe | |||
ca735349f9 | |||
25ce8c6dc7 | |||
081ac0bcdb | |||
8a07b349ee | |||
b3468bc265 | |||
4edfad869f | |||
404f5d7912 | |||
8bea99a953 | |||
0b0ba33dce | |||
e3627b2cd9 | |||
37fac3ae00 | |||
17a90adf3e | |||
7c3590f8ef | |||
7471415e7f | |||
9339d496f9 | |||
e72000eb06 | |||
ec5ff7c14d | |||
43cb08b433 | |||
95a1c7b6d5 | |||
031a3d8719 | |||
430905295d | |||
1356a8108b | |||
37dcf264e5 | |||
296e1f4962 | |||
a0e81650d7 | |||
894cee6123 | |||
a7be0379f4 | |||
2d6b57839d | |||
455e39a8bd | |||
a7d8ac888a | |||
349e536d14 | |||
cddc9bc1b7 | |||
6d27408a10 | |||
50a5959f6c | |||
18f42a0edf | |||
860ba994a6 | |||
1776b72356 | |||
8db60b3e83 | |||
3b6341bf41 | |||
3b97389833 | |||
102d536a72 | |||
9712be847c | |||
f0b5e8143e | |||
cc061e5b16 | |||
fd8514331b | |||
1dc63776a5 | |||
87b14e8761 | |||
28893b9695 | |||
bb9ae28be8 | |||
0c05fd47f5 | |||
fea44486c3 | |||
bf4763d946 | |||
219e16f8e5 | |||
6ebefc9f17 | |||
80e8a3d63c | |||
dd017e7190 | |||
268de20872 | |||
14e47f3195 | |||
6d289aea48 | |||
529fd081a0 | |||
02e3c78720 | |||
abc78d6633 | |||
3f3dfc0a28 | |||
5bd27bce3f | |||
c39d136383 | |||
a977184577 | |||
b7ca40d98e | |||
b2cb794865 | |||
874f03e4dd | |||
8f08d78bf1 | |||
2661f2bbb3 | |||
7d321e8aa8 | |||
a732beb72b | |||
0996775ebf | |||
4147e8d1a7 | |||
983bbb622d | |||
885f8bae9f | |||
aaa662199c | |||
0e0898c3cf | |||
8b17e8be99 | |||
a082222b58 | |||
9826bb4d01 | |||
f7c629ec9b | |||
e2aeb96a6a | |||
ff810c689f | |||
0eb94df1f7 | |||
86597df159 | |||
0394adaf46 | |||
c7a2410b1d | |||
b9076b5fd4 | |||
c07a45083f | |||
4b10fa3d93 | |||
c910dc9a3c | |||
882dc60292 | |||
7923468a01 | |||
9ebbb51cf7 | |||
bd25cadb71 | |||
7334599efd | |||
54f0728005 | |||
e0c7637382 | |||
086a3c0548 | |||
65efbbd7ee | |||
5cc045e3c9 | |||
56d259ce75 | |||
8919bade55 | |||
703d511089 | |||
aabedfc3e4 | |||
0f154dee11 | |||
a5c46d7e72 | |||
bbd59698e1 | |||
3b0216bc00 | |||
b4fc32afac | |||
45df127f18 | |||
55cf49bb8a | |||
00ce2a90f1 | |||
de77e1e41e | |||
e40c07e997 | |||
d4b0bbb368 | |||
d05f077ba0 | |||
ca322d1e2c | |||
3c9631b287 | |||
16c2332c14 | |||
2723b2091f | |||
7b454ff72a | |||
4578bf6f29 | |||
a991632396 | |||
81d2f8c728 | |||
b42164a6b6 | |||
5857552b73 | |||
0645dde90c | |||
494a8226a4 | |||
aedd5f3f99 | |||
8a1ff7cb5b | |||
e0a9cc0e26 | |||
8f240b5303 | |||
ea39a5e952 | |||
ac539268cb | |||
ed72a2c959 | |||
e5cd9a4a2a | |||
d4f530f80b | |||
282a518e00 | |||
5d50d99f59 | |||
d56a98e561 | |||
0cfdbd92d8 | |||
6262923398 | |||
f96b1b58f3 | |||
fdf372912a | |||
2e517258fa | |||
316ac78e49 | |||
de2b67b111 | |||
e1bbbe6671 | |||
8b3839343c | |||
7897ca4744 | |||
2fd00c6c9d | |||
80f7f82fa4 | |||
1a21012911 | |||
d4a5269bf1 | |||
fcf70a3cd4 | |||
e9411d856c | |||
1a6dd00681 | |||
330bd0932b | |||
250e77f40f | |||
ef71aba544 | |||
567a8f53da | |||
88c87aa205 | |||
90ac3d56ca | |||
a298e9e2ca | |||
abdf86d9c9 | |||
c58658d820 | |||
a9b5e6ea13 | |||
ddb0fdee98 | |||
83205f1b49 | |||
7221800a16 | |||
4515cb6bbe | |||
7f9da11eba | |||
da69d2611d | |||
3b4be5695a | |||
9d68c9550b | |||
3b2d469780 | |||
ae629d1159 | |||
72a6f9cbe0 | |||
9793b7461b | |||
9c1a824dc4 | |||
738ced3327 | |||
ed1ee1fa55 | |||
95776bbc56 | |||
62a4beb3d6 | |||
466a825f5b | |||
3ffed279d7 | |||
4b6b36b2d2 | |||
2a8f63bf86 | |||
3c12cf96a9 | |||
d787caf0e4 | |||
0fc2f32d3d | |||
894d5da1d8 | |||
985d20d025 | |||
94f3e6d0c5 | |||
0a196608c7 | |||
d33f0fb2cf | |||
ffff69ada0 | |||
37a432267d | |||
88029a4335 | |||
4040eb9619 | |||
c9663a08da | |||
a3d92ebc0a | |||
6fa825e372 | |||
6aefd072c8 | |||
ac2dd3611f | |||
74e628ce9c | |||
d4ee18ee32 | |||
9ff3ee7c0c | |||
418b94a45a | |||
1393078fe6 | |||
50612991fa | |||
37b2400cdb | |||
05c3393669 | |||
c60d1e1f9a | |||
2be7d3191f | |||
aa692fdacb | |||
c163637bfd | |||
5552aca079 | |||
ff2456dcfa | |||
539264c396 | |||
1acfaf1562 | |||
a81e277cfa | |||
b4cb78f33f | |||
35c0a9532f | |||
aff074420b | |||
edbea9ccff | |||
6b26e10ea2 | |||
a737335fdd | |||
e15f7d7f28 | |||
fbf9554a9e | |||
5f34b08433 | |||
f67a03ad66 | |||
6095301337 | |||
4a774b5885 | |||
aa8fac3a06 | |||
b8407f5bf6 | |||
989c426211 | |||
9a888cfcf1 | |||
72ec871729 | |||
8d58842c9b | |||
a90aa5e069 | |||
639020a2e1 | |||
8e6f915ec6 | |||
6631471566 | |||
b452e751ea | |||
a3baa100d4 | |||
f7b9de1261 | |||
47ca566d06 | |||
a943d060d2 | |||
1675dab314 | |||
996aa367d3 | |||
be6f342e58 | |||
464b558a02 | |||
d1151091cd | |||
f8e5383ba2 | |||
06f73512df | |||
0ff4545bab | |||
ff6e270886 | |||
8aa0b72b67 | |||
91766a2162 | |||
a393097504 | |||
2056b86ce7 | |||
1b0c013d8e | |||
92a09be8c0 | |||
1e31cd03ed | |||
dc863a6e87 | |||
d74366f413 | |||
5bcf2aef8c | |||
8de3c4fbd6 | |||
c191b62245 | |||
0babbde00e | |||
b8af312ab1 | |||
38cabfb325 | |||
0a3528b5f4 | |||
30a672758a | |||
723a825085 | |||
40e794099a | |||
111b037512 | |||
52f66717d3 | |||
7ac4242a38 | |||
4caa4be476 | |||
c6d8bae147 | |||
c70310730a | |||
2d2b2d08f4 | |||
8fe6a5b62d | |||
5e6221deb8 | |||
c3b493f7d4 | |||
dbcb5b4f63 | |||
f0640fcea9 | |||
64c47a59f8 | |||
3450b8f1fe | |||
9518cefdd7 | |||
32d5c26577 | |||
ef2cdf27b3 | |||
e58ac7ae90 | |||
d786fa4b7c | |||
0e3e73989d | |||
d831599608 | |||
1e57926603 | |||
1524880eec | |||
0bfb623f97 | |||
429627494c | |||
9feea155fe | |||
2717e02d93 | |||
18bd803b0d | |||
c7f078ffcc | |||
571cb3d65f | |||
8c500c38b1 | |||
5644e57e6a | |||
cfc181eed1 | |||
91bea38b8e | |||
d95c5aa739 | |||
0b250b897e | |||
c6880a0f16 | |||
beb5ffcbdd | |||
0715cac39b | |||
41117d873d | |||
231e448b1a | |||
b3b8cd807d | |||
9021bbd5de | |||
169475ab39 | |||
c00e01626e | |||
05d4a9ef62 | |||
17a2ac73e7 | |||
6bc6f947dd | |||
b048a1fb4f | |||
363940ee8d | |||
a64e53479c | |||
14fdbe7720 | |||
f56332c954 | |||
21c53c748f | |||
b12182c1d1 | |||
d8f27f595a | |||
b25dc2aaa3 | |||
3ec3849e72 | |||
2dc1b65718 | |||
af22f507f4 | |||
9958019bf3 | |||
02d65972cb | |||
24ad893350 | |||
9c5792b1e1 | |||
094d191bff | |||
49fb9f688b | |||
7d161e5aa1 | |||
78e5d471e3 | |||
2e2c9f5287 | |||
d5a3e09a98 | |||
2402cfe29d | |||
26613b6ea9 | |||
e5165abf04 | |||
b26882a450 | |||
94281bee88 | |||
16b966c16e | |||
d3b0992456 | |||
dd74b73b4f | |||
0bdfccc1f3 | |||
ceb0793bc9 | |||
abea85b635 | |||
01c83f6f4a | |||
9167c9c3ba | |||
04add2e52d | |||
1e9241d45b | |||
22ee198a31 | |||
1d9c92d548 | |||
b30b58924f | |||
bead19c64c | |||
76e2ba4764 | |||
8d095d7436 | |||
d3a7fd5818 | |||
247a8dbc8f | |||
9241adfc68 | |||
ae83ee6d31 | |||
4701374021 | |||
bd40585247 | |||
cc0b8164b0 | |||
310b31a8b7 | |||
13900bc603 | |||
6634cc2edf | |||
3478a2cf6d | |||
3b70d12a5f | |||
219acf76d5 | |||
ec6f467fa2 | |||
0e6561987e | |||
62c20b6e67 | |||
13084562c5 | |||
02c1c434a2 | |||
5f04a75878 | |||
3556c76674 | |||
c7d638de2f | |||
143733499f | |||
0d6a0ffe14 | |||
6d4c7312d8 | |||
2cb6a179e8 | |||
7de2ad77b5 | |||
89c33060d4 | |||
b61f595562 | |||
ce2230f774 | |||
d18a78d04d | |||
c59c6aa728 | |||
729910c383 | |||
37fe637422 | |||
3114d064ed | |||
2ca5e1eedb | |||
d2bf579ff6 | |||
3716bda76e | |||
a76eb4d30f | |||
7c191b0984 | |||
9613fcde89 | |||
885a2ed057 | |||
b270fb0742 | |||
285a69d91f | |||
de3b753a26 | |||
34be1dd9f4 | |||
a4c0fb9e75 | |||
f040223646 | |||
bf297b8593 | |||
43eea9e99c | |||
8e38bc87bc | |||
50a57fb3dd | |||
38b8bc182f | |||
9743ad33d6 | |||
b746ce97ba | |||
dbee714dac | |||
d33f632203 | |||
812aa4ced5 | |||
63466e3384 | |||
920858ff72 | |||
56f599e4aa | |||
05183ed937 | |||
8d31eef47d | |||
96a6ac85df | |||
5a60341a6e | |||
21ba969072 | |||
d6a8d8292d | |||
693a92ada5 | |||
ec823aebed | |||
b8654c06bf | |||
9d03c4c7d2 | |||
8c36ab89e8 | |||
e75e71a5ce | |||
bf008e368e | |||
3c1d02bfc4 | |||
c1b2093cf7 | |||
cc7e4ad0e2 | |||
c07bd6e733 | |||
768464dc6a | |||
a2ed53c312 | |||
5a11206fe9 | |||
9675fbb07d | |||
57a7bed99d | |||
2dfec43750 | |||
ab9f6531c2 | |||
b8b5069df1 | |||
7045305aa8 | |||
49c706fde8 | |||
9eaceb9ec6 | |||
05778d8065 | |||
831e228f80 | |||
31e0d74495 | |||
05999cb8c7 | |||
6cb4773916 | |||
ec9b0600e4 | |||
c0d8aa2303 | |||
599fdf193e | |||
db6cb5ad51 | |||
52f138d402 | |||
bc37727758 | |||
547a728130 | |||
178c2b6927 | |||
59b8b1e92a | |||
0210cdadfb | |||
491e507d49 | |||
de1be2df88 | |||
39f51ec33d | |||
f69e20886b | |||
fd0f0c65e9 | |||
ed4daa64fe | |||
887163c45c | |||
1b3c0adf75 | |||
0838f518d4 | |||
5c49cda884 | |||
6643cce841 | |||
3eb2cda37d | |||
6fdaac9a7d | |||
6122dcacc7 | |||
246d00bdde | |||
7e47b64b05 | |||
4285175bba | |||
e4a9a84646 | |||
4d81172a48 | |||
c97b946a00 | |||
3753275453 | |||
e4cb9b7ff9 | |||
a0f05caf8e | |||
42e9ce4f72 | |||
331faa53bc | |||
17424ccc3b | |||
68efcc7bf2 | |||
7b7305607c | |||
f1e6d91289 | |||
0310d46314 | |||
14fd137f89 | |||
e91a8f88a0 | |||
af8cdb34ee | |||
03b1a67b44 | |||
12525051b6 | |||
01f004cec6 | |||
3a40e50fa0 | |||
fa5c2bd85c | |||
b83aa44c4f | |||
73e7158178 | |||
8c6a4a4968 | |||
d12462fe0d | |||
c83216ece0 | |||
133486f07f | |||
b0fec4f3e2 | |||
739a99f16e | |||
f54a1b627c | |||
242d8c2b91 | |||
77065794da | |||
dab53cfd03 | |||
6a4086c490 | |||
5b8bdac84b | |||
c71b150025 | |||
647d56e90c | |||
e85236959b | |||
afe3259e96 | |||
4be2c66cdf | |||
dc8c1ad297 | |||
9dc3b1dca0 | |||
cbfb509ca9 | |||
047361600d | |||
a5b8c91c04 | |||
4d317a21ce | |||
e07b65401e | |||
71df9ea74d | |||
1cbaf865d8 | |||
cf9023269e | |||
5f9e8ac89b | |||
bdf0e74af3 | |||
6dedb17029 | |||
5e8a1e3c0d | |||
703e67a060 | |||
de00f9f41a | |||
a05f841bed | |||
c23646e6f3 | |||
f0600b5482 | |||
afc8baff5f | |||
8a0b3bd299 | |||
3713d111a4 | |||
111459dc25 | |||
cdad8bb0c3 | |||
96c41f399e | |||
c4d7d0213f | |||
2a5ee9b185 | |||
9aa3b16c92 | |||
4c3de09f6a | |||
f4650ead40 | |||
1d59af7491 | |||
8605e62503 | |||
3f779fe766 | |||
1d3460b670 | |||
feba3e2430 | |||
b49d39a685 | |||
34c1b3b68b | |||
e3d6ca6ab4 | |||
6f0e292c43 | |||
9df1e7900d | |||
9920d121e5 | |||
7e77c88407 | |||
3fa982cb2a | |||
4f1e767488 | |||
8e6b503c0d | |||
17f1cad468 | |||
0b8eaff874 | |||
33a6d4cdeb | |||
d3224f4ee8 | |||
2a3166bf7e | |||
62fe4d617b | |||
b86b36f947 | |||
d6b9e67e78 | |||
f589da4e72 | |||
2e5170f631 | |||
bd312b60fc | |||
26aa7e1fef | |||
9495956fae | |||
089ee86d43 | |||
d321e2f52c | |||
5265064b10 | |||
ee8313142f | |||
0963b68f4e | |||
a4a7ecd493 | |||
3b6e414d0f | |||
8859806d64 | |||
56198e503b | |||
b1b3a23d1e | |||
45dd004d00 | |||
c4ebc5c085 | |||
31c42f1104 | |||
8b7f665c82 | |||
0ca7579d19 | |||
2291ae98c3 | |||
16c6e29801 | |||
fc2eb003ea | |||
aa440c17b7 | |||
4915205678 | |||
07da5f7122 | |||
f91e02a0ec | |||
c62794c738 | |||
7664b428e7 | |||
9f3f34389e | |||
30ca926b38 | |||
eeb62f543f | |||
6a7ffa855e | |||
0c5aff21bc | |||
b0f426e51a | |||
57b91eb128 | |||
ed0094eba2 | |||
4c1b6d5f48 | |||
41a7e1ef07 | |||
4ff41be74a | |||
7067d1f236 | |||
73116b9d1a | |||
147212a5f9 | |||
5502c319d4 | |||
d18b76a47d | |||
90ce704def | |||
790139f8bc | |||
f4be007803 | |||
448ca62661 | |||
4824e5c8ba | |||
9882342ed1 | |||
c4facd53b4 | |||
ef913abc7a | |||
55fc5a6068 | |||
f22c89c998 | |||
2a78d2d0a0 | |||
b0ddc6a8c0 | |||
8080b0380e | |||
ddfa2abbaa | |||
5fc5e54f47 | |||
7462d56182 | |||
3f92d1c420 | |||
d4fa60f509 | |||
052bf88c3d | |||
07d047c887 | |||
23193314f1 | |||
1912b29dc5 | |||
46410428d9 | |||
1774e33c24 | |||
c961327d27 | |||
fe1ff7fc76 | |||
82d12ecfdf | |||
6ed822fa38 | |||
4d1658b35e | |||
08302a04bf | |||
1c906b12be | |||
4d835b18cc | |||
e02ff7ec30 | |||
2e67b0194b | |||
8b4558fcd0 | |||
27728abe99 | |||
467b95cf02 | |||
80a36a3441 | |||
b1b63fbb7f | |||
0302a95dd7 | |||
fe6bfb1620 | |||
3cad746407 | |||
e6d64bf5b3 | |||
8dd05d5431 | |||
270739a45a | |||
df8995deed | |||
02f0712934 | |||
7e7ea47f39 | |||
7e52711e3a | |||
40fd1c9c1f | |||
4037a444eb | |||
1ed7e900f2 | |||
cfc8d0a0f7 | |||
df33616544 | |||
fdfc6472d2 | |||
bc495828e7 | |||
fa138a273f | |||
5555dd4dde | |||
084ff2994f | |||
ee8a61d164 | |||
60a363e4bf | |||
e2804b9755 | |||
9330a03273 | |||
beabba2890 | |||
eeeb14a045 | |||
ff3f126832 | |||
73225917cd | |||
8b7a285f4a | |||
3a4c6a5d67 | |||
0664f0b6b2 | |||
fab9f1cb1b | |||
b3c54308b7 | |||
c1a72a0474 | |||
4377d1e86e | |||
cafe2f1e1f | |||
c329a724e8 | |||
969da05437 | |||
c61c84e9f3 | |||
e08c5ff875 | |||
d1fd616b8d | |||
cc4bbc049b | |||
24a3e787dd | |||
13a20478fd | |||
f58ee7fb52 | |||
4d45dc31a9 | |||
f6b5fbc2cf | |||
db69c3e38d | |||
5ba55356a9 | |||
6104b7c9ba | |||
bcef8369ff | |||
0fe555a76e | |||
c903c81bd5 | |||
2c43bfb13f | |||
24ecab0878 | |||
6285c79341 | |||
5f7c56fab4 | |||
6338b14a5b | |||
62ff3667f9 | |||
3b97eef641 | |||
b05d66466b | |||
220144c919 | |||
3b9402420d | |||
1324143146 | |||
595144cdd9 | |||
b3e714a741 | |||
2b3ae1e2d5 | |||
886845306a | |||
de6aaec088 | |||
137e0854ab | |||
b6a0e895bc | |||
05c791b1c0 | |||
669f3051e8 | |||
d945b56561 | |||
27333bbff1 | |||
80c800f233 | |||
5d17d3dd31 | |||
8c64fcd17f | |||
753110583e | |||
4206a8c43e | |||
7cc9ae45bc | |||
09ef58350c | |||
0b70007926 | |||
2c5d6e8187 | |||
10d3f9ac2f | |||
a6301055f0 | |||
9a1b8eb7c8 | |||
2ee45f388c | |||
9a9feea5ff | |||
8540e787d3 | |||
db26ce808e | |||
802d568273 | |||
7b6524357f | |||
83013f063d | |||
333ee3eed4 | |||
e68352b09c | |||
df1cb88abc | |||
5596caedbc | |||
7bd65120b9 | |||
227966e727 | |||
406f69080b | |||
2ce31dfaa5 | |||
b23afcfc3b | |||
7ed3ceb960 | |||
615cd7870d | |||
b907105f4a | |||
023423c6e7 | |||
a5319fc2fe | |||
8cfd3f9a2b | |||
814c797c64 | |||
776ad3cfbf | |||
74ddf70cb7 | |||
a7a839a29c | |||
9859c5db0a | |||
fe503c8de0 | |||
43a583e2d2 | |||
f289025d8e | |||
19cb310446 | |||
47f6d0ac59 | |||
922cbf932d | |||
c104eeebe6 | |||
80c3246333 | |||
461fed5567 | |||
d5f6714ed7 | |||
c42ed6bc99 | |||
57fed2b92b | |||
e45b33c6c2 | |||
137e90355b | |||
7500e622f6 | |||
d49c58f326 | |||
9814d3be03 | |||
fc9f86cccc | |||
6fd19c0a37 | |||
10cb412532 | |||
e12780f78f | |||
9dec13c225 | |||
69120da45c | |||
5b2bf7519a | |||
631cf77f89 | |||
6676e95011 | |||
3219cffb52 | |||
d4f149bc02 | |||
206cf4967d | |||
a67c53f46a | |||
e989c61793 | |||
99bab03cce | |||
a7567ad8c6 | |||
2ffa2fc6b8 | |||
8de87d9acb | |||
1d03b36750 | |||
8dc3c49a2f | |||
f6461b08d7 | |||
a3a3dde1c8 | |||
f111604b70 | |||
4315d1a03c | |||
9def45c8d7 | |||
358922b09b | |||
fbc3ac6b30 | |||
4f785da452 | |||
ff4bd1c91f | |||
7a96f9e894 | |||
c27d257146 | |||
9bccf9bb0a | |||
c0b05a62f4 | |||
c140c39d07 | |||
9a700e506b | |||
8e488670ad | |||
fd5b2298e5 | |||
caeaf8d5a9 | |||
c46f0781fc | |||
0aad0604d8 | |||
131c3fdb32 | |||
8a6009c278 | |||
3456527f10 | |||
28b913136d | |||
f700899640 | |||
5ba45d3037 | |||
212e966dd4 | |||
08c0eb2ec6 | |||
872ecd93a6 | |||
f8af9d6ce0 | |||
c3e43a7c2f | |||
273af0f1cb | |||
2a85e5ae87 | |||
114bb1b0bd | |||
97b5d120f8 | |||
e1f0fe45cb | |||
bc0f4973d8 | |||
5400882d78 | |||
8de66b27ad | |||
179f0097c0 | |||
b40bffdf38 | |||
2e9496bb74 | |||
d9d765c6cd | |||
10cc6856a4 | |||
813dd2894f | |||
80d90b91e8 | |||
fff05e35ac | |||
75bb59a22a | |||
3ce69bb391 | |||
4eb7c5f94b | |||
aac7e6be90 | |||
c77f4204c0 | |||
5f4452470b | |||
9a1270c693 | |||
7b9d1a1159 | |||
cdbe1f6161 | |||
e43db2e065 | |||
d1c74d2160 | |||
f2119ce567 | |||
2c4dcb9cf0 | |||
93b8266821 | |||
443797d9b0 | |||
a4365ca02c | |||
3750083667 | |||
66ef067ecf | |||
b489b0e691 | |||
f2154d9875 | |||
80a50f9bdb | |||
dc8b89a6b9 | |||
8df55f22aa | |||
f6c322be27 | |||
a144552059 | |||
535d529193 | |||
6ed2e137a2 | |||
45bd63c720 | |||
736e13fc35 | |||
966fff008c | |||
64f15eadbd | |||
81b66ecdcd | |||
53e5cf7826 | |||
82654b3fd9 | |||
9b72c604dd | |||
5fb1b8044c | |||
b8daab4377 | |||
c5b91bdae8 | |||
39a208c55f | |||
a5bfef9b6b | |||
f1f4cbef9b | |||
8388120b06 | |||
2bf96828f1 | |||
22838e66fe | |||
484dd6de09 | |||
b743736c26 | |||
af91e2079b | |||
cad1c17f14 | |||
120d32e4dc | |||
238b489e07 | |||
4daa70c894 | |||
f8599438df | |||
155c9a4c3f | |||
8433b5e583 | |||
dc5ba144f1 | |||
521a8b5356 | |||
3453077d7b | |||
70ede8581a | |||
6e9d297f02 | |||
6a7545fd43 | |||
a8926cbd07 | |||
64d7b009ab | |||
2b5fddb7bf | |||
b99d23c119 | |||
03905b74ff | |||
6b8a59cfbd | |||
d6fdcd3ef9 | |||
53ebc551d2 | |||
3d4f43d6e3 | |||
074cde7cd5 | |||
382e563590 | |||
ca61a7cc21 | |||
fa2870afe0 | |||
0f46207ea4 | |||
1e7d912144 | |||
f4a676e2fb | |||
b2c10e2387 | |||
8c329dca7d | |||
83da175749 | |||
995c87938f | |||
40678b2f84 | |||
8dbbe9102b | |||
2f51f354de | |||
04b815a33e | |||
2a4d68911b | |||
4d5a2d61ff | |||
efd88c27ad | |||
80d361ccd2 | |||
6ed4501615 | |||
8d34faa28e | |||
a3ae827839 | |||
88c1ad4c1c | |||
1147c4901b | |||
063181d7a7 | |||
1285ba6fbb | |||
a09a1793ec | |||
50caa3ac3e | |||
9440d24358 | |||
26bf6fd22f | |||
e2f836feae | |||
b6326f399c | |||
ea6a1422f7 | |||
8fd86a28ff | |||
d88283a7a9 | |||
32a15f84c0 | |||
93ba4b7f62 | |||
187780dab2 | |||
d988f37afc | |||
295c0bae3f | |||
38a22ddf13 | |||
d06f1abb89 | |||
027a64fad2 | |||
84fc54ddaa | |||
0b5caa85f5 | |||
14e0a17dbc | |||
3c04afa31f | |||
40a2a26904 | |||
c8b3c6e51a | |||
e0272a6422 | |||
b290bbf6d7 | |||
8d875cb01d | |||
36b1f8ba36 | |||
6c889eff27 | |||
9d8675e54b | |||
22ae986c0b | |||
2bef5f3911 | |||
3c2b8e5ee1 | |||
c96571bdba | |||
2dfd93afb1 | |||
f1d77d475c | |||
1d22e30c70 | |||
07b7951390 | |||
995615d0a0 | |||
ac273aab75 | |||
44cd03654d | |||
3e2375f970 | |||
38ad8e5fd3 | |||
c481558a46 | |||
e27a05a7fc | |||
e4886f0c6f | |||
8b2ce5476a | |||
1b82283a20 | |||
7f3d0113c2 | |||
0f6dd33a6b | |||
5b79b3fd22 | |||
d68c72f1fa | |||
9267d0c1dd | |||
865abc005a | |||
a2725d5b82 | |||
4a05bc6e02 | |||
4e8238603a | |||
ff25c1c057 | |||
78cddca0d7 | |||
4742ee1d93 | |||
0c2dc309e7 | |||
144935d10f | |||
74ad1b6759 | |||
591d2f89a1 | |||
7c353f9297 | |||
cd1af15c56 | |||
878169ea2e | |||
38dfb03668 | |||
e2631cec0e | |||
5dad853f8a | |||
9f00843441 | |||
f31cd7dec6 | |||
1c1afca31f | |||
fbd4bdef33 | |||
5b22f9b6c3 | |||
083e317028 | |||
95416623b3 | |||
813b2676de | |||
aeca66a288 | |||
04a5428148 | |||
73b173b92a | |||
7cbf20a71c | |||
7a98e6d92b | |||
49e915f98b | |||
3aa2f1e892 | |||
bc4b7ef44d | |||
9400b01a55 | |||
e57da71dcf | |||
7268afaaf9 | |||
205183445c | |||
a08bdfdbcd | |||
e6c47fee26 | |||
a5629c5155 | |||
41689fe3ce | |||
8e84208e2c | |||
32a48fa07a | |||
773a9c0692 | |||
8808e3afe0 | |||
ecea85f8ca | |||
5dfa141e35 | |||
447e81d0b8 | |||
e138076e1d | |||
721d133dc3 | |||
75b687ecbe | |||
bdd1863177 | |||
e5b85e8e6a | |||
d7481c9de7 | |||
571373866e | |||
e36d7928e4 | |||
2be026dd44 | |||
d5b9de3569 | |||
e22620b0ec | |||
ba74a3213d | |||
d9ecb7070d | |||
fc4a46bd9c | |||
78301b7bab | |||
7bf7bde856 | |||
9bdff14403 | |||
f124314eab | |||
684e4ffdcf | |||
d9ff5c69c8 | |||
8142e3df45 | |||
73920899de | |||
13666965a7 | |||
86f16e2781 | |||
2ed8e72c62 | |||
edeed18ae8 | |||
d24133d8a2 | |||
b9733e56aa | |||
cd34413914 | |||
c3a4a76d43 | |||
a59a29b256 | |||
dce1edbe53 | |||
264d43827a | |||
6207226bdf | |||
ebf33f39c9 | |||
696cd1f247 | |||
b7b3abc462 | |||
575739d07c | |||
2d7e70eebf | |||
387f3c981f | |||
865435fb25 | |||
b10c5306b9 | |||
7c706369cd | |||
20dd6355c1 | |||
ba8d5d6e27 | |||
c448f87027 | |||
2b8c70a61f | |||
9d7ed9a0ed | |||
ff69b4affe | |||
d77afd1ded | |||
c3909f9196 | |||
fa55ba5ef0 | |||
766518ee0e | |||
74b2b26a20 | |||
4ebbc6f065 | |||
3bd1eadd51 | |||
8eb3f0f708 | |||
31ea2e7139 | |||
323b4b4a5d | |||
7b8e1bea92 | |||
f986dc89ad | |||
b21fd10093 | |||
6f9c19b142 | |||
f45643ca87 | |||
85f8bea784 | |||
b428ec5237 | |||
92428529ad | |||
f6761b5b0b | |||
307b04f4ca | |||
6a520a5697 | |||
f22dbba931 | |||
82cf482fba | |||
a6afb99edd | |||
ac5f8465b9 | |||
218acb9e38 | |||
927c718fdd | |||
b7a6d6e739 | |||
0946d6a25d | |||
c1e98e2f0c | |||
807cbbeaaf | |||
6c358c4e0a | |||
74cd0bc08f | |||
b08ec0477e | |||
328c999cb9 | |||
c37e382c15 | |||
784dd0fdd6 | |||
e6256cb9c8 | |||
4520e3f8b8 | |||
23146de2bf | |||
e24f4fe3a8 | |||
8e6b69f96f | |||
979bea17ed | |||
30dba285d9 | |||
99fadf2e55 | |||
b606e3d0cb | |||
be642bc874 | |||
49a347b32f | |||
089b48aad1 | |||
2997cb83b1 | |||
08f0aca894 | |||
80ea7c40b7 | |||
019a0cb14d | |||
97290755e7 | |||
7f150c96b4 | |||
73558f30d1 | |||
dfcfd87644 | |||
2c0f0a68a8 | |||
3d73aac3ab | |||
e4fbcd3735 | |||
44c0eb37cf | |||
adc3dcc2c4 | |||
bac8227371 | |||
73d4d9dfe0 | |||
afdac5f3f8 | |||
dabce36667 | |||
3bd56ce522 | |||
540419d5c1 | |||
ed1fcc3930 | |||
c22ddc5394 | |||
0544864a3f | |||
0b9fc9e444 | |||
e862b97005 | |||
cffe09b02e | |||
846a86fb62 | |||
463c130351 | |||
ffca957838 | |||
543e949a48 | |||
feb80049aa | |||
5c59c8ccb6 | |||
1fadd82c65 | |||
7e7736126d | |||
5e0915afce | |||
bf6c9e8c4a | |||
3353aa0298 | |||
d4cb1a98c7 | |||
13f4ea0b8b | |||
261d57ad7b | |||
4086252979 | |||
8bdf12cff1 | |||
65a065c4ee | |||
a691ee529c | |||
f1c4a62612 | |||
358e39ced0 | |||
48c3f68cfc | |||
1849a7c383 | |||
82d14f37c3 | |||
a0261eafa3 | |||
2a27325dfd | |||
a6dee2e8ed | |||
2ff1635696 | |||
1cb6b5e984 | |||
1fe420fd80 | |||
50172e58d8 | |||
d7483d129f | |||
34ed0b3594 | |||
f008a3e20c | |||
9de950220f | |||
567c90b4c6 | |||
ae19236366 | |||
f9babe7089 | |||
78c74cd469 | |||
32abb27e61 | |||
8478b03892 | |||
e972f2b289 | |||
22c4fb1414 | |||
0154def916 | |||
fc69b6851d | |||
44a3c7fa5f | |||
37111fd07b | |||
4e6653e299 | |||
143a575369 | |||
c782585287 | |||
7718b3b3b8 | |||
8ff9e72972 | |||
ef6ef68a39 | |||
48a04744e0 | |||
6446ca8bb2 | |||
b9991465ee | |||
3d8242be06 | |||
344a8817c3 | |||
3afb0d4f6d | |||
c9714893bb | |||
3185a86b22 | |||
a53f7a49ac | |||
ca3bcc565d | |||
432176ea2f | |||
c1dae0b599 | |||
e70d3b6286 | |||
17e6bc921b | |||
46111e7cac | |||
3b7e47dbe2 | |||
fff99f0e3d | |||
2e15b24f0a | |||
088b9592cd | |||
b1e4e32b83 | |||
d91a852eda | |||
171c5b9759 | |||
64290b2a37 | |||
72769b8a0a | |||
1018309413 | |||
6d0ecd228e | |||
40a651e66c | |||
a390bb7b59 | |||
245ec65cbb | |||
17eea4a10c | |||
862fb0f5d2 | |||
ec73b53340 | |||
9110f7fee3 | |||
54cc1fdeef | |||
8f42a7f0b4 | |||
2c221ea819 | |||
93e0441b58 | |||
7f1455cb12 | |||
59fc223a85 | |||
0a6f555c23 | |||
6a4233d6fd | |||
15fa7e9652 | |||
f2acc154cd | |||
d21ec6c9a5 | |||
43dd858cd5 | |||
34cbf5f702 | |||
3c6e94b6a8 | |||
1cd149c815 | |||
4c6f562805 | |||
e59c4ec1c7 | |||
1169db7530 | |||
1453008796 | |||
2209b6d603 | |||
ccbc0384f9 | |||
a48924c896 | |||
dc8d8dd2b6 | |||
afca94ceb8 | |||
0b86231a36 | |||
c0df1f38b8 | |||
2b8fed8f4e | |||
c7322a32a0 | |||
64b75cab84 | |||
f58bc61999 | |||
fb8ccc0283 | |||
c38012f147 | |||
3676ff21c2 | |||
920e705d75 | |||
de0b137b1e | |||
d44ac6e2a3 | |||
71039a4012 | |||
8745ac7932 | |||
7f70048423 | |||
97dbfc8885 | |||
149ea22a93 | |||
404ed5406d | |||
b8656858ec | |||
6b0f0e8993 | |||
aec1ccd88d | |||
bee5c200b6 | |||
9d640efc88 | |||
f0907841dd | |||
2bffc12ef9 | |||
2ff9ec6522 | |||
43a54f5c54 | |||
7bff2734aa | |||
84768c0ec6 | |||
f4499a5459 | |||
b3aede5bba | |||
531ea1c039 | |||
c2c5ff6912 | |||
9cddab8fd5 | |||
06d15d8a27 | |||
b5c711854b | |||
4cf6c36f34 | |||
75a6f6c875 | |||
62abe3f256 | |||
9296c41650 | |||
7fb48fde6d | |||
174472bb45 | |||
17575ed921 | |||
b1b1a27444 | |||
f97a5eeefb | |||
10fd96981e | |||
67e3eb549c | |||
30a6d1f0b1 | |||
3d1fa9f048 | |||
1d2be6e68b | |||
c21e343986 | |||
ff37ed095c | |||
8623a2c3fc | |||
23d277eaf1 | |||
75ced59451 | |||
bccf424c5e | |||
2f9ae40d20 | |||
11e1eec3fb | |||
765c5633df | |||
6344b1aafb | |||
ed25801e6e | |||
4d0148193f | |||
804ae15c2e | |||
b35a9fad86 | |||
a4f83bd28a | |||
796f83c3d0 | |||
2099bbb713 | |||
67beba8f78 | |||
a798412e17 | |||
3b2c2d781f | |||
98c844f3d6 | |||
2645bd0132 | |||
2c4fc56b49 | |||
0ec1468058 | |||
5d1a3043b2 | |||
b46958d1f9 | |||
5daa8d5fe3 | |||
31846f1d05 | |||
1fac964b8b | |||
dfa6ed8ac2 | |||
66fe10299e | |||
e0a3ec033f | |||
7033ec0ab9 | |||
4004579905 | |||
9fe9e48a5c | |||
595a6c7fe6 | |||
11b5860d4a | |||
9bdbff4cda | |||
e0d597eeac | |||
f576985cc9 | |||
22a6aef60b | |||
ec0a6e7854 | |||
6904608e6f | |||
cb3732cb2b | |||
57de6cbafc | |||
b1dda764a9 | |||
5ec2102487 | |||
9f8fb7378a | |||
98cd646044 | |||
0cba1b4c45 | |||
53918462b6 | |||
8a7e74b523 | |||
4dc7065e97 | |||
3c93bb9f9f | |||
8143fae2d6 | |||
3cfe45d3cb | |||
8e5c3f2f31 | |||
5a3b2fdd49 | |||
e47b9f0d57 | |||
146dd747f1 | |||
f2ce56063b | |||
b26f378e4c | |||
9072b836c6 | |||
2fa57d064e | |||
146705c60a | |||
5029a99df6 | |||
e7129d18f6 | |||
d2bf9f81d6 | |||
30acf0660b | |||
dda41af5c8 | |||
9b5b03647b | |||
940b3eb943 | |||
16eb629b71 | |||
755045b226 | |||
61478db94e | |||
f69f959bdb | |||
146edb45d4 | |||
045a802365 | |||
c90d8ddcff | |||
3ff2ec929f | |||
a3ef26b7ad | |||
19cd1624c1 | |||
366ef352c6 | |||
a9031a6abc | |||
a1a5223b58 | |||
c723b0233f | |||
b369eb28f1 | |||
9b8f390e31 | |||
11630c9a74 | |||
c9ac10f6f6 | |||
04d613cb28 | |||
40866f9ecd | |||
d8585eb872 | |||
15aaeda475 | |||
8536ef9e23 | |||
35b6bb6b3f | |||
eaa573c715 | |||
660972e303 | |||
a21012bf0c | |||
8dbafa4bda | |||
80049413f0 | |||
2739442d4a | |||
c679f0a67c | |||
d9a952dd03 | |||
9a1a0f0aa8 | |||
4d6bb60134 | |||
80e6d59382 | |||
81ac951872 | |||
f33e553cfd | |||
9b0240dc26 | |||
c327310392 | |||
457375287c | |||
7e87bfef5b | |||
a7af5268de | |||
6d916029bb | |||
81fdcbadad | |||
ec1e25fe71 | |||
b5306e4a94 | |||
801b8a1e59 | |||
3a52059793 | |||
10b7d99b37 | |||
6be8d0cbb2 | |||
5b8e3689ec | |||
25a5d8f5da | |||
883d439544 | |||
1c3b5889e5 | |||
87012b65e1 | |||
29913773a7 | |||
0bc6a4fed4 | |||
4645d8353f | |||
260c5555fa | |||
6f7b917c38 | |||
1456ee6d3e | |||
ae3d3d0295 | |||
c23ceacd0b | |||
5155204283 | |||
5509ec9b0f | |||
d6f9b2e47d | |||
67aa4aef11 | |||
9e46c8bfec | |||
1eaa9b9733 | |||
ee05834b69 | |||
fccc8f4959 | |||
c721620f96 | |||
c9f73d718e | |||
bfa58be721 | |||
4bb602149e | |||
81ab9092fc | |||
29d5962c4c | |||
5c75339946 | |||
4774d9a46c | |||
dbe16ba4fd | |||
6972cf00a0 | |||
0445be9712 | |||
89dbdd9585 | |||
da88ce7150 | |||
5f50fcfcf5 | |||
96be087221 | |||
a53a269a8c | |||
59565a5286 | |||
ae3c092238 | |||
e98e5e4e3e | |||
d50c7ec8d4 | |||
c0fdf377d1 | |||
70c11c8988 | |||
67b19becc1 | |||
ae64024ef4 | |||
e6571826cb | |||
c621e61978 | |||
3626fa4b98 | |||
01b0eb159a | |||
63aa48d981 | |||
2e0ba05d55 | |||
b2ac57bb67 | |||
4c22e5c2c8 | |||
4a7b0ec8a9 | |||
330118249e | |||
8d4dabde02 | |||
cf7323c41b | |||
edd856df7d | |||
5e35859db6 | |||
acabb2df54 | |||
e6376a05f7 | |||
1f45aff7ad | |||
e1f1f617b6 | |||
2690675dca | |||
7529b51358 | |||
c394066d99 | |||
9c585032ef | |||
d408031304 | |||
c47bc11ec0 | |||
1deb094afe | |||
501fed1922 | |||
ad8125ac1c | |||
b42a551fb2 | |||
3256be23df | |||
f7c0c0146a | |||
e4baf8c21e | |||
364f040b36 | |||
2b8c2b2346 | |||
5f861189e4 | |||
5e11b6687e | |||
c4b429825d | |||
eebbae0677 | |||
42b30f4507 | |||
0e425418df | |||
7fe0300b86 | |||
c012c6be5c | |||
a5dc193cfd | |||
7507ad2620 | |||
f1291fec8d | |||
37aeeea239 | |||
0fa1fc86da | |||
c3034ab9ac | |||
76694e037a | |||
787db41cc3 | |||
74da3df7cd | |||
a6e435bd70 | |||
c313b496aa | |||
a7eaa74191 | |||
11ecdc4fcf | |||
2f7781b67a | |||
296d4f691a | |||
64033031b1 | |||
9daff7608d | |||
0a4af80b9b | |||
a54adb05c4 | |||
43a389e596 | |||
2d7e8f1b50 | |||
cf11f6b121 | |||
6dcdf7bcce | |||
56d872af15 | |||
ca663d16fc | |||
e05c18b19b | |||
a7b86e46bc | |||
84f56674c2 | |||
02ab177c6d | |||
1232c487e9 | |||
ef0a2bfbe8 | |||
05242a11ad | |||
4593ad7bcc | |||
d7fd5a7fa6 | |||
4439378fd4 | |||
acf65eafdd | |||
c2ebff55ef | |||
99c82676b6 | |||
4991e9b825 | |||
612f95c3ba | |||
cd91d5ca15 | |||
cbbbb5dc08 | |||
c1640b9411 | |||
a4842c1f95 | |||
a4707ddc54 | |||
fb82d56307 | |||
1a1005f80d | |||
e86cae6cac | |||
0b282f45e0 | |||
791e88ffc1 | |||
7bd3c4bccf | |||
722e2e4050 | |||
c7fc444c95 | |||
20ad062814 | |||
fcb5d36e07 | |||
9b131b619f | |||
54427f7c68 | |||
35eef9c28d | |||
e88a82553d | |||
01a9520140 | |||
46667615c3 | |||
c6721a83a4 | |||
46866e8ef0 | |||
4a49681127 | |||
4c3fced4e9 | |||
172347d90f | |||
f54520b5cf | |||
d7c4697625 | |||
5584f5bda8 | |||
2ce6f5a714 | |||
c66945623a | |||
cbae05c74c | |||
5b771da972 | |||
2db1738e4a | |||
95de6a14fd | |||
17132ebc19 | |||
289be46388 | |||
6c300b7b31 | |||
b726583084 | |||
48055d1cfd | |||
436070f5bd | |||
3ee79818db | |||
e7a02104db | |||
556740d7bc | |||
421f51770c | |||
96f7e70f9e | |||
ad96f7dbb8 | |||
e7fb48eba2 | |||
b19b5b644d | |||
250b6691d4 | |||
e3b02a6e78 | |||
e94ef34d8f | |||
49e945307a | |||
edfe0e5450 | |||
06b65a7882 | |||
ff9bc8aa70 | |||
28da67abe6 | |||
39d9fe9bf0 | |||
750117b0fd | |||
983462f80d | |||
4ae31d409b | |||
98b414f3e2 | |||
a0d42092e3 | |||
f2569b6424 | |||
9d344d887c |
@ -1,44 +1,36 @@
|
||||
[bumpversion]
|
||||
current_version = 0.0.8-alpha
|
||||
current_version = 2021.3.1-rc2
|
||||
tag = True
|
||||
commit = True
|
||||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\-(?P<release>.*)
|
||||
serialize = {major}.{minor}.{patch}-{release}
|
||||
message = bump version: {current_version} -> {new_version}
|
||||
message = release: {new_version}
|
||||
tag_name = version/{new_version}
|
||||
|
||||
[bumpversion:part:release]
|
||||
optional_value = stable
|
||||
first_value = beta
|
||||
values =
|
||||
alpha
|
||||
beta
|
||||
stable
|
||||
|
||||
[bumpversion:file:helm/passbook/Chart.yaml]
|
||||
[bumpversion:file:website/docs/installation/docker-compose.md]
|
||||
|
||||
[bumpversion:file:.gitlab-ci.yml]
|
||||
[bumpversion:file:website/docs/installation/kubernetes.md]
|
||||
|
||||
[bumpversion:file:passbook/__init__.py]
|
||||
[bumpversion:file:docker-compose.yml]
|
||||
|
||||
[bumpversion:file:passbook/api/__init__.py]
|
||||
[bumpversion:file:helm/values.yaml]
|
||||
|
||||
[bumpversion:file:passbook/core/__init__.py]
|
||||
[bumpversion:file:helm/README.md]
|
||||
|
||||
[bumpversion:file:passbook/admin/__init__.py]
|
||||
[bumpversion:file:helm/Chart.yaml]
|
||||
|
||||
[bumpversion:file:passbook/captcha_factor/__init__.py]
|
||||
[bumpversion:file:.github/workflows/release.yml]
|
||||
|
||||
[bumpversion:file:passbook/oauth_client/__init__.py]
|
||||
[bumpversion:file:authentik/__init__.py]
|
||||
|
||||
[bumpversion:file:passbook/ldap/__init__.py]
|
||||
|
||||
[bumpversion:file:passbook/lib/__init__.py]
|
||||
|
||||
[bumpversion:file:passbook/saml_idp/__init__.py]
|
||||
|
||||
[bumpversion:file:passbook/audit/__init__.py]
|
||||
|
||||
[bumpversion:file:passbook/oauth_provider/__init__.py]
|
||||
|
||||
[bumpversion:file:passbook/otp/__init__.py]
|
||||
[bumpversion:file:outpost/pkg/version.go]
|
||||
|
||||
[bumpversion:file:web/src/constants.ts]
|
||||
|
35
.coveragerc
35
.coveragerc
@ -1,35 +0,0 @@
|
||||
[run]
|
||||
source = passbook
|
||||
omit =
|
||||
env/
|
||||
*/wsgi.py
|
||||
manage.py
|
||||
*/migrations/*
|
||||
*/apps.py
|
||||
passbook/management/commands/nexus_upload.py
|
||||
passbook/management/commands/web.py
|
||||
passbook/management/commands/worker.py
|
||||
docs/
|
||||
|
||||
[report]
|
||||
sort = Cover
|
||||
skip_covered = True
|
||||
precision = 2
|
||||
exclude_lines =
|
||||
pragma: no cover
|
||||
|
||||
# Don't complain about missing debug-only code:
|
||||
def __unicode__
|
||||
def __str__
|
||||
def __repr__
|
||||
if self\.debug
|
||||
|
||||
# Don't complain if tests don't hit defensive assertion code:
|
||||
raise AssertionError
|
||||
raise NotImplementedError
|
||||
|
||||
# Don't complain if non-runnable code isn't run:
|
||||
if 0:
|
||||
if __name__ == .__main__.:
|
||||
|
||||
show_missing = True
|
@ -1,4 +1,6 @@
|
||||
env
|
||||
helm
|
||||
passbook-ui
|
||||
static
|
||||
htmlcov
|
||||
*.env.yml
|
||||
**/node_modules
|
||||
|
@ -9,3 +9,6 @@ insert_final_newline = true
|
||||
|
||||
[html]
|
||||
indent_size = 2
|
||||
|
||||
[yaml]
|
||||
indent_size = 2
|
||||
|
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1 @@
|
||||
github: [BeryJu]
|
34
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
34
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Logs**
|
||||
Output of docker-compose logs or kubectl logs respectively
|
||||
|
||||
**Version and Deployment (please complete the following information):**
|
||||
- authentik version: [e.g. 0.10.0-stable]
|
||||
- Deployment: [e.g. docker-compose, helm]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
50
.github/dependabot.yml
vendored
Normal file
50
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: gomod
|
||||
directory: "/outpost"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "04:00"
|
||||
open-pull-requests-limit: 10
|
||||
assignees:
|
||||
- BeryJu
|
||||
- package-ecosystem: npm
|
||||
directory: "/web"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "04:00"
|
||||
open-pull-requests-limit: 10
|
||||
assignees:
|
||||
- BeryJu
|
||||
- package-ecosystem: npm
|
||||
directory: "/website"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "04:00"
|
||||
open-pull-requests-limit: 10
|
||||
assignees:
|
||||
- BeryJu
|
||||
- package-ecosystem: pip
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "04:00"
|
||||
open-pull-requests-limit: 10
|
||||
assignees:
|
||||
- BeryJu
|
||||
- package-ecosystem: docker
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "04:00"
|
||||
open-pull-requests-limit: 10
|
||||
assignees:
|
||||
- BeryJu
|
||||
- package-ecosystem: docker
|
||||
directory: "/outpost"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "04:00"
|
||||
open-pull-requests-limit: 10
|
||||
assignees:
|
||||
- BeryJu
|
111
.github/workflows/release.yml
vendored
Normal file
111
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
name: authentik-on-release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published, created]
|
||||
|
||||
jobs:
|
||||
# Build
|
||||
build-server:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Docker Login Registry
|
||||
env:
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
||||
- name: Building Docker Image
|
||||
run: docker build
|
||||
--no-cache
|
||||
-t beryju/authentik:2021.3.1-rc2
|
||||
-t beryju/authentik:latest
|
||||
-f Dockerfile .
|
||||
- name: Push Docker Container to Registry (versioned)
|
||||
run: docker push beryju/authentik:2021.3.1-rc2
|
||||
- name: Push Docker Container to Registry (latest)
|
||||
run: docker push beryju/authentik:latest
|
||||
build-proxy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: "^1.15"
|
||||
- name: prepare go api client
|
||||
run: |
|
||||
cd outpost
|
||||
go get -u github.com/go-swagger/go-swagger/cmd/swagger
|
||||
swagger generate client -f ../swagger.yaml -A authentik -t pkg/
|
||||
go build -v .
|
||||
- name: Docker Login Registry
|
||||
env:
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
||||
- name: Building Docker Image
|
||||
run: |
|
||||
cd outpost/
|
||||
docker build \
|
||||
--no-cache \
|
||||
-t beryju/authentik-proxy:2021.3.1-rc2 \
|
||||
-t beryju/authentik-proxy:latest \
|
||||
-f proxy.Dockerfile .
|
||||
- name: Push Docker Container to Registry (versioned)
|
||||
run: docker push beryju/authentik-proxy:2021.3.1-rc2
|
||||
- name: Push Docker Container to Registry (latest)
|
||||
run: docker push beryju/authentik-proxy:latest
|
||||
build-static:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Docker Login Registry
|
||||
env:
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
|
||||
- name: Building Docker Image
|
||||
run: |
|
||||
cd web/
|
||||
docker build \
|
||||
--no-cache \
|
||||
-t beryju/authentik-static:2021.3.1-rc2 \
|
||||
-t beryju/authentik-static:latest \
|
||||
-f Dockerfile .
|
||||
- name: Push Docker Container to Registry (versioned)
|
||||
run: docker push beryju/authentik-static:2021.3.1-rc2
|
||||
- name: Push Docker Container to Registry (latest)
|
||||
run: docker push beryju/authentik-static:latest
|
||||
test-release:
|
||||
needs:
|
||||
- build-server
|
||||
- build-static
|
||||
- build-proxy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Run test suite in final docker images
|
||||
run: |
|
||||
sudo apt-get install -y pwgen
|
||||
echo "PG_PASS=$(pwgen 40 1)" >> .env
|
||||
echo "AUTHENTIK_SECRET_KEY=$(pwgen 50 1)" >> .env
|
||||
docker-compose pull -q
|
||||
docker-compose up --no-start
|
||||
docker-compose start postgresql redis
|
||||
docker-compose run -u root --entrypoint /bin/bash server -c "pip install --no-cache -r requirements-dev.txt && ./manage.py test authentik"
|
||||
sentry-release:
|
||||
needs:
|
||||
- test-release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Create a Sentry.io release
|
||||
uses: tclindner/sentry-releases-action@v1.2.0
|
||||
env:
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_ORG: beryjuorg
|
||||
SENTRY_PROJECT: authentik
|
||||
SENTRY_URL: https://sentry.beryju.org
|
||||
with:
|
||||
tagName: 2021.3.1-rc2
|
||||
environment: beryjuorg-prod
|
63
.github/workflows/tag.yml
vendored
Normal file
63
.github/workflows/tag.yml
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
name: authentik-on-tag
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'version/*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Create Release from Tag
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Pre-release test
|
||||
run: |
|
||||
sudo apt-get install -y pwgen
|
||||
echo "AUTHENTIK_TAG=latest" >> .env
|
||||
echo "PG_PASS=$(pwgen 40 1)" >> .env
|
||||
echo "AUTHENTIK_SECRET_KEY=$(pwgen 50 1)" >> .env
|
||||
docker-compose pull -q
|
||||
docker build \
|
||||
--no-cache \
|
||||
-t beryju/authentik:latest \
|
||||
-f Dockerfile .
|
||||
docker-compose up --no-start
|
||||
docker-compose start postgresql redis
|
||||
docker-compose run -u root --entrypoint /bin/bash server -c "pip install --no-cache -r requirements-dev.txt && ./manage.py test authentik"
|
||||
- name: Install Helm
|
||||
run: |
|
||||
apt update && apt install -y curl
|
||||
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
|
||||
- name: Helm package
|
||||
run: |
|
||||
helm dependency update helm/
|
||||
helm package helm/
|
||||
mv authentik-*.tgz authentik-chart.tgz
|
||||
- name: Extract version number
|
||||
id: get_version
|
||||
uses: actions/github-script@0.2.0
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
return context.payload.ref.replace(/\/refs\/tags\/version\//, '');
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1.0.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ steps.get_version.outputs.result }}
|
||||
draft: true
|
||||
prerelease: false
|
||||
- name: Upload packaged Helm Chart
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./authentik-chart.tgz
|
||||
asset_name: authentik-chart.tgz
|
||||
asset_content_type: application/gzip
|
15
.gitignore
vendored
15
.gitignore
vendored
@ -27,12 +27,12 @@ media
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib64/
|
||||
parts/
|
||||
dist/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
@ -63,6 +63,7 @@ coverage.xml
|
||||
*.cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
unittest.xml
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
@ -184,10 +185,20 @@ dmypy.json
|
||||
[Ii]nclude
|
||||
[Ll]ib64
|
||||
[Ll]ocal
|
||||
[Ss]cripts
|
||||
pyvenv.cfg
|
||||
pip-selfcheck.json
|
||||
|
||||
# End of https://www.gitignore.io/api/python,django
|
||||
/static/
|
||||
local.env.yml
|
||||
.vscode/
|
||||
|
||||
### Helm ###
|
||||
# Chart dependencies
|
||||
**/charts/*.tgz
|
||||
|
||||
# Selenium Screenshots
|
||||
selenium_screenshots/
|
||||
backups/
|
||||
media/
|
||||
*mmdb
|
||||
|
140
.gitlab-ci.yml
140
.gitlab-ci.yml
@ -1,140 +0,0 @@
|
||||
# Global Variables
|
||||
before_script:
|
||||
- "python3 -m pip install -U virtualenv"
|
||||
- "virtualenv env"
|
||||
- "source env/bin/activate"
|
||||
- "pip3 install -U -r requirements-dev.txt"
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
- docs
|
||||
image: python:3.6
|
||||
services:
|
||||
- postgres:latest
|
||||
|
||||
variables:
|
||||
POSTGRES_DB: passbook
|
||||
POSTGRES_USER: passbook
|
||||
POSTGRES_PASSWORD: 'EK-5jnKfjrGRm<77'
|
||||
SUPERVISR_ENV: ci
|
||||
|
||||
include:
|
||||
- /allauth/.gitlab-ci.yml
|
||||
|
||||
isort:
|
||||
script:
|
||||
- isort -c -sg env
|
||||
stage: test
|
||||
migrations:
|
||||
script:
|
||||
- python manage.py migrate
|
||||
stage: test
|
||||
prospector:
|
||||
script:
|
||||
- prospector
|
||||
stage: test
|
||||
pylint:
|
||||
script:
|
||||
- pylint passbook
|
||||
stage: test
|
||||
coverage:
|
||||
script:
|
||||
- coverage run manage.py test
|
||||
- coverage report
|
||||
stage: test
|
||||
bandit:
|
||||
script:
|
||||
- bandit -r passbook
|
||||
stage: test
|
||||
|
||||
package-docker:
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:debug
|
||||
entrypoint: [""]
|
||||
before_script:
|
||||
- echo "{\"auths\":{\"https://docker.$NEXUS_URL/\":{\"username\":\"$NEXUS_USER\",\"password\":\"$NEXUS_PASS\"}}}" > /kaniko/.docker/config.json
|
||||
script:
|
||||
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination docker.pkg.beryju.org/passbook:latest --destination docker.pkg.beryju.org/passbook:0.0.8-alpha
|
||||
stage: build
|
||||
only:
|
||||
- tags
|
||||
- /^version/.*$/
|
||||
package-helm:
|
||||
stage: build
|
||||
script:
|
||||
- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash
|
||||
- helm init --client-only
|
||||
- helm package helm/passbook
|
||||
- ./manage.py nexus_upload --method put --url $NEXUS_URL --user $NEXUS_USER --password $NEXUS_PASS --repo helm *.tgz
|
||||
only:
|
||||
- tags
|
||||
- /^version/.*$/
|
||||
# package-3.5:
|
||||
# before_script:
|
||||
# - apt update
|
||||
# - apt install -y build-essential debhelper devscripts equivs python3 python3-pip
|
||||
# - cp debian/control-3.5 debian/control
|
||||
# - mk-build-deps debian/control
|
||||
# - apt install ./*build-deps*deb -f -y
|
||||
# - "python3 -m pip install -U virtualenv"
|
||||
# - "virtualenv env"
|
||||
# - "source env/bin/activate"
|
||||
# - "pip3 install -U -r requirements.txt -r requirements-dev.txt"
|
||||
# image: debian
|
||||
# script:
|
||||
# - debuild -us -uc
|
||||
# - cp ../passbook*.deb .
|
||||
# - python manage.py nexus_upload
|
||||
# artifacts:
|
||||
# paths:
|
||||
# - passbook-python3.5*deb
|
||||
# expire_in: 2 days
|
||||
# stage: build
|
||||
# only:
|
||||
# - tags
|
||||
# - /^debian/.*$/
|
||||
# package-3.6:
|
||||
# before_script:
|
||||
# - apt update
|
||||
# - apt install -y build-essential debhelper devscripts equivs python3 python3-pip
|
||||
# - cp debian/control-3.6 debian/control
|
||||
# - mk-build-deps debian/control
|
||||
# - apt install ./*build-deps*deb -f -y
|
||||
# - "python3 -m pip install -U virtualenv"
|
||||
# - "virtualenv env"
|
||||
# - "source env/bin/activate"
|
||||
# - "pip3 install -U -r requirements.txt -r requirements-dev.txt"
|
||||
# image: debian:buster
|
||||
# script:
|
||||
# - debuild -us -uc
|
||||
# - cp ../passbook*.deb .
|
||||
# - python manage.py nexus_upload
|
||||
# artifacts:
|
||||
# paths:
|
||||
# - passbook-python3.6*deb
|
||||
# expire_in: 2 days
|
||||
# stage: build
|
||||
# only:
|
||||
# - tags
|
||||
# - /^debian/.*$r
|
||||
|
||||
# docs:
|
||||
# stage: docs
|
||||
# only:
|
||||
# - master
|
||||
# - tags
|
||||
# - /^debian/.*$/
|
||||
# environment:
|
||||
# name: docs
|
||||
# url: "https://passbook.beryju.org/docs/"
|
||||
# script:
|
||||
# - apt update
|
||||
# - apt install -y rsync
|
||||
# - "mkdir ~/.ssh"
|
||||
# - "cp .gitlab/known_hosts ~/.ssh/"
|
||||
# - "pip3 install -U -r requirements-docs.txt"
|
||||
# - "eval $(ssh-agent -s)"
|
||||
# - "echo \"${CI_SSH_PRIVATE}\" | ssh-add -"
|
||||
# - mkdocs build
|
||||
# - 'rsync -avh --delete web/* "beryjuorg@ory1-web-prod-1.ory1.beryju.org:passbook.beryju.org/"'
|
||||
# - 'rsync -avh --delete site/* "beryjuorg@ory1-web-prod-1.ory1.beryju.org:passbook.beryju.org/docs/"'
|
@ -3,10 +3,10 @@ test-warnings: true
|
||||
doc-warnings: false
|
||||
|
||||
ignore-paths:
|
||||
- env
|
||||
- migrations
|
||||
- docs
|
||||
- node_modules
|
||||
|
||||
uses:
|
||||
- django
|
||||
- django
|
||||
- celery
|
||||
|
31
.pylintrc
31
.pylintrc
@ -1,12 +1,29 @@
|
||||
[MASTER]
|
||||
|
||||
disable=redefined-outer-name,arguments-differ,no-self-use,cyclic-import,fixme,locally-disabled,unpacking-non-sequence,too-many-ancestors,too-many-branches,too-few-public-methods
|
||||
disable =
|
||||
arguments-differ,
|
||||
no-self-use,
|
||||
fixme,
|
||||
locally-disabled,
|
||||
too-many-ancestors,
|
||||
too-few-public-methods,
|
||||
import-outside-toplevel,
|
||||
bad-continuation,
|
||||
signature-differs,
|
||||
similarities,
|
||||
cyclic-import,
|
||||
protected-access,
|
||||
unsubscriptable-object # remove when pylint is upgraded to 2.6
|
||||
|
||||
load-plugins=pylint_django,pylint.extensions.bad_builtin
|
||||
#,pylint.extensions.docparams
|
||||
extension-pkg-whitelist=lxml
|
||||
|
||||
extension-pkg-whitelist=lxml,xmlsec
|
||||
|
||||
# Allow constants to be shorter than normal (and lowercase, for settings.py)
|
||||
const-rgx=[a-zA-Z0-9_]{1,40}$
|
||||
|
||||
[SIMILARITIES]
|
||||
|
||||
# Minimum lines number of a similarity.
|
||||
min-similarity-lines=20
|
||||
ignored-modules=django-otp
|
||||
generated-members=xmlsec.constants.*,xmlsec.tree.*,xmlsec.template.*
|
||||
ignore=migrations
|
||||
max-attributes=12
|
||||
max-branches=20
|
||||
|
114
.vscode/.ropeproject/config.py
vendored
114
.vscode/.ropeproject/config.py
vendored
@ -1,114 +0,0 @@
|
||||
# The default ``config.py``
|
||||
# flake8: noqa
|
||||
|
||||
|
||||
def set_prefs(prefs):
|
||||
"""This function is called before opening the project"""
|
||||
|
||||
# Specify which files and folders to ignore in the project.
|
||||
# Changes to ignored resources are not added to the history and
|
||||
# VCSs. Also they are not returned in `Project.get_files()`.
|
||||
# Note that ``?`` and ``*`` match all characters but slashes.
|
||||
# '*.pyc': matches 'test.pyc' and 'pkg/test.pyc'
|
||||
# 'mod*.pyc': matches 'test/mod1.pyc' but not 'mod/1.pyc'
|
||||
# '.svn': matches 'pkg/.svn' and all of its children
|
||||
# 'build/*.o': matches 'build/lib.o' but not 'build/sub/lib.o'
|
||||
# 'build//*.o': matches 'build/lib.o' and 'build/sub/lib.o'
|
||||
prefs['ignored_resources'] = ['*.pyc', '*~', '.ropeproject',
|
||||
'.hg', '.svn', '_svn', '.git', '.tox']
|
||||
|
||||
# Specifies which files should be considered python files. It is
|
||||
# useful when you have scripts inside your project. Only files
|
||||
# ending with ``.py`` are considered to be python files by
|
||||
# default.
|
||||
# prefs['python_files'] = ['*.py']
|
||||
|
||||
# Custom source folders: By default rope searches the project
|
||||
# for finding source folders (folders that should be searched
|
||||
# for finding modules). You can add paths to that list. Note
|
||||
# that rope guesses project source folders correctly most of the
|
||||
# time; use this if you have any problems.
|
||||
# The folders should be relative to project root and use '/' for
|
||||
# separating folders regardless of the platform rope is running on.
|
||||
# 'src/my_source_folder' for instance.
|
||||
# prefs.add('source_folders', 'src')
|
||||
|
||||
# You can extend python path for looking up modules
|
||||
# prefs.add('python_path', '~/python/')
|
||||
|
||||
# Should rope save object information or not.
|
||||
prefs['save_objectdb'] = True
|
||||
prefs['compress_objectdb'] = False
|
||||
|
||||
# If `True`, rope analyzes each module when it is being saved.
|
||||
prefs['automatic_soa'] = True
|
||||
# The depth of calls to follow in static object analysis
|
||||
prefs['soa_followed_calls'] = 0
|
||||
|
||||
# If `False` when running modules or unit tests "dynamic object
|
||||
# analysis" is turned off. This makes them much faster.
|
||||
prefs['perform_doa'] = True
|
||||
|
||||
# Rope can check the validity of its object DB when running.
|
||||
prefs['validate_objectdb'] = True
|
||||
|
||||
# How many undos to hold?
|
||||
prefs['max_history_items'] = 32
|
||||
|
||||
# Shows whether to save history across sessions.
|
||||
prefs['save_history'] = True
|
||||
prefs['compress_history'] = False
|
||||
|
||||
# Set the number spaces used for indenting. According to
|
||||
# :PEP:`8`, it is best to use 4 spaces. Since most of rope's
|
||||
# unit-tests use 4 spaces it is more reliable, too.
|
||||
prefs['indent_size'] = 4
|
||||
|
||||
# Builtin and c-extension modules that are allowed to be imported
|
||||
# and inspected by rope.
|
||||
prefs['extension_modules'] = []
|
||||
|
||||
# Add all standard c-extensions to extension_modules list.
|
||||
prefs['import_dynload_stdmods'] = True
|
||||
|
||||
# If `True` modules with syntax errors are considered to be empty.
|
||||
# The default value is `False`; When `False` syntax errors raise
|
||||
# `rope.base.exceptions.ModuleSyntaxError` exception.
|
||||
prefs['ignore_syntax_errors'] = False
|
||||
|
||||
# If `True`, rope ignores unresolvable imports. Otherwise, they
|
||||
# appear in the importing namespace.
|
||||
prefs['ignore_bad_imports'] = False
|
||||
|
||||
# If `True`, rope will insert new module imports as
|
||||
# `from <package> import <module>` by default.
|
||||
prefs['prefer_module_from_imports'] = False
|
||||
|
||||
# If `True`, rope will transform a comma list of imports into
|
||||
# multiple separate import statements when organizing
|
||||
# imports.
|
||||
prefs['split_imports'] = False
|
||||
|
||||
# If `True`, rope will remove all top-level import statements and
|
||||
# reinsert them at the top of the module when making changes.
|
||||
prefs['pull_imports_to_top'] = True
|
||||
|
||||
# If `True`, rope will sort imports alphabetically by module name instead
|
||||
# of alphabetically by import statement, with from imports after normal
|
||||
# imports.
|
||||
prefs['sort_imports_alphabetically'] = False
|
||||
|
||||
# Location of implementation of
|
||||
# rope.base.oi.type_hinting.interfaces.ITypeHintingFactory In general
|
||||
# case, you don't have to change this value, unless you're an rope expert.
|
||||
# Change this value to inject you own implementations of interfaces
|
||||
# listed in module rope.base.oi.type_hinting.providers.interfaces
|
||||
# For example, you can add you own providers for Django Models, or disable
|
||||
# the search type-hinting in a class hierarchy, etc.
|
||||
prefs['type_hinting_factory'] = (
|
||||
'rope.base.oi.type_hinting.factory.default_type_hinting_factory')
|
||||
|
||||
|
||||
def project_opened(project):
|
||||
"""This function is called after opening the project"""
|
||||
# Do whatever you like here!
|
BIN
.vscode/.ropeproject/objectdb
vendored
BIN
.vscode/.ropeproject/objectdb
vendored
Binary file not shown.
11
.vscode/settings.json
vendored
11
.vscode/settings.json
vendored
@ -1,11 +0,0 @@
|
||||
{
|
||||
"python.pythonPath": "env/bin/python",
|
||||
"editor.tabSize": 4,
|
||||
"[html]": {
|
||||
"editor.tabSize": 2
|
||||
},
|
||||
"cSpell.words": [
|
||||
"SAML",
|
||||
"passbook"
|
||||
]
|
||||
}
|
58
Dockerfile
58
Dockerfile
@ -1,28 +1,48 @@
|
||||
FROM python:3.6-slim-stretch as build
|
||||
FROM python:3.9-slim-buster as locker
|
||||
|
||||
COPY ./passbook/ /app/passbook
|
||||
COPY ./manage.py /app/
|
||||
COPY ./requirements.txt /app/
|
||||
COPY ./Pipfile /app/
|
||||
COPY ./Pipfile.lock /app/
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
RUN mkdir /app/static/ && \
|
||||
pip install -r requirements.txt && \
|
||||
pip install psycopg2 && \
|
||||
./manage.py collectstatic --no-input
|
||||
RUN pip install pipenv && \
|
||||
pipenv lock -r > requirements.txt && \
|
||||
pipenv lock -rd > requirements-dev.txt
|
||||
|
||||
FROM python:3.6-slim-stretch
|
||||
FROM python:3.9-slim-buster
|
||||
|
||||
COPY ./passbook/ /app/passbook
|
||||
COPY ./manage.py /app/
|
||||
COPY ./requirements.txt /app/
|
||||
COPY --from=build /app/static /app/static/
|
||||
WORKDIR /
|
||||
COPY --from=locker /app/requirements.txt /
|
||||
COPY --from=locker /app/requirements-dev.txt /
|
||||
|
||||
WORKDIR /app/
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends curl ca-certificates gnupg && \
|
||||
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
|
||||
echo "deb http://apt.postgresql.org/pub/repos/apt buster-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends postgresql-client-12 postgresql-client-11 build-essential libxmlsec1-dev pkg-config libmaxminddb0 && \
|
||||
apt-get clean && \
|
||||
pip install -r /requirements.txt --no-cache-dir && \
|
||||
apt-get remove --purge -y build-essential && \
|
||||
apt-get autoremove --purge -y && \
|
||||
# This is quite hacky, but docker has no guaranteed Group ID
|
||||
# we could instead check for the GID of the socket and add the user dynamically,
|
||||
# but then we have to drop permmissions later
|
||||
groupadd -g 998 docker_998 && \
|
||||
groupadd -g 999 docker_999 && \
|
||||
adduser --system --no-create-home --uid 1000 --group --home /authentik authentik && \
|
||||
usermod -a -G docker_998 authentik && \
|
||||
usermod -a -G docker_999 authentik && \
|
||||
mkdir /backups && \
|
||||
chown authentik:authentik /backups
|
||||
|
||||
RUN pip install -r requirements.txt && \
|
||||
pip install psycopg2 && \
|
||||
adduser --system --home /app/ passbook && \
|
||||
chown -R passbook /app/
|
||||
COPY ./authentik/ /authentik
|
||||
COPY ./pytest.ini /
|
||||
COPY ./xml /xml
|
||||
COPY ./manage.py /
|
||||
COPY ./lifecycle/ /lifecycle
|
||||
|
||||
USER passbook
|
||||
USER authentik
|
||||
STOPSIGNAL SIGINT
|
||||
ENV TMPDIR /dev/shm/
|
||||
ENTRYPOINT [ "/lifecycle/bootstrap.sh" ]
|
||||
|
687
LICENSE
687
LICENSE
@ -1,21 +1,674 @@
|
||||
MIT License
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (c) 2018 BeryJu.org
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Preamble
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
|
38
Makefile
Normal file
38
Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
all: lint-fix lint coverage gen
|
||||
|
||||
test-integration:
|
||||
k3d cluster create || exit 0
|
||||
k3d kubeconfig write -o ~/.kube/config --overwrite
|
||||
coverage run manage.py test -v 3 tests/integration
|
||||
|
||||
test-e2e:
|
||||
coverage run manage.py test -v 3 tests/e2e
|
||||
|
||||
coverage:
|
||||
coverage run manage.py test -v 3 authentik
|
||||
coverage html
|
||||
coverage report
|
||||
|
||||
lint-fix:
|
||||
isort -rc authentik tests lifecycle
|
||||
black authentik tests lifecycle
|
||||
|
||||
lint:
|
||||
pyright authentik tests lifecycle
|
||||
bandit -r authentik tests lifecycle -x node_modules
|
||||
pylint authentik tests lifecycle
|
||||
prospector
|
||||
|
||||
gen: coverage
|
||||
./manage.py generate_swagger -o swagger.yaml -f yaml
|
||||
|
||||
local-stack:
|
||||
export AUTHENTIK_TAG=testing
|
||||
docker build -t beryju/authentik:testng .
|
||||
docker-compose up -d
|
||||
docker-compose run --rm server migrate
|
||||
|
||||
build-static:
|
||||
docker-compose -f scripts/ci.docker-compose.yml up -d
|
||||
docker build -t beryju/authentik-static -f static.Dockerfile --network=scripts_default .
|
||||
docker-compose -f scripts/ci.docker-compose.yml down -v
|
64
Pipfile
Normal file
64
Pipfile
Normal file
@ -0,0 +1,64 @@
|
||||
[[source]]
|
||||
name = "pypi"
|
||||
url = "https://pypi.org/simple"
|
||||
verify_ssl = true
|
||||
|
||||
[packages]
|
||||
boto3 = "*"
|
||||
celery = "*"
|
||||
channels = "*"
|
||||
channels-redis = "*"
|
||||
dacite = "*"
|
||||
defusedxml = "*"
|
||||
django = "*"
|
||||
django-cors-middleware = "*"
|
||||
django-dbbackup = "*"
|
||||
django-filter = "*"
|
||||
django-guardian = "*"
|
||||
django-model-utils = "*"
|
||||
django-otp = "*"
|
||||
django-prometheus = "*"
|
||||
django-redis = "*"
|
||||
django-storages = "*"
|
||||
djangorestframework = "*"
|
||||
djangorestframework-guardian = "*"
|
||||
docker = "*"
|
||||
drf_yasg2 = "*"
|
||||
facebook-sdk = "*"
|
||||
geoip2 = "*"
|
||||
gunicorn = "*"
|
||||
kubernetes = "*"
|
||||
ldap3 = "*"
|
||||
lxml = "*"
|
||||
packaging = "*"
|
||||
psycopg2-binary = "*"
|
||||
pycryptodome = "*"
|
||||
pyjwkest = "*"
|
||||
pyyaml = "*"
|
||||
requests-oauthlib = "*"
|
||||
sentry-sdk = "*"
|
||||
service_identity = "*"
|
||||
structlog = "*"
|
||||
swagger-spec-validator = "*"
|
||||
urllib3 = {extras = ["secure"],version = "*"}
|
||||
uvicorn = {extras = ["standard"],version = "*"}
|
||||
webauthn = "*"
|
||||
xmlsec = "*"
|
||||
twisted = "==20.3.0"
|
||||
|
||||
[requires]
|
||||
python_version = "3.9"
|
||||
|
||||
[dev-packages]
|
||||
autopep8 = "*"
|
||||
bandit = "*"
|
||||
black = "==20.8b1"
|
||||
bumpversion = "*"
|
||||
colorama = "*"
|
||||
coverage = "*"
|
||||
pylint = "<=2.6.0"
|
||||
pylint-django = "*"
|
||||
selenium = "*"
|
||||
prospector = "*"
|
||||
pytest = "*"
|
||||
pytest-django = "*"
|
1943
Pipfile.lock
generated
Normal file
1943
Pipfile.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
38
README.md
Normal file
38
README.md
Normal file
@ -0,0 +1,38 @@
|
||||
<p align="center">
|
||||
<img src="https://goauthentik.io/img/icon_top_brand_colour.svg" height="150" alt="authentik logo">
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
[](https://discord.gg/KPnmtNWy)
|
||||
[](https://dev.azure.com/beryjuorg/authentik/_build?definitionId=1)
|
||||
[](https://dev.azure.com/beryjuorg/authentik/_build?definitionId=1)
|
||||
[](https://codecov.io/gh/BeryJu/authentik)
|
||||

|
||||

|
||||

|
||||
|
||||
## What is authentik?
|
||||
|
||||
authentik is an open-source Identity Provider focused on flexibility and versatility. You can use authentik in an existing environment to add support for new protocols. authentik is also a great solution for implementing signup/recovery/etc in your application, so you don't have to deal with it.
|
||||
|
||||
## Installation
|
||||
|
||||
For small/test setups it is recommended to use docker-compose, see the [documentation](https://goauthentik.io/docs/installation/docker-compose/)
|
||||
|
||||
For bigger setups, there is a Helm Chart in the `helm/` directory. This is documented [here](https://goauthentik.io/docs/installation/kubernetes/)
|
||||
|
||||
## Screenshots
|
||||
|
||||
Light | Dark
|
||||
--- | ---
|
||||
 | 
|
||||
 | 
|
||||
|
||||
## Development
|
||||
|
||||
See [Development Documentation](https://goauthentik.io/docs/development/local-dev-environment)
|
||||
|
||||
## Security
|
||||
|
||||
See [SECURITY.md](SECURITY.md)
|
13
SECURITY.md
Normal file
13
SECURITY.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
| Version | Supported |
|
||||
| ---------- | ------------------ |
|
||||
| 2021.1.x | :white_check_mark: |
|
||||
| 2021.2.x | :white_check_mark: |
|
||||
| 2021.3.x | :white_check_mark: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
To report a vulnerability, send an email to [security@beryju.org](mailto:security@beryju.org)
|
@ -1,27 +0,0 @@
|
||||
# Global Variables
|
||||
before_script:
|
||||
- cd allauth/
|
||||
- "python3 -m pip install -U virtualenv"
|
||||
- "virtualenv env"
|
||||
- "source env/bin/activate"
|
||||
- "pip3 install -U -r requirements-dev.txt"
|
||||
stages:
|
||||
- test-allauth
|
||||
image: python:3.6
|
||||
|
||||
isort:
|
||||
script:
|
||||
- isort -c -sg env
|
||||
stage: test-allauth
|
||||
prospector:
|
||||
script:
|
||||
- prospector
|
||||
stage: test-allauth
|
||||
pylint:
|
||||
script:
|
||||
- pylint passbook
|
||||
stage: test-allauth
|
||||
bandit:
|
||||
script:
|
||||
- bandit -r allauth_passbook
|
||||
stage: test-allauth
|
@ -1,35 +0,0 @@
|
||||
"""passbook provider"""
|
||||
from allauth.socialaccount.providers.base import ProviderAccount
|
||||
from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider
|
||||
|
||||
|
||||
class PassbookAccount(ProviderAccount):
|
||||
"""passbook account"""
|
||||
|
||||
def to_str(self):
|
||||
dflt = super().to_str()
|
||||
return self.account.extra_data.get('username', dflt)
|
||||
|
||||
|
||||
class PassbookProvider(OAuth2Provider):
|
||||
"""passbook provider"""
|
||||
|
||||
id = 'passbook'
|
||||
name = 'passbook'
|
||||
account_class = PassbookAccount
|
||||
|
||||
def extract_uid(self, data):
|
||||
return str(data['sub'])
|
||||
|
||||
def extract_common_fields(self, data):
|
||||
return {
|
||||
'email': data.get('email'),
|
||||
'username': data.get('preferred_username'),
|
||||
'name': data.get('name'),
|
||||
}
|
||||
|
||||
def get_default_scope(self):
|
||||
return ['openid:userinfo']
|
||||
|
||||
|
||||
provider_classes = [PassbookProvider] # noqa
|
@ -1,5 +0,0 @@
|
||||
"""passbook provider"""
|
||||
from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns
|
||||
from allauth_passbook.provider import PassbookProvider
|
||||
|
||||
urlpatterns = default_urlpatterns(PassbookProvider)
|
@ -1,37 +0,0 @@
|
||||
"""passbook adapter"""
|
||||
import requests
|
||||
|
||||
from allauth.socialaccount import app_settings
|
||||
from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter,
|
||||
OAuth2CallbackView,
|
||||
OAuth2LoginView)
|
||||
from allauth_passbook.provider import PassbookProvider
|
||||
|
||||
|
||||
class PassbookOAuth2Adapter(OAuth2Adapter):
|
||||
"""passbook OAuth2 Adapter"""
|
||||
provider_id = PassbookProvider.id
|
||||
# pylint: disable=no-member
|
||||
settings = app_settings.PROVIDERS.get(provider_id, {}) # noqa
|
||||
provider_base_url = settings.get("PASSBOOK_URL", 'https://id.beryju.org')
|
||||
|
||||
access_token_url = '{0}/application/oauth/token/'.format(provider_base_url)
|
||||
authorize_url = '{0}/application/oauth/authorize/'.format(provider_base_url)
|
||||
profile_url = '{0}/api/v1/openid/'.format(
|
||||
provider_base_url)
|
||||
|
||||
def complete_login(self, request, app, access_token, **kwargs):
|
||||
headers = {
|
||||
'Authorization': 'Bearer {0}'.format(access_token.token),
|
||||
'Content-Type': 'application/json',
|
||||
}
|
||||
extra_data = requests.get(self.profile_url, headers=headers)
|
||||
|
||||
return self.get_provider().sociallogin_from_response(
|
||||
request,
|
||||
extra_data.json()
|
||||
)
|
||||
|
||||
|
||||
oauth2_login = OAuth2LoginView.adapter_view(PassbookOAuth2Adapter) # noqa
|
||||
oauth2_callback = OAuth2CallbackView.adapter_view(PassbookOAuth2Adapter) # noqa
|
@ -1 +0,0 @@
|
||||
django-allauth
|
@ -1,33 +0,0 @@
|
||||
"""passbook allauth setup.py"""
|
||||
from setuptools import setup
|
||||
|
||||
setup(
|
||||
name='django-allauth-passbook',
|
||||
version='1.0.0',
|
||||
description='passbook support for django-allauth',
|
||||
# long_description='\n'.join(read_simple('docs/index.md')[2:]),
|
||||
long_description_content_type='text/markdown',
|
||||
author='BeryJu.org',
|
||||
author_email='hello@beryju.org',
|
||||
packages=['allauth_passbook'],
|
||||
include_package_data=True,
|
||||
install_requires=['django-allauth'],
|
||||
keywords='django allauth passbook',
|
||||
license='MIT',
|
||||
classifiers=[
|
||||
'Intended Audience :: Developers',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||
'Environment :: Web Environment',
|
||||
'Topic :: Internet',
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Operating System :: OS Independent',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Framework :: Django',
|
||||
'Framework :: Django :: 1.11',
|
||||
'Framework :: Django :: 2.0',
|
||||
'Framework :: Django :: 2.1',
|
||||
],
|
||||
)
|
2
authentik/__init__.py
Normal file
2
authentik/__init__.py
Normal file
@ -0,0 +1,2 @@
|
||||
"""authentik"""
|
||||
__version__ = "2021.3.1-rc2"
|
77
authentik/admin/api/metrics.py
Normal file
77
authentik/admin/api/metrics.py
Normal file
@ -0,0 +1,77 @@
|
||||
"""authentik administration metrics"""
|
||||
import time
|
||||
from collections import Counter
|
||||
from datetime import timedelta
|
||||
|
||||
from django.db.models import Count, ExpressionWrapper, F, Model
|
||||
from django.db.models.fields import DurationField
|
||||
from django.db.models.functions import ExtractHour
|
||||
from django.utils.timezone import now
|
||||
from drf_yasg2.utils import swagger_auto_schema
|
||||
from rest_framework.fields import SerializerMethodField
|
||||
from rest_framework.permissions import IsAdminUser
|
||||
from rest_framework.request import Request
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.serializers import Serializer
|
||||
from rest_framework.viewsets import ViewSet
|
||||
|
||||
from authentik.events.models import Event, EventAction
|
||||
|
||||
|
||||
def get_events_per_1h(**filter_kwargs) -> list[dict[str, int]]:
|
||||
"""Get event count by hour in the last day, fill with zeros"""
|
||||
date_from = now() - timedelta(days=1)
|
||||
result = (
|
||||
Event.objects.filter(created__gte=date_from, **filter_kwargs)
|
||||
.annotate(
|
||||
age=ExpressionWrapper(now() - F("created"), output_field=DurationField())
|
||||
)
|
||||
.annotate(age_hours=ExtractHour("age"))
|
||||
.values("age_hours")
|
||||
.annotate(count=Count("pk"))
|
||||
.order_by("age_hours")
|
||||
)
|
||||
data = Counter({int(d["age_hours"]): d["count"] for d in result})
|
||||
results = []
|
||||
_now = now()
|
||||
for hour in range(0, -24, -1):
|
||||
results.append(
|
||||
{
|
||||
"x": time.mktime((_now + timedelta(hours=hour)).timetuple()) * 1000,
|
||||
"y": data[hour * -1],
|
||||
}
|
||||
)
|
||||
return results
|
||||
|
||||
|
||||
class AdministrationMetricsSerializer(Serializer):
|
||||
"""Login Metrics per 1h"""
|
||||
|
||||
logins_per_1h = SerializerMethodField()
|
||||
logins_failed_per_1h = SerializerMethodField()
|
||||
|
||||
def get_logins_per_1h(self, _):
|
||||
"""Get successful logins per hour for the last 24 hours"""
|
||||
return get_events_per_1h(action=EventAction.LOGIN)
|
||||
|
||||
def get_logins_failed_per_1h(self, _):
|
||||
"""Get failed logins per hour for the last 24 hours"""
|
||||
return get_events_per_1h(action=EventAction.LOGIN_FAILED)
|
||||
|
||||
def create(self, validated_data: dict) -> Model:
|
||||
raise NotImplementedError
|
||||
|
||||
def update(self, instance: Model, validated_data: dict) -> Model:
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class AdministrationMetricsViewSet(ViewSet):
|
||||
"""Login Metrics per 1h"""
|
||||
|
||||
permission_classes = [IsAdminUser]
|
||||
|
||||
@swagger_auto_schema(responses={200: AdministrationMetricsSerializer(many=True)})
|
||||
def list(self, request: Request) -> Response:
|
||||
"""Login Metrics per 1h"""
|
||||
serializer = AdministrationMetricsSerializer(True)
|
||||
return Response(serializer.data)
|
73
authentik/admin/api/tasks.py
Normal file
73
authentik/admin/api/tasks.py
Normal file
@ -0,0 +1,73 @@
|
||||
"""Tasks API"""
|
||||
from importlib import import_module
|
||||
|
||||
from django.contrib import messages
|
||||
from django.db.models import Model
|
||||
from django.http.response import Http404
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from drf_yasg2.utils import swagger_auto_schema
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework.fields import CharField, DateTimeField, IntegerField, ListField
|
||||
from rest_framework.permissions import IsAdminUser
|
||||
from rest_framework.request import Request
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.serializers import Serializer
|
||||
from rest_framework.viewsets import ViewSet
|
||||
|
||||
from authentik.events.monitored_tasks import TaskInfo
|
||||
|
||||
|
||||
class TaskSerializer(Serializer):
|
||||
"""Serialize TaskInfo and TaskResult"""
|
||||
|
||||
task_name = CharField()
|
||||
task_description = CharField()
|
||||
task_finish_timestamp = DateTimeField(source="finish_timestamp")
|
||||
|
||||
status = IntegerField(source="result.status.value")
|
||||
messages = ListField(source="result.messages")
|
||||
|
||||
def create(self, validated_data: dict) -> Model:
|
||||
raise NotImplementedError
|
||||
|
||||
def update(self, instance: Model, validated_data: dict) -> Model:
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class TaskViewSet(ViewSet):
|
||||
"""Read-only view set that returns all background tasks"""
|
||||
|
||||
permission_classes = [IsAdminUser]
|
||||
|
||||
@swagger_auto_schema(responses={200: TaskSerializer(many=True)})
|
||||
def list(self, request: Request) -> Response:
|
||||
"""List current messages and pass into Serializer"""
|
||||
return Response(TaskSerializer(TaskInfo.all().values(), many=True).data)
|
||||
|
||||
@action(detail=True, methods=["post"])
|
||||
# pylint: disable=invalid-name
|
||||
def retry(self, request: Request, pk=None) -> Response:
|
||||
"""Retry task"""
|
||||
task = TaskInfo.by_name(pk)
|
||||
if not task:
|
||||
raise Http404
|
||||
try:
|
||||
task_module = import_module(task.task_call_module)
|
||||
task_func = getattr(task_module, task.task_call_func)
|
||||
task_func.delay(*task.task_call_args, **task.task_call_kwargs)
|
||||
messages.success(
|
||||
self.request,
|
||||
_(
|
||||
"Successfully re-scheduled Task %(name)s!"
|
||||
% {"name": task.task_name}
|
||||
),
|
||||
)
|
||||
return Response(
|
||||
{
|
||||
"successful": True,
|
||||
}
|
||||
)
|
||||
except ImportError: # pragma: no cover
|
||||
# if we get an import error, the module path has probably changed
|
||||
task.delete()
|
||||
return Response({"successful": False})
|
61
authentik/admin/api/version.py
Normal file
61
authentik/admin/api/version.py
Normal file
@ -0,0 +1,61 @@
|
||||
"""authentik administration overview"""
|
||||
from django.core.cache import cache
|
||||
from django.db.models import Model
|
||||
from drf_yasg2.utils import swagger_auto_schema
|
||||
from packaging.version import parse
|
||||
from rest_framework.fields import SerializerMethodField
|
||||
from rest_framework.mixins import ListModelMixin
|
||||
from rest_framework.permissions import IsAdminUser
|
||||
from rest_framework.request import Request
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.serializers import Serializer
|
||||
from rest_framework.viewsets import GenericViewSet
|
||||
|
||||
from authentik import __version__
|
||||
from authentik.admin.tasks import VERSION_CACHE_KEY, update_latest_version
|
||||
|
||||
|
||||
class VersionSerializer(Serializer):
|
||||
"""Get running and latest version."""
|
||||
|
||||
version_current = SerializerMethodField()
|
||||
version_latest = SerializerMethodField()
|
||||
outdated = SerializerMethodField()
|
||||
|
||||
def get_version_current(self, _) -> str:
|
||||
"""Get current version"""
|
||||
return __version__
|
||||
|
||||
def get_version_latest(self, _) -> str:
|
||||
"""Get latest version from cache"""
|
||||
version_in_cache = cache.get(VERSION_CACHE_KEY)
|
||||
if not version_in_cache: # pragma: no cover
|
||||
update_latest_version.delay()
|
||||
return __version__
|
||||
return version_in_cache
|
||||
|
||||
def get_outdated(self, instance) -> bool:
|
||||
"""Check if we're running the latest version"""
|
||||
return parse(self.get_version_current(instance)) < parse(
|
||||
self.get_version_latest(instance)
|
||||
)
|
||||
|
||||
def create(self, validated_data: dict) -> Model:
|
||||
raise NotImplementedError
|
||||
|
||||
def update(self, instance: Model, validated_data: dict) -> Model:
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class VersionViewSet(ListModelMixin, GenericViewSet):
|
||||
"""Get running and latest version."""
|
||||
|
||||
permission_classes = [IsAdminUser]
|
||||
|
||||
def get_queryset(self): # pragma: no cover
|
||||
return None
|
||||
|
||||
@swagger_auto_schema(responses={200: VersionSerializer(many=True)})
|
||||
def list(self, request: Request) -> Response:
|
||||
"""Get running and latest version."""
|
||||
return Response(VersionSerializer(True).data)
|
25
authentik/admin/api/workers.py
Normal file
25
authentik/admin/api/workers.py
Normal file
@ -0,0 +1,25 @@
|
||||
"""authentik administration overview"""
|
||||
from rest_framework.mixins import ListModelMixin
|
||||
from rest_framework.permissions import IsAdminUser
|
||||
from rest_framework.request import Request
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.serializers import Serializer
|
||||
from rest_framework.viewsets import GenericViewSet
|
||||
|
||||
from authentik.root.celery import CELERY_APP
|
||||
|
||||
|
||||
class WorkerViewSet(ListModelMixin, GenericViewSet):
|
||||
"""Get currently connected worker count."""
|
||||
|
||||
serializer_class = Serializer
|
||||
permission_classes = [IsAdminUser]
|
||||
|
||||
def get_queryset(self): # pragma: no cover
|
||||
return None
|
||||
|
||||
def list(self, request: Request) -> Response:
|
||||
"""Get currently connected worker count."""
|
||||
return Response(
|
||||
{"pagination": {"count": len(CELERY_APP.control.ping(timeout=0.5))}}
|
||||
)
|
11
authentik/admin/apps.py
Normal file
11
authentik/admin/apps.py
Normal file
@ -0,0 +1,11 @@
|
||||
"""authentik admin app config"""
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AuthentikAdminConfig(AppConfig):
|
||||
"""authentik admin app config"""
|
||||
|
||||
name = "authentik.admin"
|
||||
label = "authentik_admin"
|
||||
mountpoint = "administration/"
|
||||
verbose_name = "authentik Admin"
|
107
authentik/admin/fields.py
Normal file
107
authentik/admin/fields.py
Normal file
@ -0,0 +1,107 @@
|
||||
"""Additional fields"""
|
||||
import yaml
|
||||
from django import forms
|
||||
from django.utils.datastructures import MultiValueDict
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class ArrayFieldSelectMultiple(forms.SelectMultiple):
|
||||
"""This is a Form Widget for use with a Postgres ArrayField. It implements
|
||||
a multi-select interface that can be given a set of `choices`.
|
||||
You can provide a `delimiter` keyword argument to specify the delimeter used.
|
||||
|
||||
https://gist.github.com/stephane/00e73c0002de52b1c601"""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
# Accept a `delimiter` argument, and grab it (defaulting to a comma)
|
||||
self.delimiter = kwargs.pop("delimiter", ",")
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def value_from_datadict(self, data, files, name):
|
||||
if isinstance(data, MultiValueDict):
|
||||
# Normally, we'd want a list here, which is what we get from the
|
||||
# SelectMultiple superclass, but the SimpleArrayField expects to
|
||||
# get a delimited string, so we're doing a little extra work.
|
||||
return self.delimiter.join(data.getlist(name))
|
||||
|
||||
return data.get(name)
|
||||
|
||||
def get_context(self, name, value, attrs):
|
||||
return super().get_context(name, value.split(self.delimiter), attrs)
|
||||
|
||||
|
||||
class CodeMirrorWidget(forms.Textarea):
|
||||
"""Custom Textarea-based Widget that triggers a CodeMirror editor"""
|
||||
|
||||
# CodeMirror mode to enable
|
||||
mode: str
|
||||
|
||||
template_name = "fields/codemirror.html"
|
||||
|
||||
def __init__(self, *args, mode="yaml", **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.mode = mode
|
||||
|
||||
def render(self, *args, **kwargs):
|
||||
attrs = kwargs.setdefault("attrs", {})
|
||||
attrs["mode"] = self.mode
|
||||
return super().render(*args, **kwargs)
|
||||
|
||||
|
||||
class InvalidYAMLInput(str):
|
||||
"""Invalid YAML String type"""
|
||||
|
||||
|
||||
class YAMLString(str):
|
||||
"""YAML String type"""
|
||||
|
||||
|
||||
class YAMLField(forms.JSONField):
|
||||
"""Django's JSON Field converted to YAML"""
|
||||
|
||||
default_error_messages = {
|
||||
"invalid": _("'%(value)s' value must be valid YAML."),
|
||||
}
|
||||
widget = forms.Textarea
|
||||
|
||||
def to_python(self, value):
|
||||
if self.disabled:
|
||||
return value
|
||||
if value in self.empty_values:
|
||||
return None
|
||||
if isinstance(value, (list, dict, int, float, YAMLString)):
|
||||
return value
|
||||
try:
|
||||
converted = yaml.safe_load(value)
|
||||
except yaml.YAMLError:
|
||||
raise forms.ValidationError(
|
||||
self.error_messages["invalid"],
|
||||
code="invalid",
|
||||
params={"value": value},
|
||||
)
|
||||
if isinstance(converted, str):
|
||||
return YAMLString(converted)
|
||||
if converted is None:
|
||||
return {}
|
||||
return converted
|
||||
|
||||
def bound_data(self, data, initial):
|
||||
if self.disabled:
|
||||
return initial
|
||||
try:
|
||||
return yaml.safe_load(data)
|
||||
except yaml.YAMLError:
|
||||
return InvalidYAMLInput(data)
|
||||
|
||||
def prepare_value(self, value):
|
||||
if isinstance(value, InvalidYAMLInput):
|
||||
return value
|
||||
return yaml.dump(value, explicit_start=True, default_flow_style=False)
|
||||
|
||||
def has_changed(self, initial, data):
|
||||
if super().has_changed(initial, data):
|
||||
return True
|
||||
# For purposes of seeing whether something has changed, True isn't the
|
||||
# same as 1 and the order of keys doesn't matter.
|
||||
data = self.to_python(data)
|
||||
return yaml.dump(initial, sort_keys=True) != yaml.dump(data, sort_keys=True)
|
18
authentik/admin/forms/overview.py
Normal file
18
authentik/admin/forms/overview.py
Normal file
@ -0,0 +1,18 @@
|
||||
"""Forms for modals on overview page"""
|
||||
from django import forms
|
||||
|
||||
|
||||
class PolicyCacheClearForm(forms.Form):
|
||||
"""Form to clear Policy cache"""
|
||||
|
||||
title = "Clear Policy cache"
|
||||
body = """Are you sure you want to clear the policy cache?
|
||||
This will cause all policies to be re-evaluated on their next usage."""
|
||||
|
||||
|
||||
class FlowCacheClearForm(forms.Form):
|
||||
"""Form to clear Flow cache"""
|
||||
|
||||
title = "Clear Flow cache"
|
||||
body = """Are you sure you want to clear the flow cache?
|
||||
This will cause all flows to be re-evaluated on their next usage."""
|
12
authentik/admin/forms/policies.py
Normal file
12
authentik/admin/forms/policies.py
Normal file
@ -0,0 +1,12 @@
|
||||
"""authentik administration forms"""
|
||||
from django import forms
|
||||
|
||||
from authentik.admin.fields import CodeMirrorWidget, YAMLField
|
||||
from authentik.core.models import User
|
||||
|
||||
|
||||
class PolicyTestForm(forms.Form):
|
||||
"""Form to test policies against user"""
|
||||
|
||||
user = forms.ModelChoiceField(queryset=User.objects.all())
|
||||
context = YAMLField(widget=CodeMirrorWidget(), required=False, initial=dict)
|
22
authentik/admin/forms/users.py
Normal file
22
authentik/admin/forms/users.py
Normal file
@ -0,0 +1,22 @@
|
||||
"""authentik administrative user forms"""
|
||||
|
||||
from django import forms
|
||||
|
||||
from authentik.admin.fields import CodeMirrorWidget, YAMLField
|
||||
from authentik.core.models import User
|
||||
|
||||
|
||||
class UserForm(forms.ModelForm):
|
||||
"""Update User Details"""
|
||||
|
||||
class Meta:
|
||||
|
||||
model = User
|
||||
fields = ["username", "name", "email", "is_active", "attributes"]
|
||||
widgets = {
|
||||
"name": forms.TextInput,
|
||||
"attributes": CodeMirrorWidget,
|
||||
}
|
||||
field_classes = {
|
||||
"attributes": YAMLField,
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
"""passbook admin mixins"""
|
||||
"""authentik admin mixins"""
|
||||
from django.contrib.auth.mixins import UserPassesTestMixin
|
||||
|
||||
|
10
authentik/admin/settings.py
Normal file
10
authentik/admin/settings.py
Normal file
@ -0,0 +1,10 @@
|
||||
"""authentik admin settings"""
|
||||
from celery.schedules import crontab
|
||||
|
||||
CELERY_BEAT_SCHEDULE = {
|
||||
"admin_latest_version": {
|
||||
"task": "authentik.admin.tasks.update_latest_version",
|
||||
"schedule": crontab(minute=0), # Run every hour
|
||||
"options": {"queue": "authentik_scheduled"},
|
||||
}
|
||||
}
|
53
authentik/admin/tasks.py
Normal file
53
authentik/admin/tasks.py
Normal file
@ -0,0 +1,53 @@
|
||||
"""authentik admin tasks"""
|
||||
import re
|
||||
|
||||
from django.core.cache import cache
|
||||
from django.core.validators import URLValidator
|
||||
from packaging.version import parse
|
||||
from requests import RequestException, get
|
||||
from structlog.stdlib import get_logger
|
||||
|
||||
from authentik import __version__
|
||||
from authentik.events.models import Event, EventAction
|
||||
from authentik.events.monitored_tasks import MonitoredTask, TaskResult, TaskResultStatus
|
||||
from authentik.root.celery import CELERY_APP
|
||||
|
||||
LOGGER = get_logger()
|
||||
VERSION_CACHE_KEY = "authentik_latest_version"
|
||||
VERSION_CACHE_TIMEOUT = 8 * 60 * 60 # 8 hours
|
||||
# Chop of the first ^ because we want to search the entire string
|
||||
URL_FINDER = URLValidator.regex.pattern[1:]
|
||||
|
||||
|
||||
@CELERY_APP.task(bind=True, base=MonitoredTask)
|
||||
def update_latest_version(self: MonitoredTask):
|
||||
"""Update latest version info"""
|
||||
try:
|
||||
response = get("https://api.github.com/repos/beryju/authentik/releases/latest")
|
||||
response.raise_for_status()
|
||||
data = response.json()
|
||||
tag_name = data.get("tag_name")
|
||||
upstream_version = tag_name.split("/")[1]
|
||||
cache.set(VERSION_CACHE_KEY, upstream_version, VERSION_CACHE_TIMEOUT)
|
||||
self.set_status(
|
||||
TaskResult(
|
||||
TaskResultStatus.SUCCESSFUL, ["Successfully updated latest Version"]
|
||||
)
|
||||
)
|
||||
# Check if upstream version is newer than what we're running,
|
||||
# and if no event exists yet, create one.
|
||||
local_version = parse(__version__)
|
||||
if local_version < parse(upstream_version):
|
||||
# Event has already been created, don't create duplicate
|
||||
if Event.objects.filter(
|
||||
action=EventAction.UPDATE_AVAILABLE,
|
||||
context__new_version=upstream_version,
|
||||
).exists():
|
||||
return
|
||||
event_dict = {"new_version": upstream_version}
|
||||
if match := re.search(URL_FINDER, data.get("body", "")):
|
||||
event_dict["message"] = f"Changelog: {match.group()}"
|
||||
Event.new(EventAction.UPDATE_AVAILABLE, **event_dict).save()
|
||||
except (RequestException, IndexError) as exc:
|
||||
cache.set(VERSION_CACHE_KEY, "0.0.0", VERSION_CACHE_TIMEOUT)
|
||||
self.set_status(TaskResult(TaskResultStatus.ERROR).with_error(exc))
|
5
authentik/admin/templates/administration/base.html
Normal file
5
authentik/admin/templates/administration/base.html
Normal file
@ -0,0 +1,5 @@
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
@ -0,0 +1,14 @@
|
||||
{% extends base_template|default:"generic/form.html" %}
|
||||
|
||||
{% load authentik_utils %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block above_form %}
|
||||
<h1>
|
||||
{% trans 'Generate Certificate-Key Pair' %}
|
||||
</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block action %}
|
||||
{% trans 'Generate Certificate-Key Pair' %}
|
||||
{% endblock %}
|
13
authentik/admin/templates/administration/flow/import.html
Normal file
13
authentik/admin/templates/administration/flow/import.html
Normal file
@ -0,0 +1,13 @@
|
||||
{% extends base_template|default:"generic/form.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block above_form %}
|
||||
<h1>
|
||||
{% trans 'Import Flow' %}
|
||||
</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block action %}
|
||||
{% trans 'Import Flow' %}
|
||||
{% endblock %}
|
46
authentik/admin/templates/administration/policy/test.html
Normal file
46
authentik/admin/templates/administration/policy/test.html
Normal file
@ -0,0 +1,46 @@
|
||||
{% extends 'generic/form.html' %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block above_form %}
|
||||
<h1>{% blocktrans with policy=policy %}Test {{ policy }}{% endblocktrans %}</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block beneath_form %}
|
||||
{% if result %}
|
||||
<div class="pf-c-form__group ">
|
||||
<div class="pf-c-form__group-label">
|
||||
<label class="pf-c-form__label" for="context-1">
|
||||
<span class="pf-c-form__label-text">{% trans 'Passing' %}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="pf-c-form__group-label">
|
||||
<div class="c-form__horizontal-group">
|
||||
<span class="pf-c-form__label-text">{{ result.passing|yesno:"Yes,No" }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pf-c-form__group ">
|
||||
<div class="pf-c-form__group-label">
|
||||
<label class="pf-c-form__label" for="context-1">
|
||||
<span class="pf-c-form__label-text">{% trans 'Messages' %}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="pf-c-form__group-label">
|
||||
<div class="c-form__horizontal-group">
|
||||
<ul>
|
||||
{% for m in result.messages %}
|
||||
<li><span class="pf-c-form__label-text">{{ m }}</span></li>
|
||||
{% empty %}
|
||||
<li><span class="pf-c-form__label-text">-</span></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block action %}
|
||||
{% trans 'Test' %}
|
||||
{% endblock %}
|
42
authentik/admin/templates/administration/user/disable.html
Normal file
42
authentik/admin/templates/administration/user/disable.html
Normal file
@ -0,0 +1,42 @@
|
||||
{% extends "administration/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load authentik_utils %}
|
||||
|
||||
{% block content %}
|
||||
<section class="pf-c-page__main-section pf-m-light">
|
||||
<div class="pf-c-content">
|
||||
{% block above_form %}
|
||||
<h1>
|
||||
{% blocktrans with object_type=object|verbose_name %}
|
||||
Disable {{ object_type }}
|
||||
{% endblocktrans %}
|
||||
</h1>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</section>
|
||||
<section class="pf-c-page__main-section">
|
||||
<div class="pf-l-stack">
|
||||
<div class="pf-l-stack__item">
|
||||
<div class="pf-c-card">
|
||||
<div class="pf-c-card__body">
|
||||
<form action="" method="post" class="pf-c-form">
|
||||
{% csrf_token %}
|
||||
<p>
|
||||
{% blocktrans with object_type=object|verbose_name name=object %}
|
||||
Are you sure you want to disable {{ object_type }} "{{ object }}"?
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
<div class="pf-c-form__group pf-m-action">
|
||||
<div class="pf-c-form__actions">
|
||||
<input class="pf-c-button pf-m-danger" type="submit" value="{% trans 'Disable' %}" />
|
||||
<a class="pf-c-button pf-m-secondary" href="{% back %}">{% trans "Back" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
1
authentik/admin/templates/fields/codemirror.html
Normal file
1
authentik/admin/templates/fields/codemirror.html
Normal file
@ -0,0 +1 @@
|
||||
<ak-codemirror mode="{{ widget.attrs.mode }}"><textarea class="pf-c-form-control" name="{{ widget.name }}">{% if widget.value %}{{ widget.value }}{% endif %}</textarea></ak-codemirror>
|
18
authentik/admin/templates/generic/create.html
Normal file
18
authentik/admin/templates/generic/create.html
Normal file
@ -0,0 +1,18 @@
|
||||
{% extends base_template|default:"generic/form.html" %}
|
||||
|
||||
{% load authentik_utils %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block above_form %}
|
||||
<h1>
|
||||
{% blocktrans with type=form|form_verbose_name %}
|
||||
Create {{ type }}
|
||||
{% endblocktrans %}
|
||||
</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block action %}
|
||||
{% blocktrans with type=form|form_verbose_name %}
|
||||
Create {{ type }}
|
||||
{% endblocktrans %}
|
||||
{% endblock %}
|
40
authentik/admin/templates/generic/form.html
Normal file
40
authentik/admin/templates/generic/form.html
Normal file
@ -0,0 +1,40 @@
|
||||
{% extends container_template|default:"administration/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load authentik_utils %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<section class="pf-c-page__main-section pf-m-light">
|
||||
<div class="pf-c-content">
|
||||
{% block above_form %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</section>
|
||||
<section class="pf-c-page__main-section">
|
||||
<div class="pf-l-stack">
|
||||
<div class="pf-l-stack__item">
|
||||
<div class="pf-c-card">
|
||||
<div class="pf-c-card__body">
|
||||
<form id="main-form" action="" method="post" class="pf-c-form pf-m-horizontal" enctype="multipart/form-data">
|
||||
{% include 'partials/form_horizontal.html' with form=form %}
|
||||
{% block beneath_form %}
|
||||
{% endblock %}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="pf-c-modal-box__footer">
|
||||
<ak-spinner-button form="main-form">
|
||||
{% block action %}{% endblock %}
|
||||
</ak-spinner-button>
|
||||
<a class="pf-c-button pf-m-secondary" href="{% back %}">{% trans "Cancel" %}</a>
|
||||
</footer>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
{{ block.super }}
|
||||
{{ form.media.js }}
|
||||
{% endblock %}
|
20
authentik/admin/templates/generic/form_non_model.html
Normal file
20
authentik/admin/templates/generic/form_non_model.html
Normal file
@ -0,0 +1,20 @@
|
||||
{% extends base_template|default:"generic/form.html" %}
|
||||
|
||||
{% load authentik_utils %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block above_form %}
|
||||
<h1>
|
||||
{% trans form.title %}
|
||||
</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block beneath_form %}
|
||||
<p>
|
||||
{% trans form.body %}
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block action %}
|
||||
{% trans 'Confirm' %}
|
||||
{% endblock %}
|
18
authentik/admin/templates/generic/update.html
Normal file
18
authentik/admin/templates/generic/update.html
Normal file
@ -0,0 +1,18 @@
|
||||
{% extends base_template|default:"generic/form.html" %}
|
||||
|
||||
{% load authentik_utils %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block above_form %}
|
||||
<h1>
|
||||
{% blocktrans with type=form|form_verbose_name|title inst=form.instance %}
|
||||
Update {{ inst }}
|
||||
{% endblocktrans %}
|
||||
</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block action %}
|
||||
{% blocktrans with type=form|form_verbose_name %}
|
||||
Update {{ type }}
|
||||
{% endblocktrans %}
|
||||
{% endblock %}
|
73
authentik/admin/tests/test_api.py
Normal file
73
authentik/admin/tests/test_api.py
Normal file
@ -0,0 +1,73 @@
|
||||
"""test admin api"""
|
||||
from json import loads
|
||||
|
||||
from django.test import TestCase
|
||||
from django.urls import reverse
|
||||
|
||||
from authentik import __version__
|
||||
from authentik.core.models import Group, User
|
||||
from authentik.core.tasks import clean_expired_models
|
||||
|
||||
|
||||
class TestAdminAPI(TestCase):
|
||||
"""test admin api"""
|
||||
|
||||
def setUp(self) -> None:
|
||||
super().setUp()
|
||||
self.user = User.objects.create(username="test-user")
|
||||
self.group = Group.objects.create(name="superusers", is_superuser=True)
|
||||
self.group.users.add(self.user)
|
||||
self.group.save()
|
||||
self.client.force_login(self.user)
|
||||
|
||||
def test_tasks(self):
|
||||
"""Test Task API"""
|
||||
clean_expired_models.delay()
|
||||
response = self.client.get(reverse("authentik_api:admin_system_tasks-list"))
|
||||
self.assertEqual(response.status_code, 200)
|
||||
body = loads(response.content)
|
||||
self.assertTrue(
|
||||
any([task["task_name"] == "clean_expired_models" for task in body])
|
||||
)
|
||||
|
||||
def test_tasks_retry(self):
|
||||
"""Test Task API (retry)"""
|
||||
clean_expired_models.delay()
|
||||
response = self.client.post(
|
||||
reverse(
|
||||
"authentik_api:admin_system_tasks-retry",
|
||||
kwargs={"pk": "clean_expired_models"},
|
||||
)
|
||||
)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
body = loads(response.content)
|
||||
self.assertTrue(body["successful"])
|
||||
|
||||
def test_tasks_retry_404(self):
|
||||
"""Test Task API (retry, 404)"""
|
||||
response = self.client.post(
|
||||
reverse(
|
||||
"authentik_api:admin_system_tasks-retry",
|
||||
kwargs={"pk": "qwerqewrqrqewrqewr"},
|
||||
)
|
||||
)
|
||||
self.assertEqual(response.status_code, 404)
|
||||
|
||||
def test_version(self):
|
||||
"""Test Version API"""
|
||||
response = self.client.get(reverse("authentik_api:admin_version-list"))
|
||||
self.assertEqual(response.status_code, 200)
|
||||
body = loads(response.content)
|
||||
self.assertEqual(body["version_current"], __version__)
|
||||
|
||||
def test_workers(self):
|
||||
"""Test Workers API"""
|
||||
response = self.client.get(reverse("authentik_api:admin_workers-list"))
|
||||
self.assertEqual(response.status_code, 200)
|
||||
body = loads(response.content)
|
||||
self.assertEqual(body["pagination"]["count"], 0)
|
||||
|
||||
def test_metrics(self):
|
||||
"""Test metrics API"""
|
||||
response = self.client.get(reverse("authentik_api:admin_metrics-list"))
|
||||
self.assertEqual(response.status_code, 200)
|
66
authentik/admin/tests/test_generated.py
Normal file
66
authentik/admin/tests/test_generated.py
Normal file
@ -0,0 +1,66 @@
|
||||
"""admin tests"""
|
||||
from importlib import import_module
|
||||
from typing import Callable
|
||||
|
||||
from django.forms import ModelForm
|
||||
from django.test import Client, TestCase
|
||||
from django.urls import reverse
|
||||
from django.urls.exceptions import NoReverseMatch
|
||||
|
||||
from authentik.admin.urls import urlpatterns
|
||||
from authentik.core.models import Group, User
|
||||
from authentik.lib.utils.reflection import get_apps
|
||||
|
||||
|
||||
class TestAdmin(TestCase):
|
||||
"""Generic admin tests"""
|
||||
|
||||
def setUp(self):
|
||||
self.user = User.objects.create_user(username="test")
|
||||
self.user.ak_groups.add(Group.objects.filter(is_superuser=True).first())
|
||||
self.user.save()
|
||||
self.client = Client()
|
||||
self.client.force_login(self.user)
|
||||
|
||||
|
||||
def generic_view_tester(view_name: str) -> Callable:
|
||||
"""This is used instead of subTest for better visibility"""
|
||||
|
||||
def tester(self: TestAdmin):
|
||||
try:
|
||||
full_url = reverse(f"authentik_admin:{view_name}")
|
||||
response = self.client.get(full_url)
|
||||
self.assertTrue(response.status_code < 500)
|
||||
except NoReverseMatch:
|
||||
pass
|
||||
|
||||
return tester
|
||||
|
||||
|
||||
for url in urlpatterns:
|
||||
method_name = url.name.replace("-", "_")
|
||||
setattr(TestAdmin, f"test_view_{method_name}", generic_view_tester(url.name))
|
||||
|
||||
|
||||
def generic_form_tester(form: ModelForm) -> Callable:
|
||||
"""Test a form"""
|
||||
|
||||
def tester(self: TestAdmin):
|
||||
form_inst = form()
|
||||
self.assertFalse(form_inst.is_valid())
|
||||
|
||||
return tester
|
||||
|
||||
|
||||
# Load the forms module from every app, so we have all forms loaded
|
||||
for app in get_apps():
|
||||
module = app.__module__.replace(".apps", ".forms")
|
||||
try:
|
||||
import_module(module)
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
for form_class in ModelForm.__subclasses__():
|
||||
setattr(
|
||||
TestAdmin, f"test_form_{form_class.__name__}", generic_form_tester(form_class)
|
||||
)
|
43
authentik/admin/tests/test_policy_binding.py
Normal file
43
authentik/admin/tests/test_policy_binding.py
Normal file
@ -0,0 +1,43 @@
|
||||
"""admin tests"""
|
||||
from uuid import uuid4
|
||||
|
||||
from django import forms
|
||||
from django.test import TestCase
|
||||
from django.test.client import RequestFactory
|
||||
|
||||
from authentik.admin.views.policies_bindings import PolicyBindingCreateView
|
||||
from authentik.core.models import Application
|
||||
from authentik.policies.forms import PolicyBindingForm
|
||||
|
||||
|
||||
class TestPolicyBindingView(TestCase):
|
||||
"""Generic admin tests"""
|
||||
|
||||
def setUp(self):
|
||||
self.factory = RequestFactory()
|
||||
|
||||
def test_without_get_param(self):
|
||||
"""Test PolicyBindingCreateView without get params"""
|
||||
request = self.factory.get("/")
|
||||
view = PolicyBindingCreateView(request=request)
|
||||
self.assertEqual(view.get_initial(), {})
|
||||
|
||||
def test_with_params_invalid(self):
|
||||
"""Test PolicyBindingCreateView with invalid get params"""
|
||||
request = self.factory.get("/", {"target": uuid4()})
|
||||
view = PolicyBindingCreateView(request=request)
|
||||
self.assertEqual(view.get_initial(), {})
|
||||
|
||||
def test_with_params(self):
|
||||
"""Test PolicyBindingCreateView with get params"""
|
||||
target = Application.objects.create(name="test")
|
||||
request = self.factory.get("/", {"target": target.pk.hex})
|
||||
view = PolicyBindingCreateView(request=request)
|
||||
self.assertEqual(view.get_initial(), {"target": target, "order": 0})
|
||||
|
||||
self.assertTrue(
|
||||
isinstance(
|
||||
PolicyBindingForm(initial={"target": "foo"}).fields["target"].widget,
|
||||
forms.HiddenInput,
|
||||
)
|
||||
)
|
43
authentik/admin/tests/test_stage_bindings.py
Normal file
43
authentik/admin/tests/test_stage_bindings.py
Normal file
@ -0,0 +1,43 @@
|
||||
"""admin tests"""
|
||||
from uuid import uuid4
|
||||
|
||||
from django import forms
|
||||
from django.test import TestCase
|
||||
from django.test.client import RequestFactory
|
||||
|
||||
from authentik.admin.views.stages_bindings import StageBindingCreateView
|
||||
from authentik.flows.forms import FlowStageBindingForm
|
||||
from authentik.flows.models import Flow
|
||||
|
||||
|
||||
class TestStageBindingView(TestCase):
|
||||
"""Generic admin tests"""
|
||||
|
||||
def setUp(self):
|
||||
self.factory = RequestFactory()
|
||||
|
||||
def test_without_get_param(self):
|
||||
"""Test StageBindingCreateView without get params"""
|
||||
request = self.factory.get("/")
|
||||
view = StageBindingCreateView(request=request)
|
||||
self.assertEqual(view.get_initial(), {})
|
||||
|
||||
def test_with_params_invalid(self):
|
||||
"""Test StageBindingCreateView with invalid get params"""
|
||||
request = self.factory.get("/", {"target": uuid4()})
|
||||
view = StageBindingCreateView(request=request)
|
||||
self.assertEqual(view.get_initial(), {})
|
||||
|
||||
def test_with_params(self):
|
||||
"""Test StageBindingCreateView with get params"""
|
||||
target = Flow.objects.create(name="test", slug="test")
|
||||
request = self.factory.get("/", {"target": target.pk.hex})
|
||||
view = StageBindingCreateView(request=request)
|
||||
self.assertEqual(view.get_initial(), {"target": target, "order": 0})
|
||||
|
||||
self.assertTrue(
|
||||
isinstance(
|
||||
FlowStageBindingForm(initial={"target": "foo"}).fields["target"].widget,
|
||||
forms.HiddenInput,
|
||||
)
|
||||
)
|
81
authentik/admin/tests/test_tasks.py
Normal file
81
authentik/admin/tests/test_tasks.py
Normal file
@ -0,0 +1,81 @@
|
||||
"""test admin tasks"""
|
||||
import json
|
||||
from dataclasses import dataclass
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from django.core.cache import cache
|
||||
from django.test import TestCase
|
||||
from requests.exceptions import RequestException
|
||||
|
||||
from authentik.admin.tasks import VERSION_CACHE_KEY, update_latest_version
|
||||
from authentik.events.models import Event, EventAction
|
||||
|
||||
|
||||
@dataclass
|
||||
class MockResponse:
|
||||
"""Mock class to emulate the methods of requests's Response we need"""
|
||||
|
||||
status_code: int
|
||||
response: str
|
||||
|
||||
def json(self) -> dict:
|
||||
"""Get json parsed response"""
|
||||
return json.loads(self.response)
|
||||
|
||||
def raise_for_status(self):
|
||||
"""raise RequestException if status code is 400 or more"""
|
||||
if self.status_code >= 400:
|
||||
raise RequestException
|
||||
|
||||
|
||||
REQUEST_MOCK_VALID = Mock(
|
||||
return_value=MockResponse(
|
||||
200,
|
||||
"""{
|
||||
"tag_name": "version/99999999.9999999",
|
||||
"body": "https://goauthentik.io/test"
|
||||
}""",
|
||||
)
|
||||
)
|
||||
|
||||
REQUEST_MOCK_INVALID = Mock(return_value=MockResponse(400, "{}"))
|
||||
|
||||
|
||||
class TestAdminTasks(TestCase):
|
||||
"""test admin tasks"""
|
||||
|
||||
@patch("authentik.admin.tasks.get", REQUEST_MOCK_VALID)
|
||||
def test_version_valid_response(self):
|
||||
"""Test Update checker with valid response"""
|
||||
update_latest_version.delay().get()
|
||||
self.assertEqual(cache.get(VERSION_CACHE_KEY), "99999999.9999999")
|
||||
self.assertTrue(
|
||||
Event.objects.filter(
|
||||
action=EventAction.UPDATE_AVAILABLE,
|
||||
context__new_version="99999999.9999999",
|
||||
context__message="Changelog: https://goauthentik.io/test",
|
||||
).exists()
|
||||
)
|
||||
# test that a consecutive check doesn't create a duplicate event
|
||||
update_latest_version.delay().get()
|
||||
self.assertEqual(
|
||||
len(
|
||||
Event.objects.filter(
|
||||
action=EventAction.UPDATE_AVAILABLE,
|
||||
context__new_version="99999999.9999999",
|
||||
context__message="Changelog: https://goauthentik.io/test",
|
||||
)
|
||||
),
|
||||
1,
|
||||
)
|
||||
|
||||
@patch("authentik.admin.tasks.get", REQUEST_MOCK_INVALID)
|
||||
def test_version_error(self):
|
||||
"""Test Update checker with invalid response"""
|
||||
update_latest_version.delay().get()
|
||||
self.assertEqual(cache.get(VERSION_CACHE_KEY), "0.0.0")
|
||||
self.assertFalse(
|
||||
Event.objects.filter(
|
||||
action=EventAction.UPDATE_AVAILABLE, context__new_version="0.0.0"
|
||||
).exists()
|
||||
)
|
344
authentik/admin/urls.py
Normal file
344
authentik/admin/urls.py
Normal file
@ -0,0 +1,344 @@
|
||||
"""authentik URL Configuration"""
|
||||
from django.urls import path
|
||||
|
||||
from authentik.admin.views import (
|
||||
applications,
|
||||
certificate_key_pair,
|
||||
events_notifications_rules,
|
||||
events_notifications_transports,
|
||||
flows,
|
||||
groups,
|
||||
outposts,
|
||||
outposts_service_connections,
|
||||
overview,
|
||||
policies,
|
||||
policies_bindings,
|
||||
property_mappings,
|
||||
providers,
|
||||
sources,
|
||||
stages,
|
||||
stages_bindings,
|
||||
stages_invitations,
|
||||
stages_prompts,
|
||||
tokens,
|
||||
users,
|
||||
)
|
||||
from authentik.providers.saml.views.metadata import MetadataImportView
|
||||
|
||||
urlpatterns = [
|
||||
path(
|
||||
"overview/cache/flow/",
|
||||
overview.FlowCacheClearView.as_view(),
|
||||
name="overview-clear-flow-cache",
|
||||
),
|
||||
path(
|
||||
"overview/cache/policy/",
|
||||
overview.PolicyCacheClearView.as_view(),
|
||||
name="overview-clear-policy-cache",
|
||||
),
|
||||
# Applications
|
||||
path(
|
||||
"applications/create/",
|
||||
applications.ApplicationCreateView.as_view(),
|
||||
name="application-create",
|
||||
),
|
||||
path(
|
||||
"applications/<uuid:pk>/update/",
|
||||
applications.ApplicationUpdateView.as_view(),
|
||||
name="application-update",
|
||||
),
|
||||
path(
|
||||
"applications/<uuid:pk>/delete/",
|
||||
applications.ApplicationDeleteView.as_view(),
|
||||
name="application-delete",
|
||||
),
|
||||
# Tokens
|
||||
path(
|
||||
"tokens/<uuid:pk>/delete/",
|
||||
tokens.TokenDeleteView.as_view(),
|
||||
name="token-delete",
|
||||
),
|
||||
# Sources
|
||||
path("sources/create/", sources.SourceCreateView.as_view(), name="source-create"),
|
||||
path(
|
||||
"sources/<uuid:pk>/update/",
|
||||
sources.SourceUpdateView.as_view(),
|
||||
name="source-update",
|
||||
),
|
||||
path(
|
||||
"sources/<uuid:pk>/delete/",
|
||||
sources.SourceDeleteView.as_view(),
|
||||
name="source-delete",
|
||||
),
|
||||
# Policies
|
||||
path("policies/create/", policies.PolicyCreateView.as_view(), name="policy-create"),
|
||||
path(
|
||||
"policies/<uuid:pk>/update/",
|
||||
policies.PolicyUpdateView.as_view(),
|
||||
name="policy-update",
|
||||
),
|
||||
path(
|
||||
"policies/<uuid:pk>/delete/",
|
||||
policies.PolicyDeleteView.as_view(),
|
||||
name="policy-delete",
|
||||
),
|
||||
path(
|
||||
"policies/<uuid:pk>/test/",
|
||||
policies.PolicyTestView.as_view(),
|
||||
name="policy-test",
|
||||
),
|
||||
# Policy bindings
|
||||
path(
|
||||
"policies/bindings/create/",
|
||||
policies_bindings.PolicyBindingCreateView.as_view(),
|
||||
name="policy-binding-create",
|
||||
),
|
||||
path(
|
||||
"policies/bindings/<uuid:pk>/update/",
|
||||
policies_bindings.PolicyBindingUpdateView.as_view(),
|
||||
name="policy-binding-update",
|
||||
),
|
||||
path(
|
||||
"policies/bindings/<uuid:pk>/delete/",
|
||||
policies_bindings.PolicyBindingDeleteView.as_view(),
|
||||
name="policy-binding-delete",
|
||||
),
|
||||
# Providers
|
||||
path(
|
||||
"providers/create/",
|
||||
providers.ProviderCreateView.as_view(),
|
||||
name="provider-create",
|
||||
),
|
||||
path(
|
||||
"providers/create/saml/from-metadata/",
|
||||
MetadataImportView.as_view(),
|
||||
name="provider-saml-from-metadata",
|
||||
),
|
||||
path(
|
||||
"providers/<int:pk>/update/",
|
||||
providers.ProviderUpdateView.as_view(),
|
||||
name="provider-update",
|
||||
),
|
||||
path(
|
||||
"providers/<int:pk>/delete/",
|
||||
providers.ProviderDeleteView.as_view(),
|
||||
name="provider-delete",
|
||||
),
|
||||
# Stages
|
||||
path("stages/create/", stages.StageCreateView.as_view(), name="stage-create"),
|
||||
path(
|
||||
"stages/<uuid:pk>/update/",
|
||||
stages.StageUpdateView.as_view(),
|
||||
name="stage-update",
|
||||
),
|
||||
path(
|
||||
"stages/<uuid:pk>/delete/",
|
||||
stages.StageDeleteView.as_view(),
|
||||
name="stage-delete",
|
||||
),
|
||||
# Stage bindings
|
||||
path(
|
||||
"stages/bindings/create/",
|
||||
stages_bindings.StageBindingCreateView.as_view(),
|
||||
name="stage-binding-create",
|
||||
),
|
||||
path(
|
||||
"stages/bindings/<uuid:pk>/update/",
|
||||
stages_bindings.StageBindingUpdateView.as_view(),
|
||||
name="stage-binding-update",
|
||||
),
|
||||
path(
|
||||
"stages/bindings/<uuid:pk>/delete/",
|
||||
stages_bindings.StageBindingDeleteView.as_view(),
|
||||
name="stage-binding-delete",
|
||||
),
|
||||
# Stage Prompts
|
||||
path(
|
||||
"stages_prompts/create/",
|
||||
stages_prompts.PromptCreateView.as_view(),
|
||||
name="stage-prompt-create",
|
||||
),
|
||||
path(
|
||||
"stages_prompts/<uuid:pk>/update/",
|
||||
stages_prompts.PromptUpdateView.as_view(),
|
||||
name="stage-prompt-update",
|
||||
),
|
||||
path(
|
||||
"stages_prompts/<uuid:pk>/delete/",
|
||||
stages_prompts.PromptDeleteView.as_view(),
|
||||
name="stage-prompt-delete",
|
||||
),
|
||||
# Stage Invitations
|
||||
path(
|
||||
"stages/invitations/create/",
|
||||
stages_invitations.InvitationCreateView.as_view(),
|
||||
name="stage-invitation-create",
|
||||
),
|
||||
path(
|
||||
"stages/invitations/<uuid:pk>/delete/",
|
||||
stages_invitations.InvitationDeleteView.as_view(),
|
||||
name="stage-invitation-delete",
|
||||
),
|
||||
# Flows
|
||||
path(
|
||||
"flows/create/",
|
||||
flows.FlowCreateView.as_view(),
|
||||
name="flow-create",
|
||||
),
|
||||
path(
|
||||
"flows/import/",
|
||||
flows.FlowImportView.as_view(),
|
||||
name="flow-import",
|
||||
),
|
||||
path(
|
||||
"flows/<uuid:pk>/update/",
|
||||
flows.FlowUpdateView.as_view(),
|
||||
name="flow-update",
|
||||
),
|
||||
path(
|
||||
"flows/<uuid:pk>/execute/",
|
||||
flows.FlowDebugExecuteView.as_view(),
|
||||
name="flow-execute",
|
||||
),
|
||||
path(
|
||||
"flows/<uuid:pk>/export/",
|
||||
flows.FlowExportView.as_view(),
|
||||
name="flow-export",
|
||||
),
|
||||
path(
|
||||
"flows/<uuid:pk>/delete/",
|
||||
flows.FlowDeleteView.as_view(),
|
||||
name="flow-delete",
|
||||
),
|
||||
# Property Mappings
|
||||
path(
|
||||
"property-mappings/create/",
|
||||
property_mappings.PropertyMappingCreateView.as_view(),
|
||||
name="property-mapping-create",
|
||||
),
|
||||
path(
|
||||
"property-mappings/<uuid:pk>/update/",
|
||||
property_mappings.PropertyMappingUpdateView.as_view(),
|
||||
name="property-mapping-update",
|
||||
),
|
||||
path(
|
||||
"property-mappings/<uuid:pk>/delete/",
|
||||
property_mappings.PropertyMappingDeleteView.as_view(),
|
||||
name="property-mapping-delete",
|
||||
),
|
||||
path(
|
||||
"property-mappings/<uuid:pk>/test/",
|
||||
property_mappings.PropertyMappingTestView.as_view(),
|
||||
name="property-mapping-test",
|
||||
),
|
||||
# Users
|
||||
path("users/create/", users.UserCreateView.as_view(), name="user-create"),
|
||||
path("users/<int:pk>/update/", users.UserUpdateView.as_view(), name="user-update"),
|
||||
path("users/<int:pk>/delete/", users.UserDeleteView.as_view(), name="user-delete"),
|
||||
path(
|
||||
"users/<int:pk>/disable/", users.UserDisableView.as_view(), name="user-disable"
|
||||
),
|
||||
path("users/<int:pk>/enable/", users.UserEnableView.as_view(), name="user-enable"),
|
||||
path(
|
||||
"users/<int:pk>/reset/",
|
||||
users.UserPasswordResetView.as_view(),
|
||||
name="user-password-reset",
|
||||
),
|
||||
# Groups
|
||||
path("groups/create/", groups.GroupCreateView.as_view(), name="group-create"),
|
||||
path(
|
||||
"groups/<uuid:pk>/update/",
|
||||
groups.GroupUpdateView.as_view(),
|
||||
name="group-update",
|
||||
),
|
||||
path(
|
||||
"groups/<uuid:pk>/delete/",
|
||||
groups.GroupDeleteView.as_view(),
|
||||
name="group-delete",
|
||||
),
|
||||
# Certificate-Key Pairs
|
||||
path(
|
||||
"crypto/certificates/create/",
|
||||
certificate_key_pair.CertificateKeyPairCreateView.as_view(),
|
||||
name="certificatekeypair-create",
|
||||
),
|
||||
path(
|
||||
"crypto/certificates/generate/",
|
||||
certificate_key_pair.CertificateKeyPairGenerateView.as_view(),
|
||||
name="certificatekeypair-generate",
|
||||
),
|
||||
path(
|
||||
"crypto/certificates/<uuid:pk>/update/",
|
||||
certificate_key_pair.CertificateKeyPairUpdateView.as_view(),
|
||||
name="certificatekeypair-update",
|
||||
),
|
||||
path(
|
||||
"crypto/certificates/<uuid:pk>/delete/",
|
||||
certificate_key_pair.CertificateKeyPairDeleteView.as_view(),
|
||||
name="certificatekeypair-delete",
|
||||
),
|
||||
# Outposts
|
||||
path(
|
||||
"outposts/create/",
|
||||
outposts.OutpostCreateView.as_view(),
|
||||
name="outpost-create",
|
||||
),
|
||||
path(
|
||||
"outposts/<uuid:pk>/update/",
|
||||
outposts.OutpostUpdateView.as_view(),
|
||||
name="outpost-update",
|
||||
),
|
||||
path(
|
||||
"outposts/<uuid:pk>/delete/",
|
||||
outposts.OutpostDeleteView.as_view(),
|
||||
name="outpost-delete",
|
||||
),
|
||||
# Outpost Service Connections
|
||||
path(
|
||||
"outpost_service_connections/create/",
|
||||
outposts_service_connections.OutpostServiceConnectionCreateView.as_view(),
|
||||
name="outpost-service-connection-create",
|
||||
),
|
||||
path(
|
||||
"outpost_service_connections/<uuid:pk>/update/",
|
||||
outposts_service_connections.OutpostServiceConnectionUpdateView.as_view(),
|
||||
name="outpost-service-connection-update",
|
||||
),
|
||||
path(
|
||||
"outpost_service_connections/<uuid:pk>/delete/",
|
||||
outposts_service_connections.OutpostServiceConnectionDeleteView.as_view(),
|
||||
name="outpost-service-connection-delete",
|
||||
),
|
||||
# Event Notification Transpots
|
||||
path(
|
||||
"events/transports/create/",
|
||||
events_notifications_transports.NotificationTransportCreateView.as_view(),
|
||||
name="notification-transport-create",
|
||||
),
|
||||
path(
|
||||
"events/transports/<uuid:pk>/update/",
|
||||
events_notifications_transports.NotificationTransportUpdateView.as_view(),
|
||||
name="notification-transport-update",
|
||||
),
|
||||
path(
|
||||
"events/transports/<uuid:pk>/delete/",
|
||||
events_notifications_transports.NotificationTransportDeleteView.as_view(),
|
||||
name="notification-transport-delete",
|
||||
),
|
||||
# Event Notification Rules
|
||||
path(
|
||||
"events/rules/create/",
|
||||
events_notifications_rules.NotificationRuleCreateView.as_view(),
|
||||
name="notification-rule-create",
|
||||
),
|
||||
path(
|
||||
"events/rules/<uuid:pk>/update/",
|
||||
events_notifications_rules.NotificationRuleUpdateView.as_view(),
|
||||
name="notification-rule-update",
|
||||
),
|
||||
path(
|
||||
"events/rules/<uuid:pk>/delete/",
|
||||
events_notifications_rules.NotificationRuleDeleteView.as_view(),
|
||||
name="notification-rule-delete",
|
||||
),
|
||||
]
|
80
authentik/admin/views/applications.py
Normal file
80
authentik/admin/views/applications.py
Normal file
@ -0,0 +1,80 @@
|
||||
"""authentik Application administration"""
|
||||
from typing import Any
|
||||
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import UpdateView
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
from guardian.shortcuts import get_objects_for_user
|
||||
|
||||
from authentik.admin.views.utils import DeleteMessageView
|
||||
from authentik.core.forms.applications import ApplicationForm
|
||||
from authentik.core.models import Application
|
||||
from authentik.lib.views import CreateAssignPermView
|
||||
|
||||
|
||||
class ApplicationCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
CreateAssignPermView,
|
||||
):
|
||||
"""Create new Application"""
|
||||
|
||||
model = Application
|
||||
form_class = ApplicationForm
|
||||
permission_required = "authentik_core.add_application"
|
||||
|
||||
success_url = "/"
|
||||
template_name = "generic/create.html"
|
||||
success_message = _("Successfully created Application")
|
||||
|
||||
def get_initial(self) -> dict[str, Any]:
|
||||
if "provider" in self.request.GET:
|
||||
try:
|
||||
initial_provider_pk = int(self.request.GET["provider"])
|
||||
except ValueError:
|
||||
return super().get_initial()
|
||||
providers = (
|
||||
get_objects_for_user(self.request.user, "authentik_core.view_provider")
|
||||
.filter(pk=initial_provider_pk)
|
||||
.select_subclasses()
|
||||
)
|
||||
if not providers.exists():
|
||||
return {}
|
||||
return {"provider": providers.first()}
|
||||
return super().get_initial()
|
||||
|
||||
|
||||
class ApplicationUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
UpdateView,
|
||||
):
|
||||
"""Update application"""
|
||||
|
||||
model = Application
|
||||
form_class = ApplicationForm
|
||||
permission_required = "authentik_core.change_application"
|
||||
|
||||
success_url = "/"
|
||||
template_name = "generic/update.html"
|
||||
success_message = _("Successfully updated Application")
|
||||
|
||||
|
||||
class ApplicationDeleteView(
|
||||
LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView
|
||||
):
|
||||
"""Delete application"""
|
||||
|
||||
model = Application
|
||||
permission_required = "authentik_core.delete_application"
|
||||
|
||||
success_url = "/"
|
||||
template_name = "generic/delete.html"
|
||||
success_message = _("Successfully deleted Application")
|
95
authentik/admin/views/certificate_key_pair.py
Normal file
95
authentik/admin/views/certificate_key_pair.py
Normal file
@ -0,0 +1,95 @@
|
||||
"""authentik CertificateKeyPair administration"""
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.http.response import HttpResponse
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import UpdateView
|
||||
from django.views.generic.edit import FormView
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import DeleteMessageView
|
||||
from authentik.crypto.builder import CertificateBuilder
|
||||
from authentik.crypto.forms import (
|
||||
CertificateKeyPairForm,
|
||||
CertificateKeyPairGenerateForm,
|
||||
)
|
||||
from authentik.crypto.models import CertificateKeyPair
|
||||
from authentik.lib.views import CreateAssignPermView
|
||||
|
||||
|
||||
class CertificateKeyPairCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
CreateAssignPermView,
|
||||
):
|
||||
"""Create new CertificateKeyPair"""
|
||||
|
||||
model = CertificateKeyPair
|
||||
form_class = CertificateKeyPairForm
|
||||
permission_required = "authentik_crypto.add_certificatekeypair"
|
||||
|
||||
template_name = "generic/create.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully created Certificate-Key Pair")
|
||||
|
||||
|
||||
class CertificateKeyPairGenerateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
FormView,
|
||||
):
|
||||
"""Generate new CertificateKeyPair"""
|
||||
|
||||
model = CertificateKeyPair
|
||||
form_class = CertificateKeyPairGenerateForm
|
||||
permission_required = "authentik_crypto.add_certificatekeypair"
|
||||
|
||||
template_name = "administration/certificatekeypair/generate.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully generated Certificate-Key Pair")
|
||||
|
||||
def form_valid(self, form: CertificateKeyPairGenerateForm) -> HttpResponse:
|
||||
builder = CertificateBuilder()
|
||||
builder.common_name = form.data["common_name"]
|
||||
builder.build(
|
||||
subject_alt_names=form.data.get("subject_alt_name", "").split(","),
|
||||
validity_days=int(form.data["validity_days"]),
|
||||
)
|
||||
builder.save()
|
||||
return super().form_valid(form)
|
||||
|
||||
|
||||
class CertificateKeyPairUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
UpdateView,
|
||||
):
|
||||
"""Update certificatekeypair"""
|
||||
|
||||
model = CertificateKeyPair
|
||||
form_class = CertificateKeyPairForm
|
||||
permission_required = "authentik_crypto.change_certificatekeypair"
|
||||
|
||||
template_name = "generic/update.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully updated Certificate-Key Pair")
|
||||
|
||||
|
||||
class CertificateKeyPairDeleteView(
|
||||
LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView
|
||||
):
|
||||
"""Delete certificatekeypair"""
|
||||
|
||||
model = CertificateKeyPair
|
||||
permission_required = "authentik_crypto.delete_certificatekeypair"
|
||||
|
||||
template_name = "generic/delete.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully deleted Certificate-Key Pair")
|
61
authentik/admin/views/events_notifications_rules.py
Normal file
61
authentik/admin/views/events_notifications_rules.py
Normal file
@ -0,0 +1,61 @@
|
||||
"""authentik NotificationRule administration"""
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import UpdateView
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import DeleteMessageView
|
||||
from authentik.events.forms import NotificationRuleForm
|
||||
from authentik.events.models import NotificationRule
|
||||
from authentik.lib.views import CreateAssignPermView
|
||||
|
||||
|
||||
class NotificationRuleCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
CreateAssignPermView,
|
||||
):
|
||||
"""Create new NotificationRule"""
|
||||
|
||||
model = NotificationRule
|
||||
form_class = NotificationRuleForm
|
||||
permission_required = "authentik_events.add_NotificationRule"
|
||||
|
||||
success_url = "/"
|
||||
template_name = "generic/create.html"
|
||||
success_message = _("Successfully created Notification Rule")
|
||||
|
||||
|
||||
class NotificationRuleUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
UpdateView,
|
||||
):
|
||||
"""Update application"""
|
||||
|
||||
model = NotificationRule
|
||||
form_class = NotificationRuleForm
|
||||
permission_required = "authentik_events.change_NotificationRule"
|
||||
|
||||
success_url = "/"
|
||||
template_name = "generic/update.html"
|
||||
success_message = _("Successfully updated Notification Rule")
|
||||
|
||||
|
||||
class NotificationRuleDeleteView(
|
||||
LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView
|
||||
):
|
||||
"""Delete application"""
|
||||
|
||||
model = NotificationRule
|
||||
permission_required = "authentik_events.delete_NotificationRule"
|
||||
|
||||
success_url = "/"
|
||||
template_name = "generic/delete.html"
|
||||
success_message = _("Successfully deleted Notification Rule")
|
58
authentik/admin/views/events_notifications_transports.py
Normal file
58
authentik/admin/views/events_notifications_transports.py
Normal file
@ -0,0 +1,58 @@
|
||||
"""authentik NotificationTransport administration"""
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import UpdateView
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import DeleteMessageView
|
||||
from authentik.events.forms import NotificationTransportForm
|
||||
from authentik.events.models import NotificationTransport
|
||||
from authentik.lib.views import CreateAssignPermView
|
||||
|
||||
|
||||
class NotificationTransportCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
CreateAssignPermView,
|
||||
):
|
||||
"""Create new NotificationTransport"""
|
||||
|
||||
model = NotificationTransport
|
||||
form_class = NotificationTransportForm
|
||||
permission_required = "authentik_events.add_notificationtransport"
|
||||
success_url = "/"
|
||||
template_name = "generic/create.html"
|
||||
success_message = _("Successfully created Notification Transport")
|
||||
|
||||
|
||||
class NotificationTransportUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
UpdateView,
|
||||
):
|
||||
"""Update application"""
|
||||
|
||||
model = NotificationTransport
|
||||
form_class = NotificationTransportForm
|
||||
permission_required = "authentik_events.change_notificationtransport"
|
||||
success_url = "/"
|
||||
template_name = "generic/update.html"
|
||||
success_message = _("Successfully updated Notification Transport")
|
||||
|
||||
|
||||
class NotificationTransportDeleteView(
|
||||
LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView
|
||||
):
|
||||
"""Delete application"""
|
||||
|
||||
model = NotificationTransport
|
||||
permission_required = "authentik_events.delete_notificationtransport"
|
||||
success_url = "/"
|
||||
template_name = "generic/delete.html"
|
||||
success_message = _("Successfully deleted Notification Transport")
|
138
authentik/admin/views/flows.py
Normal file
138
authentik/admin/views/flows.py
Normal file
@ -0,0 +1,138 @@
|
||||
"""authentik Flow administration"""
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.http import HttpRequest, HttpResponse, JsonResponse
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import DetailView, FormView, UpdateView
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import DeleteMessageView
|
||||
from authentik.flows.exceptions import FlowNonApplicableException
|
||||
from authentik.flows.forms import FlowForm, FlowImportForm
|
||||
from authentik.flows.models import Flow
|
||||
from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER
|
||||
from authentik.flows.transfer.common import DataclassEncoder
|
||||
from authentik.flows.transfer.exporter import FlowExporter
|
||||
from authentik.flows.transfer.importer import FlowImporter
|
||||
from authentik.flows.views import SESSION_KEY_PLAN, FlowPlanner
|
||||
from authentik.lib.utils.urls import redirect_with_qs
|
||||
from authentik.lib.views import CreateAssignPermView, bad_request_message
|
||||
|
||||
|
||||
class FlowCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
CreateAssignPermView,
|
||||
):
|
||||
"""Create new Flow"""
|
||||
|
||||
model = Flow
|
||||
form_class = FlowForm
|
||||
permission_required = "authentik_flows.add_flow"
|
||||
|
||||
template_name = "generic/create.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully created Flow")
|
||||
|
||||
|
||||
class FlowUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
UpdateView,
|
||||
):
|
||||
"""Update flow"""
|
||||
|
||||
model = Flow
|
||||
form_class = FlowForm
|
||||
permission_required = "authentik_flows.change_flow"
|
||||
|
||||
template_name = "generic/update.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully updated Flow")
|
||||
|
||||
|
||||
class FlowDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView):
|
||||
"""Delete flow"""
|
||||
|
||||
model = Flow
|
||||
permission_required = "authentik_flows.delete_flow"
|
||||
|
||||
template_name = "generic/delete.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully deleted Flow")
|
||||
|
||||
|
||||
class FlowDebugExecuteView(LoginRequiredMixin, PermissionRequiredMixin, DetailView):
|
||||
"""Debug exectue flow, setting the current user as pending user"""
|
||||
|
||||
model = Flow
|
||||
permission_required = "authentik_flows.view_flow"
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
def get(self, request: HttpRequest, pk: str) -> HttpResponse:
|
||||
"""Debug exectue flow, setting the current user as pending user"""
|
||||
flow: Flow = self.get_object()
|
||||
planner = FlowPlanner(flow)
|
||||
planner.use_cache = False
|
||||
try:
|
||||
plan = planner.plan(self.request, {PLAN_CONTEXT_PENDING_USER: request.user})
|
||||
self.request.session[SESSION_KEY_PLAN] = plan
|
||||
except FlowNonApplicableException as exc:
|
||||
return bad_request_message(
|
||||
request,
|
||||
_(
|
||||
"Flow not applicable to current user/request: %(messages)s"
|
||||
% {"messages": str(exc)}
|
||||
),
|
||||
)
|
||||
return redirect_with_qs(
|
||||
"authentik_flows:flow-executor-shell",
|
||||
self.request.GET,
|
||||
flow_slug=flow.slug,
|
||||
)
|
||||
|
||||
|
||||
class FlowImportView(LoginRequiredMixin, FormView):
|
||||
"""Import flow from JSON Export; only allowed for superusers
|
||||
as these flows can contain python code"""
|
||||
|
||||
form_class = FlowImportForm
|
||||
template_name = "administration/flow/import.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
if not request.user.is_superuser:
|
||||
return self.handle_no_permission()
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
|
||||
def form_valid(self, form: FlowImportForm) -> HttpResponse:
|
||||
importer = FlowImporter(form.cleaned_data["flow"].read().decode())
|
||||
successful = importer.apply()
|
||||
if not successful:
|
||||
messages.error(self.request, _("Failed to import flow."))
|
||||
else:
|
||||
messages.success(self.request, _("Successfully imported flow."))
|
||||
return super().form_valid(form)
|
||||
|
||||
|
||||
class FlowExportView(LoginRequiredMixin, PermissionRequiredMixin, DetailView):
|
||||
"""Export Flow"""
|
||||
|
||||
model = Flow
|
||||
permission_required = "authentik_flows.export_flow"
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
def get(self, request: HttpRequest, pk: str) -> HttpResponse:
|
||||
"""Debug exectue flow, setting the current user as pending user"""
|
||||
flow: Flow = self.get_object()
|
||||
exporter = FlowExporter(flow)
|
||||
response = JsonResponse(exporter.export(), encoder=DataclassEncoder, safe=False)
|
||||
response["Content-Disposition"] = f'attachment; filename="{flow.slug}.akflow"'
|
||||
return response
|
60
authentik/admin/views/groups.py
Normal file
60
authentik/admin/views/groups.py
Normal file
@ -0,0 +1,60 @@
|
||||
"""authentik Group administration"""
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import UpdateView
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import DeleteMessageView
|
||||
from authentik.core.forms.groups import GroupForm
|
||||
from authentik.core.models import Group
|
||||
from authentik.lib.views import CreateAssignPermView
|
||||
|
||||
|
||||
class GroupCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
CreateAssignPermView,
|
||||
):
|
||||
"""Create new Group"""
|
||||
|
||||
model = Group
|
||||
form_class = GroupForm
|
||||
permission_required = "authentik_core.add_group"
|
||||
|
||||
template_name = "generic/create.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully created Group")
|
||||
|
||||
|
||||
class GroupUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
UpdateView,
|
||||
):
|
||||
"""Update group"""
|
||||
|
||||
model = Group
|
||||
form_class = GroupForm
|
||||
permission_required = "authentik_core.change_group"
|
||||
|
||||
template_name = "generic/update.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully updated Group")
|
||||
|
||||
|
||||
class GroupDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView):
|
||||
"""Delete group"""
|
||||
|
||||
model = Group
|
||||
permission_required = "authentik_flows.delete_group"
|
||||
|
||||
template_name = "generic/delete.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully deleted Group")
|
66
authentik/admin/views/outposts.py
Normal file
66
authentik/admin/views/outposts.py
Normal file
@ -0,0 +1,66 @@
|
||||
"""authentik Outpost administration"""
|
||||
from dataclasses import asdict
|
||||
from typing import Any
|
||||
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import UpdateView
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import DeleteMessageView
|
||||
from authentik.lib.views import CreateAssignPermView
|
||||
from authentik.outposts.forms import OutpostForm
|
||||
from authentik.outposts.models import Outpost, OutpostConfig
|
||||
|
||||
|
||||
class OutpostCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
CreateAssignPermView,
|
||||
):
|
||||
"""Create new Outpost"""
|
||||
|
||||
model = Outpost
|
||||
form_class = OutpostForm
|
||||
permission_required = "authentik_outposts.add_outpost"
|
||||
success_url = "/"
|
||||
template_name = "generic/create.html"
|
||||
success_message = _("Successfully created Outpost")
|
||||
|
||||
def get_initial(self) -> dict[str, Any]:
|
||||
return {
|
||||
"_config": asdict(
|
||||
OutpostConfig(authentik_host=self.request.build_absolute_uri("/"))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
class OutpostUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
UpdateView,
|
||||
):
|
||||
"""Update outpost"""
|
||||
|
||||
model = Outpost
|
||||
form_class = OutpostForm
|
||||
permission_required = "authentik_outposts.change_outpost"
|
||||
success_url = "/"
|
||||
template_name = "generic/update.html"
|
||||
success_message = _("Successfully updated Outpost")
|
||||
|
||||
|
||||
class OutpostDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView):
|
||||
"""Delete outpost"""
|
||||
|
||||
model = Outpost
|
||||
permission_required = "authentik_outposts.delete_outpost"
|
||||
success_url = "/"
|
||||
template_name = "generic/delete.html"
|
||||
success_message = _("Successfully deleted Outpost")
|
61
authentik/admin/views/outposts_service_connections.py
Normal file
61
authentik/admin/views/outposts_service_connections.py
Normal file
@ -0,0 +1,61 @@
|
||||
"""authentik OutpostServiceConnection administration"""
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import gettext as _
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import (
|
||||
DeleteMessageView,
|
||||
InheritanceCreateView,
|
||||
InheritanceUpdateView,
|
||||
)
|
||||
from authentik.outposts.models import OutpostServiceConnection
|
||||
|
||||
|
||||
class OutpostServiceConnectionCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
InheritanceCreateView,
|
||||
):
|
||||
"""Create new OutpostServiceConnection"""
|
||||
|
||||
model = OutpostServiceConnection
|
||||
permission_required = "authentik_outposts.add_outpostserviceconnection"
|
||||
|
||||
template_name = "generic/create.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully created Outpost Service Connection")
|
||||
|
||||
|
||||
class OutpostServiceConnectionUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
InheritanceUpdateView,
|
||||
):
|
||||
"""Update outpostserviceconnection"""
|
||||
|
||||
model = OutpostServiceConnection
|
||||
permission_required = "authentik_outposts.change_outpostserviceconnection"
|
||||
|
||||
template_name = "generic/update.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully updated Outpost Service Connection")
|
||||
|
||||
|
||||
class OutpostServiceConnectionDeleteView(
|
||||
LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView
|
||||
):
|
||||
"""Delete outpostserviceconnection"""
|
||||
|
||||
model = OutpostServiceConnection
|
||||
permission_required = "authentik_outposts.delete_outpostserviceconnection"
|
||||
|
||||
template_name = "generic/delete.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully deleted Outpost Service Connection")
|
47
authentik/admin/views/overview.py
Normal file
47
authentik/admin/views/overview.py
Normal file
@ -0,0 +1,47 @@
|
||||
"""authentik administration overview"""
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.core.cache import cache
|
||||
from django.http.request import HttpRequest
|
||||
from django.http.response import HttpResponse
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import FormView
|
||||
from structlog.stdlib import get_logger
|
||||
|
||||
from authentik.admin.forms.overview import FlowCacheClearForm, PolicyCacheClearForm
|
||||
from authentik.admin.mixins import AdminRequiredMixin
|
||||
from authentik.core.api.applications import user_app_cache_key
|
||||
|
||||
LOGGER = get_logger()
|
||||
|
||||
|
||||
class PolicyCacheClearView(AdminRequiredMixin, SuccessMessageMixin, FormView):
|
||||
"""View to clear Policy cache"""
|
||||
|
||||
form_class = PolicyCacheClearForm
|
||||
success_url = "/"
|
||||
template_name = "generic/form_non_model.html"
|
||||
success_message = _("Successfully cleared Policy cache")
|
||||
|
||||
def post(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
||||
keys = cache.keys("policy_*")
|
||||
cache.delete_many(keys)
|
||||
LOGGER.debug("Cleared Policy cache", keys=len(keys))
|
||||
# Also delete user application cache
|
||||
keys = cache.keys(user_app_cache_key("*"))
|
||||
cache.delete_many(keys)
|
||||
return super().post(request, *args, **kwargs)
|
||||
|
||||
|
||||
class FlowCacheClearView(AdminRequiredMixin, SuccessMessageMixin, FormView):
|
||||
"""View to clear Flow cache"""
|
||||
|
||||
form_class = FlowCacheClearForm
|
||||
success_url = "/"
|
||||
template_name = "generic/form_non_model.html"
|
||||
success_message = _("Successfully cleared Flow cache")
|
||||
|
||||
def post(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
||||
keys = cache.keys("flow_*")
|
||||
cache.delete_many(keys)
|
||||
LOGGER.debug("Cleared flow cache", keys=len(keys))
|
||||
return super().post(request, *args, **kwargs)
|
104
authentik/admin/views/policies.py
Normal file
104
authentik/admin/views/policies.py
Normal file
@ -0,0 +1,104 @@
|
||||
"""authentik Policy administration"""
|
||||
from typing import Any
|
||||
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.http import HttpResponse
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import FormView
|
||||
from django.views.generic.detail import DetailView
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.forms.policies import PolicyTestForm
|
||||
from authentik.admin.views.utils import (
|
||||
DeleteMessageView,
|
||||
InheritanceCreateView,
|
||||
InheritanceUpdateView,
|
||||
)
|
||||
from authentik.policies.models import Policy, PolicyBinding
|
||||
from authentik.policies.process import PolicyProcess, PolicyRequest
|
||||
|
||||
|
||||
class PolicyCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
InheritanceCreateView,
|
||||
):
|
||||
"""Create new Policy"""
|
||||
|
||||
model = Policy
|
||||
permission_required = "authentik_policies.add_policy"
|
||||
|
||||
template_name = "generic/create.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully created Policy")
|
||||
|
||||
|
||||
class PolicyUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
InheritanceUpdateView,
|
||||
):
|
||||
"""Update policy"""
|
||||
|
||||
model = Policy
|
||||
permission_required = "authentik_policies.change_policy"
|
||||
|
||||
template_name = "generic/update.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully updated Policy")
|
||||
|
||||
|
||||
class PolicyDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView):
|
||||
"""Delete policy"""
|
||||
|
||||
model = Policy
|
||||
permission_required = "authentik_policies.delete_policy"
|
||||
|
||||
template_name = "generic/delete.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully deleted Policy")
|
||||
|
||||
|
||||
class PolicyTestView(LoginRequiredMixin, DetailView, PermissionRequiredMixin, FormView):
|
||||
"""View to test policy(s)"""
|
||||
|
||||
model = Policy
|
||||
form_class = PolicyTestForm
|
||||
permission_required = "authentik_policies.view_policy"
|
||||
template_name = "administration/policy/test.html"
|
||||
object = None
|
||||
|
||||
def get_object(self, queryset=None) -> Policy:
|
||||
return (
|
||||
Policy.objects.filter(pk=self.kwargs.get("pk")).select_subclasses().first()
|
||||
)
|
||||
|
||||
def get_context_data(self, **kwargs: Any) -> dict[str, Any]:
|
||||
kwargs["policy"] = self.get_object()
|
||||
return super().get_context_data(**kwargs)
|
||||
|
||||
def post(self, *args, **kwargs) -> HttpResponse:
|
||||
self.object = self.get_object()
|
||||
return super().post(*args, **kwargs)
|
||||
|
||||
def form_valid(self, form: PolicyTestForm) -> HttpResponse:
|
||||
policy = self.get_object()
|
||||
user = form.cleaned_data.get("user")
|
||||
|
||||
p_request = PolicyRequest(user)
|
||||
p_request.debug = True
|
||||
p_request.set_http_request(self.request)
|
||||
p_request.context = form.cleaned_data.get("context", {})
|
||||
|
||||
proc = PolicyProcess(PolicyBinding(policy=policy), p_request, None)
|
||||
result = proc.execute()
|
||||
context = self.get_context_data(form=form)
|
||||
context["result"] = result
|
||||
return self.render_to_response(context)
|
81
authentik/admin/views/policies_bindings.py
Normal file
81
authentik/admin/views/policies_bindings.py
Normal file
@ -0,0 +1,81 @@
|
||||
"""authentik PolicyBinding administration"""
|
||||
from typing import Any
|
||||
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.db.models import Max
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import UpdateView
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import DeleteMessageView
|
||||
from authentik.lib.views import CreateAssignPermView
|
||||
from authentik.policies.forms import PolicyBindingForm
|
||||
from authentik.policies.models import PolicyBinding, PolicyBindingModel
|
||||
|
||||
|
||||
class PolicyBindingCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
CreateAssignPermView,
|
||||
):
|
||||
"""Create new PolicyBinding"""
|
||||
|
||||
model = PolicyBinding
|
||||
permission_required = "authentik_policies.add_policybinding"
|
||||
form_class = PolicyBindingForm
|
||||
|
||||
template_name = "generic/create.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully created PolicyBinding")
|
||||
|
||||
def get_initial(self) -> dict[str, Any]:
|
||||
if "target" in self.request.GET:
|
||||
initial_target_pk = self.request.GET["target"]
|
||||
targets = PolicyBindingModel.objects.filter(
|
||||
pk=initial_target_pk
|
||||
).select_subclasses()
|
||||
if not targets.exists():
|
||||
return {}
|
||||
max_order = PolicyBinding.objects.filter(target=targets.first()).aggregate(
|
||||
Max("order")
|
||||
)["order__max"]
|
||||
if not isinstance(max_order, int):
|
||||
max_order = -1
|
||||
return {"target": targets.first(), "order": max_order + 1}
|
||||
return super().get_initial()
|
||||
|
||||
|
||||
class PolicyBindingUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
UpdateView,
|
||||
):
|
||||
"""Update policybinding"""
|
||||
|
||||
model = PolicyBinding
|
||||
permission_required = "authentik_policies.change_policybinding"
|
||||
form_class = PolicyBindingForm
|
||||
|
||||
template_name = "generic/update.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully updated PolicyBinding")
|
||||
|
||||
|
||||
class PolicyBindingDeleteView(
|
||||
LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView
|
||||
):
|
||||
"""Delete policybinding"""
|
||||
|
||||
model = PolicyBinding
|
||||
permission_required = "authentik_policies.delete_policybinding"
|
||||
|
||||
template_name = "generic/delete.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully deleted PolicyBinding")
|
105
authentik/admin/views/property_mappings.py
Normal file
105
authentik/admin/views/property_mappings.py
Normal file
@ -0,0 +1,105 @@
|
||||
"""authentik PropertyMapping administration"""
|
||||
from json import dumps
|
||||
from typing import Any
|
||||
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.http import HttpResponse
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import FormView
|
||||
from django.views.generic.detail import DetailView
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.forms.policies import PolicyTestForm
|
||||
from authentik.admin.views.utils import (
|
||||
DeleteMessageView,
|
||||
InheritanceCreateView,
|
||||
InheritanceUpdateView,
|
||||
)
|
||||
from authentik.core.models import PropertyMapping
|
||||
|
||||
|
||||
class PropertyMappingCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
InheritanceCreateView,
|
||||
):
|
||||
"""Create new PropertyMapping"""
|
||||
|
||||
model = PropertyMapping
|
||||
permission_required = "authentik_core.add_propertymapping"
|
||||
success_url = "/"
|
||||
template_name = "generic/create.html"
|
||||
success_message = _("Successfully created Property Mapping")
|
||||
|
||||
|
||||
class PropertyMappingUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
InheritanceUpdateView,
|
||||
):
|
||||
"""Update property_mapping"""
|
||||
|
||||
model = PropertyMapping
|
||||
permission_required = "authentik_core.change_propertymapping"
|
||||
success_url = "/"
|
||||
template_name = "generic/update.html"
|
||||
success_message = _("Successfully updated Property Mapping")
|
||||
|
||||
|
||||
class PropertyMappingDeleteView(
|
||||
LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView
|
||||
):
|
||||
"""Delete property_mapping"""
|
||||
|
||||
model = PropertyMapping
|
||||
permission_required = "authentik_core.delete_propertymapping"
|
||||
success_url = "/"
|
||||
template_name = "generic/delete.html"
|
||||
success_message = _("Successfully deleted Property Mapping")
|
||||
|
||||
|
||||
class PropertyMappingTestView(
|
||||
LoginRequiredMixin, DetailView, PermissionRequiredMixin, FormView
|
||||
):
|
||||
"""View to test property mappings"""
|
||||
|
||||
model = PropertyMapping
|
||||
form_class = PolicyTestForm
|
||||
permission_required = "authentik_core.view_propertymapping"
|
||||
template_name = "administration/property_mapping/test.html"
|
||||
object = None
|
||||
|
||||
def get_object(self, queryset=None) -> PropertyMapping:
|
||||
return (
|
||||
PropertyMapping.objects.filter(pk=self.kwargs.get("pk"))
|
||||
.select_subclasses()
|
||||
.first()
|
||||
)
|
||||
|
||||
def get_context_data(self, **kwargs: Any) -> dict[str, Any]:
|
||||
kwargs["property_mapping"] = self.get_object()
|
||||
return super().get_context_data(**kwargs)
|
||||
|
||||
def post(self, *args, **kwargs) -> HttpResponse:
|
||||
self.object = self.get_object()
|
||||
return super().post(*args, **kwargs)
|
||||
|
||||
def form_valid(self, form: PolicyTestForm) -> HttpResponse:
|
||||
mapping = self.get_object()
|
||||
user = form.cleaned_data.get("user")
|
||||
|
||||
context = self.get_context_data(form=form)
|
||||
try:
|
||||
result = mapping.evaluate(
|
||||
user, self.request, **form.cleaned_data.get("context", {})
|
||||
)
|
||||
context["result"] = dumps(result, indent=4)
|
||||
except Exception as exc: # pylint: disable=broad-except
|
||||
context["result"] = str(exc)
|
||||
return self.render_to_response(context)
|
57
authentik/admin/views/providers.py
Normal file
57
authentik/admin/views/providers.py
Normal file
@ -0,0 +1,57 @@
|
||||
"""authentik Provider administration"""
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.utils.translation import gettext as _
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import (
|
||||
DeleteMessageView,
|
||||
InheritanceCreateView,
|
||||
InheritanceUpdateView,
|
||||
)
|
||||
from authentik.core.models import Provider
|
||||
|
||||
|
||||
class ProviderCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
InheritanceCreateView,
|
||||
):
|
||||
"""Create new Provider"""
|
||||
|
||||
model = Provider
|
||||
permission_required = "authentik_core.add_provider"
|
||||
success_url = "/"
|
||||
template_name = "generic/create.html"
|
||||
success_message = _("Successfully created Provider")
|
||||
|
||||
|
||||
class ProviderUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
InheritanceUpdateView,
|
||||
):
|
||||
"""Update provider"""
|
||||
|
||||
model = Provider
|
||||
permission_required = "authentik_core.change_provider"
|
||||
success_url = "/"
|
||||
template_name = "generic/update.html"
|
||||
success_message = _("Successfully updated Provider")
|
||||
|
||||
|
||||
class ProviderDeleteView(
|
||||
LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView
|
||||
):
|
||||
"""Delete provider"""
|
||||
|
||||
model = Provider
|
||||
permission_required = "authentik_core.delete_provider"
|
||||
success_url = "/"
|
||||
template_name = "generic/delete.html"
|
||||
success_message = _("Successfully deleted Provider")
|
58
authentik/admin/views/sources.py
Normal file
58
authentik/admin/views/sources.py
Normal file
@ -0,0 +1,58 @@
|
||||
"""authentik Source administration"""
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.utils.translation import gettext as _
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import (
|
||||
DeleteMessageView,
|
||||
InheritanceCreateView,
|
||||
InheritanceUpdateView,
|
||||
)
|
||||
from authentik.core.models import Source
|
||||
|
||||
|
||||
class SourceCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
InheritanceCreateView,
|
||||
):
|
||||
"""Create new Source"""
|
||||
|
||||
model = Source
|
||||
permission_required = "authentik_core.add_source"
|
||||
|
||||
success_url = "/"
|
||||
template_name = "generic/create.html"
|
||||
success_message = _("Successfully created Source")
|
||||
|
||||
|
||||
class SourceUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
InheritanceUpdateView,
|
||||
):
|
||||
"""Update source"""
|
||||
|
||||
model = Source
|
||||
permission_required = "authentik_core.change_source"
|
||||
|
||||
success_url = "/"
|
||||
template_name = "generic/update.html"
|
||||
success_message = _("Successfully updated Source")
|
||||
|
||||
|
||||
class SourceDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView):
|
||||
"""Delete source"""
|
||||
|
||||
model = Source
|
||||
permission_required = "authentik_core.delete_source"
|
||||
|
||||
success_url = "/"
|
||||
template_name = "generic/delete.html"
|
||||
success_message = _("Successfully deleted Source")
|
57
authentik/admin/views/stages.py
Normal file
57
authentik/admin/views/stages.py
Normal file
@ -0,0 +1,57 @@
|
||||
"""authentik Stage administration"""
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import gettext as _
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import (
|
||||
DeleteMessageView,
|
||||
InheritanceCreateView,
|
||||
InheritanceUpdateView,
|
||||
)
|
||||
from authentik.flows.models import Stage
|
||||
|
||||
|
||||
class StageCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
InheritanceCreateView,
|
||||
):
|
||||
"""Create new Stage"""
|
||||
|
||||
model = Stage
|
||||
template_name = "generic/create.html"
|
||||
permission_required = "authentik_flows.add_stage"
|
||||
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully created Stage")
|
||||
|
||||
|
||||
class StageUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
InheritanceUpdateView,
|
||||
):
|
||||
"""Update stage"""
|
||||
|
||||
model = Stage
|
||||
permission_required = "authentik_flows.update_application"
|
||||
template_name = "generic/update.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully updated Stage")
|
||||
|
||||
|
||||
class StageDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView):
|
||||
"""Delete stage"""
|
||||
|
||||
model = Stage
|
||||
template_name = "generic/delete.html"
|
||||
permission_required = "authentik_flows.delete_stage"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully deleted Stage")
|
79
authentik/admin/views/stages_bindings.py
Normal file
79
authentik/admin/views/stages_bindings.py
Normal file
@ -0,0 +1,79 @@
|
||||
"""authentik StageBinding administration"""
|
||||
from typing import Any
|
||||
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.db.models import Max
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import UpdateView
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import DeleteMessageView
|
||||
from authentik.flows.forms import FlowStageBindingForm
|
||||
from authentik.flows.models import Flow, FlowStageBinding
|
||||
from authentik.lib.views import CreateAssignPermView
|
||||
|
||||
|
||||
class StageBindingCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
CreateAssignPermView,
|
||||
):
|
||||
"""Create new StageBinding"""
|
||||
|
||||
model = FlowStageBinding
|
||||
permission_required = "authentik_flows.add_flowstagebinding"
|
||||
form_class = FlowStageBindingForm
|
||||
|
||||
template_name = "generic/create.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully created StageBinding")
|
||||
|
||||
def get_initial(self) -> dict[str, Any]:
|
||||
if "target" in self.request.GET:
|
||||
initial_target_pk = self.request.GET["target"]
|
||||
targets = Flow.objects.filter(pk=initial_target_pk).select_subclasses()
|
||||
if not targets.exists():
|
||||
return {}
|
||||
max_order = FlowStageBinding.objects.filter(
|
||||
target=targets.first()
|
||||
).aggregate(Max("order"))["order__max"]
|
||||
if not isinstance(max_order, int):
|
||||
max_order = -1
|
||||
return {"target": targets.first(), "order": max_order + 1}
|
||||
return super().get_initial()
|
||||
|
||||
|
||||
class StageBindingUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
UpdateView,
|
||||
):
|
||||
"""Update FlowStageBinding"""
|
||||
|
||||
model = FlowStageBinding
|
||||
permission_required = "authentik_flows.change_flowstagebinding"
|
||||
form_class = FlowStageBindingForm
|
||||
|
||||
template_name = "generic/update.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully updated StageBinding")
|
||||
|
||||
|
||||
class StageBindingDeleteView(
|
||||
LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView
|
||||
):
|
||||
"""Delete FlowStageBinding"""
|
||||
|
||||
model = FlowStageBinding
|
||||
permission_required = "authentik_flows.delete_flowstagebinding"
|
||||
|
||||
template_name = "generic/delete.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully deleted FlowStageBinding")
|
51
authentik/admin/views/stages_invitations.py
Normal file
51
authentik/admin/views/stages_invitations.py
Normal file
@ -0,0 +1,51 @@
|
||||
"""authentik Invitation administration"""
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import gettext as _
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import DeleteMessageView
|
||||
from authentik.lib.views import CreateAssignPermView
|
||||
from authentik.stages.invitation.forms import InvitationForm
|
||||
from authentik.stages.invitation.models import Invitation
|
||||
|
||||
|
||||
class InvitationCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
CreateAssignPermView,
|
||||
):
|
||||
"""Create new Invitation"""
|
||||
|
||||
model = Invitation
|
||||
form_class = InvitationForm
|
||||
permission_required = "authentik_stages_invitation.add_invitation"
|
||||
|
||||
template_name = "generic/create.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully created Invitation")
|
||||
|
||||
def form_valid(self, form):
|
||||
obj = form.save(commit=False)
|
||||
obj.created_by = self.request.user
|
||||
obj.save()
|
||||
return HttpResponseRedirect(self.success_url)
|
||||
|
||||
|
||||
class InvitationDeleteView(
|
||||
LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView
|
||||
):
|
||||
"""Delete invitation"""
|
||||
|
||||
model = Invitation
|
||||
permission_required = "authentik_stages_invitation.delete_invitation"
|
||||
|
||||
template_name = "generic/delete.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully deleted Invitation")
|
60
authentik/admin/views/stages_prompts.py
Normal file
60
authentik/admin/views/stages_prompts.py
Normal file
@ -0,0 +1,60 @@
|
||||
"""authentik Prompt administration"""
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import UpdateView
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import DeleteMessageView
|
||||
from authentik.lib.views import CreateAssignPermView
|
||||
from authentik.stages.prompt.forms import PromptAdminForm
|
||||
from authentik.stages.prompt.models import Prompt
|
||||
|
||||
|
||||
class PromptCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
CreateAssignPermView,
|
||||
):
|
||||
"""Create new Prompt"""
|
||||
|
||||
model = Prompt
|
||||
form_class = PromptAdminForm
|
||||
permission_required = "authentik_stages_prompt.add_prompt"
|
||||
|
||||
template_name = "generic/create.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully created Prompt")
|
||||
|
||||
|
||||
class PromptUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
UpdateView,
|
||||
):
|
||||
"""Update prompt"""
|
||||
|
||||
model = Prompt
|
||||
form_class = PromptAdminForm
|
||||
permission_required = "authentik_stages_prompt.change_prompt"
|
||||
|
||||
template_name = "generic/update.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully updated Prompt")
|
||||
|
||||
|
||||
class PromptDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView):
|
||||
"""Delete prompt"""
|
||||
|
||||
model = Prompt
|
||||
permission_required = "authentik_stages_prompt.delete_prompt"
|
||||
|
||||
template_name = "generic/delete.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully deleted Prompt")
|
19
authentik/admin/views/tokens.py
Normal file
19
authentik/admin/views/tokens.py
Normal file
@ -0,0 +1,19 @@
|
||||
"""authentik Token administration"""
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.translation import gettext as _
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.views.utils import DeleteMessageView
|
||||
from authentik.core.models import Token
|
||||
|
||||
|
||||
class TokenDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView):
|
||||
"""Delete token"""
|
||||
|
||||
model = Token
|
||||
permission_required = "authentik_core.delete_token"
|
||||
|
||||
template_name = "generic/delete.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully deleted Token")
|
131
authentik/admin/views/users.py
Normal file
131
authentik/admin/views/users.py
Normal file
@ -0,0 +1,131 @@
|
||||
"""authentik User administration"""
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.mixins import (
|
||||
PermissionRequiredMixin as DjangoPermissionRequiredMixin,
|
||||
)
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
from django.http.response import HttpResponseRedirect
|
||||
from django.shortcuts import redirect
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils.http import urlencode
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import DetailView, UpdateView
|
||||
from guardian.mixins import PermissionRequiredMixin
|
||||
|
||||
from authentik.admin.forms.users import UserForm
|
||||
from authentik.admin.views.utils import DeleteMessageView
|
||||
from authentik.core.models import Token, User
|
||||
from authentik.lib.views import CreateAssignPermView
|
||||
|
||||
|
||||
class UserCreateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
DjangoPermissionRequiredMixin,
|
||||
CreateAssignPermView,
|
||||
):
|
||||
"""Create user"""
|
||||
|
||||
model = User
|
||||
form_class = UserForm
|
||||
permission_required = "authentik_core.add_user"
|
||||
|
||||
template_name = "generic/create.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully created User")
|
||||
|
||||
|
||||
class UserUpdateView(
|
||||
SuccessMessageMixin,
|
||||
LoginRequiredMixin,
|
||||
PermissionRequiredMixin,
|
||||
UpdateView,
|
||||
):
|
||||
"""Update user"""
|
||||
|
||||
model = User
|
||||
form_class = UserForm
|
||||
permission_required = "authentik_core.change_user"
|
||||
|
||||
# By default the object's name is user which is used by other checks
|
||||
context_object_name = "object"
|
||||
template_name = "generic/update.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully updated User")
|
||||
|
||||
|
||||
class UserDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView):
|
||||
"""Delete user"""
|
||||
|
||||
model = User
|
||||
permission_required = "authentik_core.delete_user"
|
||||
|
||||
# By default the object's name is user which is used by other checks
|
||||
context_object_name = "object"
|
||||
template_name = "generic/delete.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully deleted User")
|
||||
|
||||
|
||||
class UserDisableView(LoginRequiredMixin, PermissionRequiredMixin, DeleteMessageView):
|
||||
"""Disable user"""
|
||||
|
||||
object: User
|
||||
|
||||
model = User
|
||||
permission_required = "authentik_core.update_user"
|
||||
|
||||
# By default the object's name is user which is used by other checks
|
||||
context_object_name = "object"
|
||||
template_name = "administration/user/disable.html"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully disabled User")
|
||||
|
||||
def delete(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
||||
self.object: User = self.get_object()
|
||||
success_url = self.get_success_url()
|
||||
self.object.is_active = False
|
||||
self.object.save()
|
||||
return HttpResponseRedirect(success_url)
|
||||
|
||||
|
||||
class UserEnableView(LoginRequiredMixin, PermissionRequiredMixin, DetailView):
|
||||
"""Enable user"""
|
||||
|
||||
object: User
|
||||
|
||||
model = User
|
||||
permission_required = "authentik_core.update_user"
|
||||
|
||||
# By default the object's name is user which is used by other checks
|
||||
context_object_name = "object"
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
success_message = _("Successfully enabled User")
|
||||
|
||||
def get(self, request: HttpRequest, *args, **kwargs):
|
||||
self.object: User = self.get_object()
|
||||
self.object.is_active = True
|
||||
self.object.save()
|
||||
return HttpResponseRedirect(self.success_url)
|
||||
|
||||
|
||||
class UserPasswordResetView(LoginRequiredMixin, PermissionRequiredMixin, DetailView):
|
||||
"""Get Password reset link for user"""
|
||||
|
||||
model = User
|
||||
permission_required = "authentik_core.reset_user_password"
|
||||
|
||||
def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
||||
"""Create token for user and return link"""
|
||||
super().get(request, *args, **kwargs)
|
||||
token, __ = Token.objects.get_or_create(
|
||||
identifier="password-reset-temp", user=self.object
|
||||
)
|
||||
querystring = urlencode({"token": token.key})
|
||||
link = request.build_absolute_uri(
|
||||
reverse_lazy("authentik_flows:default-recovery") + f"?{querystring}"
|
||||
)
|
||||
messages.success(request, _("Password reset link: %(link)s" % {"link": link}))
|
||||
return redirect("/")
|
63
authentik/admin/views/utils.py
Normal file
63
authentik/admin/views/utils.py
Normal file
@ -0,0 +1,63 @@
|
||||
"""authentik admin util views"""
|
||||
from typing import Any
|
||||
|
||||
from django.contrib import messages
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.http import Http404
|
||||
from django.urls import reverse_lazy
|
||||
from django.views.generic import DeleteView, UpdateView
|
||||
|
||||
from authentik.lib.utils.reflection import all_subclasses
|
||||
from authentik.lib.views import CreateAssignPermView
|
||||
|
||||
|
||||
class DeleteMessageView(SuccessMessageMixin, DeleteView):
|
||||
"""DeleteView which shows `self.success_message` on successful deletion"""
|
||||
|
||||
success_url = reverse_lazy("authentik_core:shell")
|
||||
|
||||
def delete(self, request, *args, **kwargs):
|
||||
messages.success(self.request, self.success_message)
|
||||
return super().delete(request, *args, **kwargs)
|
||||
|
||||
|
||||
class InheritanceCreateView(CreateAssignPermView):
|
||||
"""CreateView for objects using InheritanceManager"""
|
||||
|
||||
def get_form_class(self):
|
||||
provider_type = self.request.GET.get("type")
|
||||
try:
|
||||
model = next(
|
||||
x for x in all_subclasses(self.model) if x.__name__ == provider_type
|
||||
)
|
||||
except StopIteration as exc:
|
||||
raise Http404 from exc
|
||||
return model().form
|
||||
|
||||
def get_context_data(self, **kwargs: Any) -> dict[str, Any]:
|
||||
kwargs = super().get_context_data(**kwargs)
|
||||
form_cls = self.get_form_class()
|
||||
if hasattr(form_cls, "template_name"):
|
||||
kwargs["base_template"] = form_cls.template_name
|
||||
return kwargs
|
||||
|
||||
|
||||
class InheritanceUpdateView(UpdateView):
|
||||
"""UpdateView for objects using InheritanceManager"""
|
||||
|
||||
def get_context_data(self, **kwargs: Any) -> dict[str, Any]:
|
||||
kwargs = super().get_context_data(**kwargs)
|
||||
form_cls = self.get_form_class()
|
||||
if hasattr(form_cls, "template_name"):
|
||||
kwargs["base_template"] = form_cls.template_name
|
||||
return kwargs
|
||||
|
||||
def get_form_class(self):
|
||||
return self.get_object().form
|
||||
|
||||
def get_object(self, queryset=None):
|
||||
return (
|
||||
self.model.objects.filter(pk=self.kwargs.get("pk"))
|
||||
.select_subclasses()
|
||||
.first()
|
||||
)
|
12
authentik/api/apps.py
Normal file
12
authentik/api/apps.py
Normal file
@ -0,0 +1,12 @@
|
||||
"""authentik API AppConfig"""
|
||||
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AuthentikAPIConfig(AppConfig):
|
||||
"""authentik API Config"""
|
||||
|
||||
name = "authentik.api"
|
||||
label = "authentik_api"
|
||||
mountpoint = "api/"
|
||||
verbose_name = "authentik API"
|
58
authentik/api/auth.py
Normal file
58
authentik/api/auth.py
Normal file
@ -0,0 +1,58 @@
|
||||
"""API Authentication"""
|
||||
from base64 import b64decode
|
||||
from binascii import Error
|
||||
from typing import Any, Optional, Union
|
||||
|
||||
from rest_framework.authentication import BaseAuthentication, get_authorization_header
|
||||
from rest_framework.request import Request
|
||||
from structlog.stdlib import get_logger
|
||||
|
||||
from authentik.core.models import Token, TokenIntents, User
|
||||
|
||||
LOGGER = get_logger()
|
||||
|
||||
|
||||
def token_from_header(raw_header: bytes) -> Optional[Token]:
|
||||
"""raw_header in the Format of `Basic dGVzdDp0ZXN0`"""
|
||||
auth_credentials = raw_header.decode()
|
||||
# Accept headers with Type format and without
|
||||
if " " in auth_credentials:
|
||||
auth_type, auth_credentials = auth_credentials.split()
|
||||
if auth_type.lower() != "basic":
|
||||
LOGGER.debug(
|
||||
"Unsupported authentication type, denying", type=auth_type.lower()
|
||||
)
|
||||
return None
|
||||
try:
|
||||
auth_credentials = b64decode(auth_credentials.encode()).decode()
|
||||
except (UnicodeDecodeError, Error):
|
||||
return None
|
||||
# Accept credentials with username and without
|
||||
if ":" in auth_credentials:
|
||||
_, password = auth_credentials.split(":")
|
||||
else:
|
||||
password = auth_credentials
|
||||
if password == "": # nosec
|
||||
return None
|
||||
tokens = Token.filter_not_expired(key=password, intent=TokenIntents.INTENT_API)
|
||||
if not tokens.exists():
|
||||
LOGGER.debug("Token not found")
|
||||
return None
|
||||
return tokens.first()
|
||||
|
||||
|
||||
class AuthentikTokenAuthentication(BaseAuthentication):
|
||||
"""Token-based authentication using HTTP Basic authentication"""
|
||||
|
||||
def authenticate(self, request: Request) -> Union[tuple[User, Any], None]:
|
||||
"""Token-based authentication using HTTP Basic authentication"""
|
||||
auth = get_authorization_header(request)
|
||||
|
||||
token = token_from_header(auth)
|
||||
if not token:
|
||||
return None
|
||||
|
||||
return (token.user, None)
|
||||
|
||||
def authenticate_header(self, request: Request) -> str:
|
||||
return 'Basic realm="authentik"'
|
32
authentik/api/pagination.py
Normal file
32
authentik/api/pagination.py
Normal file
@ -0,0 +1,32 @@
|
||||
"""Pagination which includes total pages and current page"""
|
||||
from rest_framework import pagination
|
||||
from rest_framework.response import Response
|
||||
|
||||
|
||||
class Pagination(pagination.PageNumberPagination):
|
||||
"""Pagination which includes total pages and current page"""
|
||||
|
||||
page_query_param = "page"
|
||||
page_size_query_param = "page_size"
|
||||
|
||||
def get_paginated_response(self, data):
|
||||
previous_page_number = 0
|
||||
if self.page.has_previous():
|
||||
previous_page_number = self.page.previous_page_number()
|
||||
next_page_number = 0
|
||||
if self.page.has_next():
|
||||
next_page_number = self.page.next_page_number()
|
||||
return Response(
|
||||
{
|
||||
"pagination": {
|
||||
"next": next_page_number,
|
||||
"previous": previous_page_number,
|
||||
"count": self.page.paginator.count,
|
||||
"current": self.page.number,
|
||||
"total_pages": self.page.paginator.num_pages,
|
||||
"start_index": self.page.start_index(),
|
||||
"end_index": self.page.end_index(),
|
||||
},
|
||||
"results": data,
|
||||
}
|
||||
)
|
31
authentik/api/templates/rest_framework/api.html
Normal file
31
authentik/api/templates/rest_framework/api.html
Normal file
@ -0,0 +1,31 @@
|
||||
{% extends "rest_framework/base.html" %}
|
||||
|
||||
{% block title %}{% if name %}{{ name }} – {% endif %}authentik{% endblock %}
|
||||
|
||||
{% block branding %}
|
||||
<span class='navbar-brand'>
|
||||
authentik
|
||||
</span>
|
||||
{% endblock %}
|
||||
|
||||
{% block style %}
|
||||
{{ block.super }}
|
||||
<style>
|
||||
body {
|
||||
background-color: #18191a;
|
||||
color: #fafafa;
|
||||
}
|
||||
.prettyprint {
|
||||
background-color: #1c1e21;
|
||||
color: #fafafa;
|
||||
border: 1px solid #2b2e33;
|
||||
}
|
||||
.pln {
|
||||
color: #fafafa;
|
||||
}
|
||||
.well {
|
||||
background-color: #1c1e21;
|
||||
border: 1px solid #2b2e33;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
37
authentik/api/tests.py
Normal file
37
authentik/api/tests.py
Normal file
@ -0,0 +1,37 @@
|
||||
"""Test API Authentication"""
|
||||
from base64 import b64encode
|
||||
|
||||
from django.test import TestCase
|
||||
from guardian.shortcuts import get_anonymous_user
|
||||
|
||||
from authentik.api.auth import token_from_header
|
||||
from authentik.core.models import Token, TokenIntents
|
||||
|
||||
|
||||
class TestAPIAuth(TestCase):
|
||||
"""Test API Authentication"""
|
||||
|
||||
def test_valid(self):
|
||||
"""Test valid token"""
|
||||
token = Token.objects.create(
|
||||
intent=TokenIntents.INTENT_API, user=get_anonymous_user()
|
||||
)
|
||||
auth = b64encode(f":{token.key}".encode()).decode()
|
||||
self.assertEqual(token_from_header(f"Basic {auth}".encode()), token)
|
||||
|
||||
def test_invalid_type(self):
|
||||
"""Test invalid type"""
|
||||
self.assertIsNone(token_from_header("foo bar".encode()))
|
||||
|
||||
def test_invalid_decode(self):
|
||||
"""Test invalid bas64"""
|
||||
self.assertIsNone(token_from_header("Basic bar".encode()))
|
||||
|
||||
def test_invalid_empty_password(self):
|
||||
"""Test invalid with empty password"""
|
||||
self.assertIsNone(token_from_header("Basic :".encode()))
|
||||
|
||||
def test_invalid_no_token(self):
|
||||
"""Test invalid with no token"""
|
||||
auth = b64encode(":abc".encode()).decode()
|
||||
self.assertIsNone(token_from_header(f"Basic :{auth}".encode()))
|
8
authentik/api/urls.py
Normal file
8
authentik/api/urls.py
Normal file
@ -0,0 +1,8 @@
|
||||
"""authentik api urls"""
|
||||
from django.urls import include, path
|
||||
|
||||
from authentik.api.v2.urls import urlpatterns as v2_urls
|
||||
|
||||
urlpatterns = [
|
||||
path("v2beta/", include(v2_urls)),
|
||||
]
|
47
authentik/api/v2/config.py
Normal file
47
authentik/api/v2/config.py
Normal file
@ -0,0 +1,47 @@
|
||||
"""core Configs API"""
|
||||
from django.db.models import Model
|
||||
from drf_yasg2.utils import swagger_auto_schema
|
||||
from rest_framework.permissions import AllowAny
|
||||
from rest_framework.request import Request
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.serializers import ReadOnlyField, Serializer
|
||||
from rest_framework.viewsets import ViewSet
|
||||
|
||||
from authentik.lib.config import CONFIG
|
||||
|
||||
|
||||
class ConfigSerializer(Serializer):
|
||||
"""Serialize authentik Config into DRF Object"""
|
||||
|
||||
branding_logo = ReadOnlyField()
|
||||
branding_title = ReadOnlyField()
|
||||
|
||||
error_reporting_enabled = ReadOnlyField()
|
||||
error_reporting_environment = ReadOnlyField()
|
||||
error_reporting_send_pii = ReadOnlyField()
|
||||
|
||||
def create(self, validated_data: dict) -> Model:
|
||||
raise NotImplementedError
|
||||
|
||||
def update(self, instance: Model, validated_data: dict) -> Model:
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class ConfigsViewSet(ViewSet):
|
||||
"""Read-only view set that returns the current session's Configs"""
|
||||
|
||||
permission_classes = [AllowAny]
|
||||
|
||||
@swagger_auto_schema(responses={200: ConfigSerializer(many=True)})
|
||||
def list(self, request: Request) -> Response:
|
||||
"""Retrive public configuration options"""
|
||||
config = ConfigSerializer(
|
||||
{
|
||||
"branding_logo": CONFIG.y("authentik.branding.logo"),
|
||||
"branding_title": CONFIG.y("authentik.branding.title"),
|
||||
"error_reporting_enabled": CONFIG.y("error_reporting.enabled"),
|
||||
"error_reporting_environment": CONFIG.y("error_reporting.environment"),
|
||||
"error_reporting_send_pii": CONFIG.y("error_reporting.send_pii"),
|
||||
}
|
||||
)
|
||||
return Response(config.data)
|
37
authentik/api/v2/messages.py
Normal file
37
authentik/api/v2/messages.py
Normal file
@ -0,0 +1,37 @@
|
||||
"""core messages API"""
|
||||
from django.contrib.messages import get_messages
|
||||
from django.db.models import Model
|
||||
from drf_yasg2.utils import swagger_auto_schema
|
||||
from rest_framework.permissions import AllowAny
|
||||
from rest_framework.request import Request
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.serializers import ReadOnlyField, Serializer
|
||||
from rest_framework.viewsets import ViewSet
|
||||
|
||||
|
||||
class MessageSerializer(Serializer):
|
||||
"""Serialize Django Message into DRF Object"""
|
||||
|
||||
message = ReadOnlyField()
|
||||
level = ReadOnlyField()
|
||||
tags = ReadOnlyField()
|
||||
extra_tags = ReadOnlyField()
|
||||
level_tag = ReadOnlyField()
|
||||
|
||||
def create(self, validated_data: dict) -> Model:
|
||||
raise NotImplementedError
|
||||
|
||||
def update(self, instance: Model, validated_data: dict) -> Model:
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class MessagesViewSet(ViewSet):
|
||||
"""Read-only view set that returns the current session's messages"""
|
||||
|
||||
permission_classes = [AllowAny]
|
||||
|
||||
@swagger_auto_schema(responses={200: MessageSerializer(many=True)})
|
||||
def list(self, request: Request) -> Response:
|
||||
"""List current messages and pass into Serializer"""
|
||||
all_messages = list(get_messages(request))
|
||||
return Response(MessageSerializer(all_messages, many=True).data)
|
192
authentik/api/v2/urls.py
Normal file
192
authentik/api/v2/urls.py
Normal file
@ -0,0 +1,192 @@
|
||||
"""api v2 urls"""
|
||||
from django.urls import path, re_path
|
||||
from drf_yasg2 import openapi
|
||||
from drf_yasg2.views import get_schema_view
|
||||
from rest_framework import routers
|
||||
from rest_framework.permissions import AllowAny
|
||||
|
||||
from authentik.admin.api.metrics import AdministrationMetricsViewSet
|
||||
from authentik.admin.api.tasks import TaskViewSet
|
||||
from authentik.admin.api.version import VersionViewSet
|
||||
from authentik.admin.api.workers import WorkerViewSet
|
||||
from authentik.api.v2.config import ConfigsViewSet
|
||||
from authentik.api.v2.messages import MessagesViewSet
|
||||
from authentik.core.api.applications import ApplicationViewSet
|
||||
from authentik.core.api.groups import GroupViewSet
|
||||
from authentik.core.api.propertymappings import PropertyMappingViewSet
|
||||
from authentik.core.api.providers import ProviderViewSet
|
||||
from authentik.core.api.sources import SourceViewSet
|
||||
from authentik.core.api.tokens import TokenViewSet
|
||||
from authentik.core.api.users import UserViewSet
|
||||
from authentik.crypto.api import CertificateKeyPairViewSet
|
||||
from authentik.events.api.event import EventViewSet
|
||||
from authentik.events.api.notification import NotificationViewSet
|
||||
from authentik.events.api.notification_rule import NotificationRuleViewSet
|
||||
from authentik.events.api.notification_transport import NotificationTransportViewSet
|
||||
from authentik.flows.api.bindings import FlowStageBindingViewSet
|
||||
from authentik.flows.api.flows import FlowViewSet
|
||||
from authentik.flows.api.stages import StageViewSet
|
||||
from authentik.flows.views import FlowExecutorView
|
||||
from authentik.outposts.api.outpost_service_connections import (
|
||||
DockerServiceConnectionViewSet,
|
||||
KubernetesServiceConnectionViewSet,
|
||||
ServiceConnectionViewSet,
|
||||
)
|
||||
from authentik.outposts.api.outposts import OutpostViewSet
|
||||
from authentik.policies.api import PolicyBindingViewSet, PolicyViewSet
|
||||
from authentik.policies.dummy.api import DummyPolicyViewSet
|
||||
from authentik.policies.event_matcher.api import EventMatcherPolicyViewSet
|
||||
from authentik.policies.expiry.api import PasswordExpiryPolicyViewSet
|
||||
from authentik.policies.expression.api import ExpressionPolicyViewSet
|
||||
from authentik.policies.group_membership.api import GroupMembershipPolicyViewSet
|
||||
from authentik.policies.hibp.api import HaveIBeenPwendPolicyViewSet
|
||||
from authentik.policies.password.api import PasswordPolicyViewSet
|
||||
from authentik.policies.reputation.api import (
|
||||
IPReputationViewSet,
|
||||
ReputationPolicyViewSet,
|
||||
UserReputationViewSet,
|
||||
)
|
||||
from authentik.providers.oauth2.api import OAuth2ProviderViewSet, ScopeMappingViewSet
|
||||
from authentik.providers.proxy.api import (
|
||||
ProxyOutpostConfigViewSet,
|
||||
ProxyProviderViewSet,
|
||||
)
|
||||
from authentik.providers.saml.api import SAMLPropertyMappingViewSet, SAMLProviderViewSet
|
||||
from authentik.sources.ldap.api import LDAPPropertyMappingViewSet, LDAPSourceViewSet
|
||||
from authentik.sources.oauth.api import OAuthSourceViewSet
|
||||
from authentik.sources.saml.api import SAMLSourceViewSet
|
||||
from authentik.stages.authenticator_static.api import AuthenticatorStaticStageViewSet
|
||||
from authentik.stages.authenticator_totp.api import AuthenticatorTOTPStageViewSet
|
||||
from authentik.stages.authenticator_validate.api import (
|
||||
AuthenticatorValidateStageViewSet,
|
||||
)
|
||||
from authentik.stages.authenticator_webauthn.api import AuthenticateWebAuthnStageViewSet
|
||||
from authentik.stages.captcha.api import CaptchaStageViewSet
|
||||
from authentik.stages.consent.api import ConsentStageViewSet
|
||||
from authentik.stages.deny.api import DenyStageViewSet
|
||||
from authentik.stages.dummy.api import DummyStageViewSet
|
||||
from authentik.stages.email.api import EmailStageViewSet
|
||||
from authentik.stages.identification.api import IdentificationStageViewSet
|
||||
from authentik.stages.invitation.api import InvitationStageViewSet, InvitationViewSet
|
||||
from authentik.stages.password.api import PasswordStageViewSet
|
||||
from authentik.stages.prompt.api import PromptStageViewSet, PromptViewSet
|
||||
from authentik.stages.user_delete.api import UserDeleteStageViewSet
|
||||
from authentik.stages.user_login.api import UserLoginStageViewSet
|
||||
from authentik.stages.user_logout.api import UserLogoutStageViewSet
|
||||
from authentik.stages.user_write.api import UserWriteStageViewSet
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
|
||||
router.register("root/messages", MessagesViewSet, basename="messages")
|
||||
router.register("root/config", ConfigsViewSet, basename="configs")
|
||||
|
||||
router.register("admin/version", VersionViewSet, basename="admin_version")
|
||||
router.register("admin/workers", WorkerViewSet, basename="admin_workers")
|
||||
router.register("admin/metrics", AdministrationMetricsViewSet, basename="admin_metrics")
|
||||
router.register("admin/system_tasks", TaskViewSet, basename="admin_system_tasks")
|
||||
|
||||
router.register("core/applications", ApplicationViewSet)
|
||||
router.register("core/groups", GroupViewSet)
|
||||
router.register("core/users", UserViewSet)
|
||||
router.register("core/tokens", TokenViewSet)
|
||||
|
||||
router.register("outposts/outposts", OutpostViewSet)
|
||||
router.register("outposts/service_connections/all", ServiceConnectionViewSet)
|
||||
router.register("outposts/service_connections/docker", DockerServiceConnectionViewSet)
|
||||
router.register(
|
||||
"outposts/service_connections/kubernetes", KubernetesServiceConnectionViewSet
|
||||
)
|
||||
router.register("outposts/proxy", ProxyOutpostConfigViewSet)
|
||||
|
||||
router.register("flows/instances", FlowViewSet)
|
||||
router.register("flows/bindings", FlowStageBindingViewSet)
|
||||
|
||||
router.register("crypto/certificatekeypairs", CertificateKeyPairViewSet)
|
||||
|
||||
router.register("events/events", EventViewSet)
|
||||
router.register("events/notifications", NotificationViewSet)
|
||||
router.register("events/transports", NotificationTransportViewSet)
|
||||
router.register("events/rules", NotificationRuleViewSet)
|
||||
|
||||
router.register("sources/all", SourceViewSet)
|
||||
router.register("sources/ldap", LDAPSourceViewSet)
|
||||
router.register("sources/saml", SAMLSourceViewSet)
|
||||
router.register("sources/oauth", OAuthSourceViewSet)
|
||||
|
||||
router.register("policies/all", PolicyViewSet)
|
||||
router.register("policies/bindings", PolicyBindingViewSet)
|
||||
router.register("policies/expression", ExpressionPolicyViewSet)
|
||||
router.register("policies/event_matcher", EventMatcherPolicyViewSet)
|
||||
router.register("policies/group_membership", GroupMembershipPolicyViewSet)
|
||||
router.register("policies/haveibeenpwned", HaveIBeenPwendPolicyViewSet)
|
||||
router.register("policies/password_expiry", PasswordExpiryPolicyViewSet)
|
||||
router.register("policies/password", PasswordPolicyViewSet)
|
||||
router.register("policies/reputation/users", UserReputationViewSet)
|
||||
router.register("policies/reputation/ips", IPReputationViewSet)
|
||||
router.register("policies/reputation", ReputationPolicyViewSet)
|
||||
|
||||
router.register("providers/all", ProviderViewSet)
|
||||
router.register("providers/proxy", ProxyProviderViewSet)
|
||||
router.register("providers/oauth2", OAuth2ProviderViewSet)
|
||||
router.register("providers/saml", SAMLProviderViewSet)
|
||||
|
||||
router.register("propertymappings/all", PropertyMappingViewSet)
|
||||
router.register("propertymappings/ldap", LDAPPropertyMappingViewSet)
|
||||
router.register("propertymappings/saml", SAMLPropertyMappingViewSet)
|
||||
router.register("propertymappings/scope", ScopeMappingViewSet)
|
||||
|
||||
router.register("stages/all", StageViewSet)
|
||||
router.register("stages/authenticator/static", AuthenticatorStaticStageViewSet)
|
||||
router.register("stages/authenticator/totp", AuthenticatorTOTPStageViewSet)
|
||||
router.register("stages/authenticator/validate", AuthenticatorValidateStageViewSet)
|
||||
router.register("stages/authenticator/webauthn", AuthenticateWebAuthnStageViewSet)
|
||||
router.register("stages/captcha", CaptchaStageViewSet)
|
||||
router.register("stages/consent", ConsentStageViewSet)
|
||||
router.register("stages/deny", DenyStageViewSet)
|
||||
router.register("stages/email", EmailStageViewSet)
|
||||
router.register("stages/identification", IdentificationStageViewSet)
|
||||
router.register("stages/invitation/invitations", InvitationViewSet)
|
||||
router.register("stages/invitation/stages", InvitationStageViewSet)
|
||||
router.register("stages/password", PasswordStageViewSet)
|
||||
router.register("stages/prompt/prompts", PromptViewSet)
|
||||
router.register("stages/prompt/stages", PromptStageViewSet)
|
||||
router.register("stages/user_delete", UserDeleteStageViewSet)
|
||||
router.register("stages/user_login", UserLoginStageViewSet)
|
||||
router.register("stages/user_logout", UserLogoutStageViewSet)
|
||||
router.register("stages/user_write", UserWriteStageViewSet)
|
||||
|
||||
router.register("stages/dummy", DummyStageViewSet)
|
||||
router.register("policies/dummy", DummyPolicyViewSet)
|
||||
|
||||
info = openapi.Info(
|
||||
title="authentik API",
|
||||
default_version="v2",
|
||||
contact=openapi.Contact(email="hello@beryju.org"),
|
||||
license=openapi.License(
|
||||
name="GNU GPLv3", url="https://github.com/BeryJu/authentik/blob/master/LICENSE"
|
||||
),
|
||||
)
|
||||
SchemaView = get_schema_view(
|
||||
info,
|
||||
public=True,
|
||||
permission_classes=(AllowAny,),
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
re_path(
|
||||
r"^swagger(?P<format>\.json|\.yaml)$",
|
||||
SchemaView.without_ui(cache_timeout=0),
|
||||
name="schema-json",
|
||||
),
|
||||
path(
|
||||
"swagger/",
|
||||
SchemaView.with_ui("swagger", cache_timeout=0),
|
||||
name="schema-swagger-ui",
|
||||
),
|
||||
path("redoc/", SchemaView.with_ui("redoc", cache_timeout=0), name="schema-redoc"),
|
||||
path(
|
||||
"flows/executor/<slug:flow_slug>/",
|
||||
FlowExecutorView.as_view(),
|
||||
name="flow-executor",
|
||||
),
|
||||
] + router.urls
|
20
authentik/core/admin.py
Normal file
20
authentik/core/admin.py
Normal file
@ -0,0 +1,20 @@
|
||||
"""authentik core admin"""
|
||||
|
||||
from django.apps import AppConfig, apps
|
||||
from django.contrib import admin
|
||||
from django.contrib.admin.sites import AlreadyRegistered
|
||||
from guardian.admin import GuardedModelAdmin
|
||||
|
||||
|
||||
def admin_autoregister(app: AppConfig):
|
||||
"""Automatically register all models from app"""
|
||||
for model in app.get_models():
|
||||
try:
|
||||
admin.site.register(model, GuardedModelAdmin)
|
||||
except AlreadyRegistered:
|
||||
pass
|
||||
|
||||
|
||||
for _app in apps.get_app_configs():
|
||||
if _app.label.startswith("authentik_"):
|
||||
admin_autoregister(_app)
|
126
authentik/core/api/applications.py
Normal file
126
authentik/core/api/applications.py
Normal file
@ -0,0 +1,126 @@
|
||||
"""Application API Views"""
|
||||
from django.core.cache import cache
|
||||
from django.db.models import QuerySet
|
||||
from django.http.response import Http404
|
||||
from guardian.shortcuts import get_objects_for_user
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework.fields import SerializerMethodField
|
||||
from rest_framework.generics import get_object_or_404
|
||||
from rest_framework.request import Request
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.serializers import ModelSerializer
|
||||
from rest_framework.viewsets import ModelViewSet
|
||||
from rest_framework_guardian.filters import ObjectPermissionsFilter
|
||||
from structlog.stdlib import get_logger
|
||||
|
||||
from authentik.admin.api.metrics import get_events_per_1h
|
||||
from authentik.core.api.providers import ProviderSerializer
|
||||
from authentik.core.models import Application
|
||||
from authentik.events.models import EventAction
|
||||
from authentik.policies.engine import PolicyEngine
|
||||
|
||||
LOGGER = get_logger()
|
||||
|
||||
|
||||
def user_app_cache_key(user_pk: str) -> str:
|
||||
"""Cache key where application list for user is saved"""
|
||||
return f"user_app_cache_{user_pk}"
|
||||
|
||||
|
||||
class ApplicationSerializer(ModelSerializer):
|
||||
"""Application Serializer"""
|
||||
|
||||
launch_url = SerializerMethodField()
|
||||
provider = ProviderSerializer(source="get_provider", required=False)
|
||||
|
||||
def get_launch_url(self, instance: Application) -> str:
|
||||
"""Get generated launch URL"""
|
||||
return instance.get_launch_url() or ""
|
||||
|
||||
class Meta:
|
||||
|
||||
model = Application
|
||||
fields = [
|
||||
"pk",
|
||||
"name",
|
||||
"slug",
|
||||
"provider",
|
||||
"launch_url",
|
||||
"meta_launch_url",
|
||||
"meta_icon",
|
||||
"meta_description",
|
||||
"meta_publisher",
|
||||
"policies",
|
||||
]
|
||||
|
||||
|
||||
class ApplicationViewSet(ModelViewSet):
|
||||
"""Application Viewset"""
|
||||
|
||||
queryset = Application.objects.all()
|
||||
serializer_class = ApplicationSerializer
|
||||
search_fields = [
|
||||
"name",
|
||||
"slug",
|
||||
"meta_launch_url",
|
||||
"meta_description",
|
||||
"meta_publisher",
|
||||
]
|
||||
lookup_field = "slug"
|
||||
ordering = ["name"]
|
||||
|
||||
def _filter_queryset_for_list(self, queryset: QuerySet) -> QuerySet:
|
||||
"""Custom filter_queryset method which ignores guardian, but still supports sorting"""
|
||||
for backend in list(self.filter_backends):
|
||||
if backend == ObjectPermissionsFilter:
|
||||
continue
|
||||
queryset = backend().filter_queryset(self.request, queryset, self)
|
||||
return queryset
|
||||
|
||||
def _get_allowed_applications(self, queryset: QuerySet) -> list[Application]:
|
||||
applications = []
|
||||
for application in queryset:
|
||||
engine = PolicyEngine(application, self.request.user, self.request)
|
||||
engine.build()
|
||||
if engine.passing:
|
||||
applications.append(application)
|
||||
return applications
|
||||
|
||||
def list(self, request: Request) -> Response:
|
||||
"""Custom list method that checks Policy based access instead of guardian"""
|
||||
queryset = self._filter_queryset_for_list(self.get_queryset())
|
||||
self.paginate_queryset(queryset)
|
||||
|
||||
should_cache = request.GET.get("search", "") == ""
|
||||
|
||||
allowed_applications = []
|
||||
if not should_cache:
|
||||
allowed_applications = self._get_allowed_applications(queryset)
|
||||
if should_cache:
|
||||
LOGGER.debug("Caching allowed application list")
|
||||
allowed_applications = cache.get(user_app_cache_key(self.request.user.pk))
|
||||
if not allowed_applications:
|
||||
allowed_applications = self._get_allowed_applications(queryset)
|
||||
cache.set(
|
||||
user_app_cache_key(self.request.user.pk),
|
||||
allowed_applications,
|
||||
timeout=86400,
|
||||
)
|
||||
serializer = self.get_serializer(allowed_applications, many=True)
|
||||
return self.get_paginated_response(serializer.data)
|
||||
|
||||
@action(detail=True)
|
||||
def metrics(self, request: Request, slug: str):
|
||||
"""Metrics for application logins"""
|
||||
app = get_object_or_404(
|
||||
get_objects_for_user(request.user, "authentik_core.view_application"),
|
||||
slug=slug,
|
||||
)
|
||||
if not request.user.has_perm("authentik_events.view_event"):
|
||||
raise Http404
|
||||
return Response(
|
||||
get_events_per_1h(
|
||||
action=EventAction.AUTHORIZE_APPLICATION,
|
||||
context__authorized_application__pk=app.pk.hex,
|
||||
)
|
||||
)
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user