Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1115ee1e9a | ||
|
|
fa1325fc8b | ||
|
|
a9620a5d71 | ||
|
|
b4f9026e80 | ||
|
|
c587db883d | ||
|
|
f89d59b6e1 | ||
|
|
a9c080734c | ||
|
|
1660cfa3d2 | ||
|
|
1c66226e83 | ||
|
|
a286cd31ec | ||
|
|
4f5ed837b4 | ||
|
|
76afa643f4 | ||
|
|
bb5ef71607 | ||
|
|
d97250fac5 | ||
|
|
c850cd52dc | ||
|
|
8ca5b094f8 | ||
|
|
5213c1e42c | ||
|
|
a95ccd908f | ||
|
|
693c165ce8 | ||
|
|
adf5ab7344 | ||
|
|
b71467e2fe | ||
|
|
879ef1b1a6 | ||
|
|
4cafdac1df | ||
|
|
8b5e496101 | ||
|
|
eb5a93ddbe | ||
|
|
9ecbdd8e59 | ||
|
|
9ded98b66e | ||
|
|
421e12468d | ||
|
|
4c14b8cfdd | ||
|
|
d3edc03941 | ||
|
|
331cadd8f2 | ||
|
|
009a8cdfcb | ||
|
|
61f42aefe3 | ||
|
|
9c7e8c6697 | ||
|
|
c6fd0d00ba | ||
|
|
86d1683e09 | ||
|
|
efc9df0867 | ||
|
|
31d095eac1 | ||
|
|
5bb56f910c | ||
|
|
b98ecabba1 | ||
|
|
a91e6712e8 | ||
|
|
e527857d00 | ||
|
|
dd07db29ee | ||
|
|
7480844765 | ||
|
|
c1baae8425 | ||
|
|
b3bee9b52a | ||
|
|
6302769b83 | ||
|
|
82eaa2eac4 | ||
|
|
17ba2732f9 | ||
|
|
8dd788daf9 | ||
|
|
488fb10493 | ||
|
|
34d6f51fb8 | ||
|
|
bbda3590bb | ||
|
|
e60076690c | ||
|
|
b706483c82 | ||
|
|
fc384b0773 | ||
|
|
01dfce68d9 | ||
|
|
186497cb79 | ||
|
|
bdf479e8cd | ||
|
|
973334c9fc | ||
|
|
83405a75c2 | ||
|
|
e4839b0480 | ||
|
|
a9f7300732 | ||
|
|
8658864013 | ||
|
|
be1e3bbfc1 | ||
|
|
12ebc658a8 | ||
|
|
8fcc0f077b | ||
|
|
dfe94640ed | ||
|
|
ef58efe7e4 | ||
|
|
d1343e8f53 | ||
|
|
4f569c68cd | ||
|
|
3c4f9e7347 | ||
|
|
395b0d26d0 | ||
|
|
3fb0f53336 | ||
|
|
4785a90946 | ||
|
|
a6e708ab40 | ||
|
|
4fca95751c | ||
|
|
2cf0ad5cfd | ||
|
|
07e2bf732f | ||
|
|
5abf1bc79f | ||
|
|
14ad522385 | ||
|
|
939d0f5df6 | ||
|
|
b5036b5ce9 | ||
|
|
31afc004bc | ||
|
|
0b359fbdef | ||
|
|
4a3a15f45a | ||
|
|
1b38afc048 | ||
|
|
a620e5e9e1 | ||
|
|
e0aef5296b | ||
|
|
210c53dd41 | ||
|
|
60745116a2 | ||
|
|
d2df13d8f0 | ||
|
|
da1d543c2b | ||
|
|
3cb6b5c801 | ||
|
|
a417810df5 | ||
|
|
be3a0f3201 | ||
|
|
488ac7e3ba | ||
|
|
c9bc471e06 | ||
|
|
4fdab0c94c | ||
|
|
eac03d6828 | ||
|
|
40f76a53f7 | ||
|
|
d4062e407d | ||
|
|
a3d71eb72a | ||
|
|
c5b5bc9099 | ||
|
|
7fb95cc638 | ||
|
|
78c4819978 | ||
|
|
e28e45402c | ||
|
|
97a2a92534 | ||
|
|
9ae23e1257 | ||
|
|
0526174971 | ||
|
|
96dd8ac1cd | ||
|
|
1d7512495d | ||
|
|
4c0dcabd6e | ||
|
|
826b5825bd | ||
|
|
9a4a6cdd27 | ||
|
|
018ee09ccb | ||
|
|
25a4acf3ad | ||
|
|
7a13200fd8 | ||
|
|
0114d24ea1 | ||
|
|
42206df69a | ||
|
|
fbbff3edc0 | ||
|
|
e0e1d6f94d | ||
|
|
a1eb13cdbc | ||
|
|
a4e13a3324 | ||
|
|
ab4720d9c2 | ||
|
|
02447762a3 | ||
|
|
ded3cd3fc8 | ||
|
|
dbe4159e27 | ||
|
|
89ca5c8836 | ||
|
|
33c561dcd3 | ||
|
|
18ccaea7cb | ||
|
|
eb1d509fd5 | ||
|
|
8ea8f8b68b | ||
|
|
0b9adf1d8d | ||
|
|
5b826ab358 | ||
|
|
701adb9185 | ||
|
|
86869364a3 | ||
|
|
161d5844eb | ||
|
|
f7997ed0b7 | ||
|
|
b132956e42 | ||
|
|
1a5159b216 | ||
|
|
1a4f459b81 | ||
|
|
02c0da3ef7 | ||
|
|
40e4ccf1ea | ||
|
|
d456649feb | ||
|
|
8ad535b618 | ||
|
|
e5df4dc488 | ||
|
|
7f910eb2dd | ||
|
|
b53a52a1fa | ||
|
|
9f4b8982cd | ||
|
|
44ccc0f64b | ||
|
|
e6e3fb606d | ||
|
|
ef115b0418 | ||
|
|
5d4fe06663 | ||
|
|
3540986a11 | ||
|
|
26be7ffdba | ||
|
|
b2e6292337 | ||
|
|
ca8c7010e8 | ||
|
|
2c0a123e99 | ||
|
|
195035cef5 | ||
|
|
076e499f6f | ||
|
|
4a5a0fe7d2 | ||
|
|
06468b2f60 | ||
|
|
28484c3dee | ||
|
|
a5d2857297 | ||
|
|
9cfae26234 | ||
|
|
1539c73831 | ||
|
|
ee4be290e1 | ||
|
|
e713c227bb | ||
|
|
2b7e884182 | ||
|
|
6b3496a7b3 | ||
|
|
ae4478de1f | ||
|
|
5d995b8c2a | ||
|
|
3cbd24dd04 | ||
|
|
a8588c5006 | ||
|
|
e82f253832 | ||
|
|
0abae79183 | ||
|
|
15d710247d | ||
|
|
32eb409cf6 | ||
|
|
52e60889ff | ||
|
|
d744ff3cae | ||
|
|
2aa7799209 | ||
|
|
45d8118e6c | ||
|
|
27a65a1a35 | ||
|
|
48370cb3e8 | ||
|
|
7bed7e4b06 | ||
|
|
62647ff321 | ||
|
|
cde5e2d4d7 | ||
|
|
7cb2c89d59 | ||
|
|
0ec775fcfa | ||
|
|
02ece292ad | ||
|
|
d804f1feed | ||
|
|
1be15d2024 | ||
|
|
4b040e10d3 | ||
|
|
7b278b63b4 | ||
|
|
22f0d8c50a | ||
|
|
9f16174c5f | ||
|
|
e045f118c8 | ||
|
|
0fd06f33b8 | ||
|
|
700be74975 | ||
|
|
06a445aff1 | ||
|
|
c9f5acc0d2 | ||
|
|
6eb535334d | ||
|
|
6ee14f5137 | ||
|
|
2b22450dfd | ||
|
|
13b257d7a0 | ||
|
|
79e0919132 | ||
|
|
5238651da0 | ||
|
|
b25f5bd910 | ||
|
|
d64d74df6f | ||
|
|
5b6a656147 | ||
|
|
d6de84e711 | ||
|
|
45232145d9 | ||
|
|
1157c5b14f | ||
|
|
3dd8c4d513 | ||
|
|
63d20c4476 | ||
|
|
dfbafafc3e | ||
|
|
15b47c8b0c | ||
|
|
d7f3c1ff4c | ||
|
|
8e05170f82 | ||
|
|
94831c3419 | ||
|
|
5cf1340132 | ||
|
|
3f74383c98 | ||
|
|
9905e38311 | ||
|
|
d3ef07ad51 | ||
|
|
468c4852fe | ||
|
|
e7bfe72c15 | ||
|
|
e8ba917032 | ||
|
|
fa15bf13d5 | ||
|
|
a4679b8bc5 | ||
|
|
8c5ca861e1 | ||
|
|
44c57c2744 | ||
|
|
0feda3dd76 | ||
|
|
87150c2b6f | ||
|
|
3eca1f9127 | ||
|
|
1de25fb804 | ||
|
|
00a0cb3abf | ||
|
|
4f68174c09 | ||
|
|
f9c667e81a | ||
|
|
9c34f7eac5 | ||
|
|
5ed8987fba | ||
|
|
626c7f7d15 | ||
|
|
7cb4ee0d12 | ||
|
|
d933123eda | ||
|
|
04a6583ce3 | ||
|
|
519328382b | ||
|
|
ab5aba2b78 | ||
|
|
986e2d7d78 | ||
|
|
391ca8b90b | ||
|
|
692f42dc7d | ||
|
|
d4d27947a8 | ||
|
|
0dd0631b21 | ||
|
|
3ada2d983f | ||
|
|
3049b9587f | ||
|
|
c92f10029b | ||
|
|
535131d633 | ||
|
|
645f90a835 | ||
|
|
9e15311803 | ||
|
|
b487629262 | ||
|
|
a192c21b2c | ||
|
|
5501fda561 | ||
|
|
64c0f90030 | ||
|
|
0932c9217f | ||
|
|
6164bfb56a | ||
|
|
aa0c8c8323 | ||
|
|
c90a3636a4 | ||
|
|
4d53d9fdf2 | ||
|
|
e243b956f4 | ||
|
|
eb0a5db304 | ||
|
|
c26907bc02 | ||
|
|
c711292bcf | ||
|
|
18563bc87b | ||
|
|
b9fd47a7ae | ||
|
|
bfd7b6e00d | ||
|
|
9a9373d5dc | ||
|
|
25e0f4af66 | ||
|
|
6031b8a210 | ||
|
|
190f8b62cd | ||
|
|
7239864be3 | ||
|
|
25c4da9e89 | ||
|
|
7c17e27b7f | ||
|
|
8799df5383 | ||
|
|
9d37d077fd | ||
|
|
7e9407d9d6 | ||
|
|
74889cf3ff | ||
|
|
a1ed05d7f9 | ||
|
|
1647afa9f7 | ||
|
|
0307d222ac | ||
|
|
951720d4e6 | ||
|
|
00c99cceb4 | ||
|
|
b37d679f1d | ||
|
|
63767ec067 | ||
|
|
d6637b2feb | ||
|
|
1aa3f7a7fd | ||
|
|
4dd9d079fb | ||
|
|
bae02a7eda | ||
|
|
046012ecfa | ||
|
|
a21311095d | ||
|
|
35198bedf4 | ||
|
|
a7ff408943 | ||
|
|
5afe830e54 | ||
|
|
0c3a2dbfea | ||
|
|
eefbe8558b | ||
|
|
0244a060f2 | ||
|
|
bd2a14a2e8 | ||
|
|
33404a62c0 | ||
|
|
7ddc191491 | ||
|
|
cada918c78 | ||
|
|
42b8fa60cf | ||
|
|
9d34142870 | ||
|
|
58c73a71ba | ||
|
|
74130f863f | ||
|
|
7e0626a922 | ||
|
|
b3488b2131 | ||
|
|
3499fdeec2 | ||
|
|
7fa80acf5f | ||
|
|
aea2c9fb02 | ||
|
|
b7700b9c5e | ||
|
|
07fe32e2ad | ||
|
|
de5fffd3c3 | ||
|
|
03dfd01ee7 | ||
|
|
c7271ea2ba | ||
|
|
a8c3f5f437 | ||
|
|
0ffaf29a37 | ||
|
|
45fa10434e | ||
|
|
b1fef6b80a | ||
|
|
834adfc2b1 | ||
|
|
9ad9c38ee0 | ||
|
|
18b03506d3 | ||
|
|
7f598c8d83 | ||
|
|
8c5eb88f7e | ||
|
|
4334438136 | ||
|
|
50d986b981 | ||
|
|
dab3706c0d | ||
|
|
8cb3238134 | ||
|
|
ef4a2f30b4 | ||
|
|
3eb8b304c6 | ||
|
|
8552faba07 | ||
|
|
188a279c5b | ||
|
|
2bec09aa03 | ||
|
|
6c1dc1b226 | ||
|
|
572f203c96 | ||
|
|
d47847b1a2 | ||
|
|
8cdc7bf070 | ||
|
|
255be047ff | ||
|
|
e80ff6f9d4 | ||
|
|
adc4d8d7f6 | ||
|
|
380336d6d2 | ||
|
|
c9ed627288 | ||
|
|
c52cf2130a | ||
|
|
9f0c4830d0 | ||
|
|
74638edb43 | ||
|
|
dc799a5f96 | ||
|
|
3dc58965fa | ||
|
|
d8bc3e401e | ||
|
|
28d310d5b0 | ||
|
|
cfff1f6710 | ||
|
|
39153f9b8a | ||
|
|
8c38c57f77 | ||
|
|
c441397b33 | ||
|
|
8272da7404 | ||
|
|
d15e577bc1 | ||
|
|
b70e30dbf0 | ||
|
|
8defcb0cee | ||
|
|
16fbe095ff | ||
|
|
d3e4bd9ec4 | ||
|
|
60389f5384 | ||
|
|
339152c1ca | ||
|
|
44d7cce3a0 | ||
|
|
e880d38beb | ||
|
|
305d6f227f | ||
|
|
643a70a244 | ||
|
|
462dc75f8e | ||
|
|
5af574326b | ||
|
|
ab23ecdad5 | ||
|
|
5221f4c2a0 | ||
|
|
1b8de48f1c | ||
|
|
4b917833fd | ||
|
|
061e0b63ef | ||
|
|
f6aac4d5cb | ||
|
|
a63c6e0252 | ||
|
|
3ce45cec09 | ||
|
|
7616f1dad2 | ||
|
|
9cfcbc67e1 | ||
|
|
cc3e3cd849 | ||
|
|
0dfd4b7ea3 | ||
|
|
fbbfce1151 | ||
|
|
9fb266882e | ||
|
|
99a65e3e72 | ||
|
|
cf80bb33ba | ||
|
|
1ca7cb6585 | ||
|
|
b0ee8e00aa | ||
|
|
b3abb2c696 | ||
|
|
28af45425b | ||
|
|
f5d7f85b92 | ||
|
|
64f2a408ef | ||
|
|
1a394c6a01 | ||
|
|
2c5b70643d | ||
|
|
caf7488608 | ||
|
|
25cbae4d02 | ||
|
|
5f2f97a698 | ||
|
|
85484d312c | ||
|
|
f6204b0d5e | ||
|
|
260fbcb032 | ||
|
|
c84e0547e1 | ||
|
|
36a60dbb35 | ||
|
|
7f30ddb1b7 | ||
|
|
2968609fd9 | ||
|
|
f340baa428 | ||
|
|
c7ce801b59 | ||
|
|
0da9de495c | ||
|
|
2832810891 | ||
|
|
82043e1fd0 | ||
|
|
20bb855a57 | ||
|
|
80ccac79b9 | ||
|
|
f2b1b5b07c | ||
|
|
1c1c469fc9 | ||
|
|
026e0ca89b | ||
|
|
f3463728f2 | ||
|
|
4cb6f0ba0d | ||
|
|
660507fda2 | ||
|
|
a0626e09b3 | ||
|
|
1bcacd800a | ||
|
|
2fae28f974 | ||
|
|
6d7b2d7d1b | ||
|
|
fe4b1545b6 | ||
|
|
6b25cd3241 | ||
|
|
f1e12c75f1 | ||
|
|
584151d127 | ||
|
|
ee0ba2df41 | ||
|
|
fe157ca349 | ||
|
|
0c2741af9f | ||
|
|
b590dcef10 | ||
|
|
811d130c66 | ||
|
|
34600a0eca | ||
|
|
66ffc9a612 | ||
|
|
d1313a595d | ||
|
|
9854c399da | ||
|
|
9872610f7d | ||
|
|
b290bc12b2 | ||
|
|
029daa5ffa | ||
|
|
602a4fa321 | ||
|
|
0b11a7ce55 | ||
|
|
151fa5040a | ||
|
|
63b14839af | ||
|
|
6526ab48a3 | ||
|
|
31061c60af | ||
|
|
a16dc59447 | ||
|
|
4f63dc9945 | ||
|
|
55c7e2121e | ||
|
|
45d7d15c11 | ||
|
|
7ca2797eac | ||
|
|
55180f6e91 | ||
|
|
dffe69573e | ||
|
|
936f98e93e | ||
|
|
fc9652107e | ||
|
|
12d92fe517 | ||
|
|
e77d68900a | ||
|
|
cf054fc169 | ||
|
|
d8398815b1 | ||
|
|
7d00ad4b76 | ||
|
|
de35102115 | ||
|
|
1478db8948 | ||
|
|
e35bec9a52 | ||
|
|
f05ee29d10 | ||
|
|
8d30629801 | ||
|
|
b784e1f8d4 | ||
|
|
2a51892ab9 | ||
|
|
dd21d068cb | ||
|
|
44762369fb | ||
|
|
2b64a4e8ad | ||
|
|
00226adaa6 | ||
|
|
302f9377e5 | ||
|
|
87ede26cc2 | ||
|
|
ddb5414d56 | ||
|
|
4d26ce5061 | ||
|
|
b99bc2d8b1 | ||
|
|
5a1ad476e0 | ||
|
|
34d72d16ee | ||
|
|
1c15447e13 | ||
|
|
29377901f7 | ||
|
|
85674f16a1 | ||
|
|
8a4cf2187a | ||
|
|
5fb0cc43ea | ||
|
|
6eff5b9527 | ||
|
|
7f1849e74a | ||
|
|
348d4eef6f | ||
|
|
b71c0c6784 | ||
|
|
5ab290a048 | ||
|
|
2c48897ed1 | ||
|
|
0d9f988f5e | ||
|
|
5517aa6918 | ||
|
|
9690659ddf | ||
|
|
aa58fad8eb | ||
|
|
a97967ff3b | ||
|
|
cb583ac18e | ||
|
|
a1c43ac3c9 | ||
|
|
6f6dd6240c | ||
|
|
2ac8028e1f | ||
|
|
cbe7d2258d | ||
|
|
bb78693405 | ||
|
|
51ca38772f | ||
|
|
64b70be656 | ||
|
|
a7c56fde77 | ||
|
|
f4d3c91e7f | ||
|
|
78043bfb5e | ||
|
|
054a068f47 | ||
|
|
a3563d1c35 | ||
|
|
ffc2edf61e | ||
|
|
132d7fb0ed | ||
|
|
16b30cbe5e | ||
|
|
3f3762ef92 | ||
|
|
89eba7d38d | ||
|
|
dc2a52abe2 | ||
|
|
9f63afb440 | ||
|
|
c842d4b5c2 | ||
|
|
b535924928 | ||
|
|
dc16c2484c | ||
|
|
3d706b6f57 | ||
|
|
f103172954 | ||
|
|
e8f927db7d | ||
|
|
2e8eb0f5fe | ||
|
|
962052a056 | ||
|
|
f8bf37422b | ||
|
|
34add4a2e0 | ||
|
|
85d944cea1 | ||
|
|
1dd4501a9f | ||
|
|
2a20791852 | ||
|
|
2715fbd4a7 | ||
|
|
2a86a93e56 | ||
|
|
41a9cc637b | ||
|
|
56b84973b9 | ||
|
|
bd3bad88ee | ||
|
|
ccdecaa984 | ||
|
|
7b38096924 | ||
|
|
06ffc7aae7 | ||
|
|
f6cfbffc8f | ||
|
|
df0c2d7e0c | ||
|
|
93f8840ed8 | ||
|
|
f0de557063 | ||
|
|
ec4511ec12 | ||
|
|
3aeb9b8e40 | ||
|
|
0db289695c | ||
|
|
ca9f8d1c9f | ||
|
|
3fa07a1080 | ||
|
|
8ab9bf68a4 | ||
|
|
753246f4e8 | ||
|
|
df411f00a3 | ||
|
|
bdc383a1a9 | ||
|
|
9ae744254d | ||
|
|
952b6bdcce | ||
|
|
071b712906 | ||
|
|
7f2be8a45a | ||
|
|
eb711f7813 | ||
|
|
f36e518b57 | ||
|
|
8d7697af26 | ||
|
|
ad1764a1ff | ||
|
|
10ba43ad35 | ||
|
|
286d0680a6 | ||
|
|
2035ba9925 | ||
|
|
27cc011ac2 | ||
|
|
dd1b596b57 | ||
|
|
8bc341868f | ||
|
|
6fe573b3d9 | ||
|
|
8c7d1fbad1 | ||
|
|
0fd4a8936f | ||
|
|
44914cf1fa | ||
|
|
1354031def | ||
|
|
a3058d528a | ||
|
|
eca22818c9 | ||
|
|
eae9f0d80c | ||
|
|
eb42b1097a | ||
|
|
7d13d704b9 | ||
|
|
d9bdd3e930 | ||
|
|
6f8e488635 | ||
|
|
2244a7a292 | ||
|
|
0b3f87196d | ||
|
|
e2f9912b78 | ||
|
|
4db85bed81 | ||
|
|
6c58f825ec | ||
|
|
bdb759ac7e | ||
|
|
29f797d442 | ||
|
|
1bf4b41f11 | ||
|
|
badd9551f3 | ||
|
|
ad37d39ea4 | ||
|
|
acd2f3054a | ||
|
|
970c4050ab | ||
|
|
9ed9eb7c85 | ||
|
|
4bf0a13a85 | ||
|
|
5ea6048240 | ||
|
|
58d2017152 | ||
|
|
162aa65229 | ||
|
|
12de97fca7 | ||
|
|
036c96754d | ||
|
|
9d4d4d2788 | ||
|
|
fa4ac63066 | ||
|
|
33f4e6588f | ||
|
|
0b02b0514a | ||
|
|
03cf8ffe14 | ||
|
|
09f97d2e1e | ||
|
|
9c166cfca6 | ||
|
|
7b63b5b842 | ||
|
|
57b41e0dd5 | ||
|
|
8f6b4a0780 | ||
|
|
f3a1b4af00 | ||
|
|
18721cc830 | ||
|
|
b46fa4e4b3 | ||
|
|
efe767c4a4 | ||
|
|
38cb763d3d | ||
|
|
56c8b174d1 | ||
|
|
59432e92a5 | ||
|
|
06fbb8b42e | ||
|
|
2d1594c3c6 | ||
|
|
352f2beeb7 | ||
|
|
3c965a07f6 | ||
|
|
2efc44d002 | ||
|
|
184fa80917 | ||
|
|
d41bfea4b6 | ||
|
|
f5cd9d0792 | ||
|
|
502d29107a | ||
|
|
24f6a36b82 | ||
|
|
cf30cc3f63 | ||
|
|
184997e85d | ||
|
|
cc51feb106 | ||
|
|
7d1a688653 | ||
|
|
f2bc3f1c5b | ||
|
|
0cb8f065ac | ||
|
|
77674077b4 | ||
|
|
e74d640990 | ||
|
|
5f36ee51e4 | ||
|
|
2d576d5b4b | ||
|
|
28ed75ca02 | ||
|
|
068d08577d | ||
|
|
22fa1a7e5c | ||
|
|
51b186b603 | ||
|
|
848dffb592 | ||
|
|
2e1cbcb778 | ||
|
|
4b56a4cbaa | ||
|
|
bf1d652ff9 | ||
|
|
b478bf99d9 | ||
|
|
4ba6a0371b | ||
|
|
20055ddaf1 | ||
|
|
ea67962d5d | ||
|
|
0d6caf5d0e | ||
|
|
3e530e93c3 | ||
|
|
bd4771d75f | ||
|
|
a9e1c014f6 | ||
|
|
826dccc9cb | ||
|
|
06a7db1838 | ||
|
|
08bbd0a2d7 | ||
|
|
381cc5e8ea | ||
|
|
7e605e958e | ||
|
|
17a4198a66 | ||
|
|
a3c5c71925 | ||
|
|
17f293e9da | ||
|
|
75ad575752 | ||
|
|
b474b263ed | ||
|
|
5d286e7951 | ||
|
|
de5baf8516 | ||
|
|
3cd6b81a68 | ||
|
|
d89e3abf27 | ||
|
|
a525b2ebf0 | ||
|
|
46f114d9e7 | ||
|
|
244704cc15 | ||
|
|
4941d3d4b1 | ||
|
|
1a09ce9f3f | ||
|
|
25eebb21a2 |
No files matched your search
+1
-10
@@ -1,14 +1,5 @@
|
|||||||
component: Subject
|
component: Subject
|
||||||
# component: Subject is a single-line summary
|
|
||||||
|
|
||||||
Explanation
|
Explanation
|
||||||
# Explanation must describe the fix or feature + the method
|
|
||||||
# chosen to implement it, and can span across multiple lines.
|
|
||||||
|
|
||||||
Fixes: https://pagure.io/freeipa/issue/XXXX
|
|
||||||
or
|
|
||||||
Related: https://pagure.io/freeipa/issue/XXXX
|
|
||||||
# Fixes: means that the commit fixes the referenced issue(s).
|
|
||||||
# Related: means that the commit is related to the issue(s)
|
|
||||||
# in some way, but does not resolve it/them.
|
|
||||||
|
|
||||||
|
https://pagure.io/freeipa/issue/XXXX
|
||||||
@@ -57,12 +57,6 @@ py-compile
|
|||||||
freeipa2-dev-doc
|
freeipa2-dev-doc
|
||||||
~/doc/guide/Makefile
|
~/doc/guide/Makefile
|
||||||
|
|
||||||
# Workshop
|
|
||||||
doc/workshop/.vagrant/
|
|
||||||
doc/workshop/packer_cache/
|
|
||||||
doc/workshop/output-*/
|
|
||||||
doc/workshop/anaconda-ks.cfg
|
|
||||||
|
|
||||||
# Root directory
|
# Root directory
|
||||||
/freeipa.spec
|
/freeipa.spec
|
||||||
/dist/
|
/dist/
|
||||||
@@ -155,7 +149,6 @@ install/custodia/ipa-custodia-dmldap
|
|||||||
install/custodia/ipa-custodia-pki-tomcat
|
install/custodia/ipa-custodia-pki-tomcat
|
||||||
install/custodia/ipa-custodia-pki-tomcat-wrapped
|
install/custodia/ipa-custodia-pki-tomcat-wrapped
|
||||||
install/custodia/ipa-custodia-ra-agent
|
install/custodia/ipa-custodia-ra-agent
|
||||||
install/oddjob/org.freeipa.server.config-enable-sid
|
|
||||||
install/oddjob/org.freeipa.server.trust-enable-agent
|
install/oddjob/org.freeipa.server.trust-enable-agent
|
||||||
install/oddjob/com.redhat.idm.trust-fetch-domains
|
install/oddjob/com.redhat.idm.trust-fetch-domains
|
||||||
install/oddjob/etc/oddjobd.conf.d/ipa-server.conf
|
install/oddjob/etc/oddjobd.conf.d/ipa-server.conf
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
# .readthedocs.yaml
|
|
||||||
# Read the Docs configuration file
|
|
||||||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
||||||
|
|
||||||
# Required
|
|
||||||
version: 2
|
|
||||||
|
|
||||||
# Set the version of Python and other tools you might need
|
|
||||||
build:
|
|
||||||
os: ubuntu-20.04
|
|
||||||
tools:
|
|
||||||
python: "3.8"
|
|
||||||
apt_packages:
|
|
||||||
- plantuml
|
|
||||||
- graphviz
|
|
||||||
- fonts-ipafont
|
|
||||||
- fonts-ipaexfont
|
|
||||||
|
|
||||||
# Build documentation in the doc/ directory with Sphinx
|
|
||||||
sphinx:
|
|
||||||
configuration: doc/conf.py
|
|
||||||
|
|
||||||
# If using Sphinx, optionally build your docs in additional formats such as PDF
|
|
||||||
# formats:
|
|
||||||
# - pdf
|
|
||||||
|
|
||||||
# Optionally declare the Python requirements required to build your docs
|
|
||||||
python:
|
|
||||||
install:
|
|
||||||
- requirements: doc/requirements.txt
|
|
||||||
@@ -10,5 +10,6 @@ ipaserver == @VERSION@
|
|||||||
ipatests == @VERSION@
|
ipatests == @VERSION@
|
||||||
|
|
||||||
# keep pylint version in sync with current Fedora release
|
# keep pylint version in sync with current Fedora release
|
||||||
# F37 has 2.15.5
|
# F34 has 2.6
|
||||||
pylint ~= 2.15.5
|
# https://pagure.io/freeipa/issue/8818 added pylint 2.8 support
|
||||||
|
pylint < 2.9
|
||||||
@@ -29,7 +29,7 @@ aci: (targetfilter = "(objectclass=ipaca)")(version 3.0;acl "permission:System:
|
|||||||
dn: cn=cas,cn=ca,dc=ipa,dc=example
|
dn: cn=cas,cn=ca,dc=ipa,dc=example
|
||||||
aci: (targetattr = "cn || description")(targetfilter = "(objectclass=ipaca)")(version 3.0;acl "permission:System: Modify CA";allow (write) groupdn = "ldap:///cn=System: Modify CA,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetattr = "cn || description")(targetfilter = "(objectclass=ipaca)")(version 3.0;acl "permission:System: Modify CA";allow (write) groupdn = "ldap:///cn=System: Modify CA,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=cas,cn=ca,dc=ipa,dc=example
|
dn: cn=cas,cn=ca,dc=ipa,dc=example
|
||||||
aci: (targetattr = "cn || createtimestamp || description || entryusn || ipacaid || ipacaissuerdn || ipacarandomserialnumberversion || ipacasubjectdn || modifytimestamp || objectclass")(targetfilter = "(objectclass=ipaca)")(version 3.0;acl "permission:System: Read CAs";allow (compare,read,search) userdn = "ldap:///all";)
|
aci: (targetattr = "cn || createtimestamp || description || entryusn || ipacaid || ipacaissuerdn || ipacasubjectdn || modifytimestamp || objectclass")(targetfilter = "(objectclass=ipaca)")(version 3.0;acl "permission:System: Read CAs";allow (compare,read,search) userdn = "ldap:///all";)
|
||||||
dn: cn=caacls,cn=ca,dc=ipa,dc=example
|
dn: cn=caacls,cn=ca,dc=ipa,dc=example
|
||||||
aci: (targetfilter = "(objectclass=ipacaacl)")(version 3.0;acl "permission:System: Add CA ACL";allow (add) groupdn = "ldap:///cn=System: Add CA ACL,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetfilter = "(objectclass=ipacaacl)")(version 3.0;acl "permission:System: Add CA ACL";allow (add) groupdn = "ldap:///cn=System: Add CA ACL,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=caacls,cn=ca,dc=ipa,dc=example
|
dn: cn=caacls,cn=ca,dc=ipa,dc=example
|
||||||
@@ -153,8 +153,6 @@ aci: (targetattr = "createtimestamp || entryusn || ipaallowedtoperform;read_keys
|
|||||||
dn: cn=computers,cn=accounts,dc=ipa,dc=example
|
dn: cn=computers,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "krbcanonicalname || krbprincipalname")(targetfilter = "(objectclass=ipahost)")(version 3.0;acl "permission:System: Manage Host Principals";allow (write) groupdn = "ldap:///cn=System: Manage Host Principals,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetattr = "krbcanonicalname || krbprincipalname")(targetfilter = "(objectclass=ipahost)")(version 3.0;acl "permission:System: Manage Host Principals";allow (write) groupdn = "ldap:///cn=System: Manage Host Principals,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=computers,cn=accounts,dc=ipa,dc=example
|
dn: cn=computers,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "memberprincipal || objectclass")(targetfilter = "(objectclass=ipahost)")(version 3.0;acl "permission:System: Manage Host Resource Delegation";allow (delete,write) groupdn = "ldap:///cn=System: Manage Host Resource Delegation,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
|
||||||
dn: cn=computers,cn=accounts,dc=ipa,dc=example
|
|
||||||
aci: (targetattr = "ipasshpubkey")(targetfilter = "(objectclass=ipahost)")(version 3.0;acl "permission:System: Manage Host SSH Public Keys";allow (write) groupdn = "ldap:///cn=System: Manage Host SSH Public Keys,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetattr = "ipasshpubkey")(targetfilter = "(objectclass=ipahost)")(version 3.0;acl "permission:System: Manage Host SSH Public Keys";allow (write) groupdn = "ldap:///cn=System: Manage Host SSH Public Keys,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=computers,cn=accounts,dc=ipa,dc=example
|
dn: cn=computers,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "description || ipaassignedidview || krbprincipalauthind || l || macaddress || nshardwareplatform || nshostlocation || nsosversion || userclass")(targetfilter = "(objectclass=ipahost)")(version 3.0;acl "permission:System: Modify Hosts";allow (write) groupdn = "ldap:///cn=System: Modify Hosts,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetattr = "description || ipaassignedidview || krbprincipalauthind || l || macaddress || nshardwareplatform || nshostlocation || nsosversion || userclass")(targetfilter = "(objectclass=ipahost)")(version 3.0;acl "permission:System: Modify Hosts";allow (write) groupdn = "ldap:///cn=System: Modify Hosts,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
@@ -163,7 +161,7 @@ aci: (targetattr = "cn || createtimestamp || entryusn || macaddress || modifytim
|
|||||||
dn: cn=computers,cn=accounts,dc=ipa,dc=example
|
dn: cn=computers,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "memberof")(targetfilter = "(objectclass=ipahost)")(version 3.0;acl "permission:System: Read Host Membership";allow (compare,read,search) userdn = "ldap:///all";)
|
aci: (targetattr = "memberof")(targetfilter = "(objectclass=ipahost)")(version 3.0;acl "permission:System: Read Host Membership";allow (compare,read,search) userdn = "ldap:///all";)
|
||||||
dn: cn=computers,cn=accounts,dc=ipa,dc=example
|
dn: cn=computers,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "cn || createtimestamp || description || enrolledby || entryusn || fqdn || ipaassignedidview || ipaclientversion || ipakrbauthzdata || ipasshpubkey || ipauniqueid || krbcanonicalname || krblastpwdchange || krbpasswordexpiration || krbprincipalaliases || krbprincipalauthind || krbprincipalexpiration || krbprincipalname || l || macaddress || managedby || memberprincipal || modifytimestamp || nshardwareplatform || nshostlocation || nsosversion || objectclass || serverhostname || usercertificate || userclass")(targetfilter = "(objectclass=ipahost)")(version 3.0;acl "permission:System: Read Hosts";allow (compare,read,search) userdn = "ldap:///all";)
|
aci: (targetattr = "cn || createtimestamp || description || enrolledby || entryusn || fqdn || ipaassignedidview || ipaclientversion || ipakrbauthzdata || ipasshpubkey || ipauniqueid || krbcanonicalname || krblastpwdchange || krbpasswordexpiration || krbprincipalaliases || krbprincipalauthind || krbprincipalexpiration || krbprincipalname || l || macaddress || managedby || modifytimestamp || nshardwareplatform || nshostlocation || nsosversion || objectclass || serverhostname || usercertificate || userclass")(targetfilter = "(objectclass=ipahost)")(version 3.0;acl "permission:System: Read Hosts";allow (compare,read,search) userdn = "ldap:///all";)
|
||||||
dn: cn=computers,cn=accounts,dc=ipa,dc=example
|
dn: cn=computers,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetfilter = "(objectclass=ipahost)")(version 3.0;acl "permission:System: Remove Hosts";allow (delete) groupdn = "ldap:///cn=System: Remove Hosts,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetfilter = "(objectclass=ipahost)")(version 3.0;acl "permission:System: Remove Hosts";allow (delete) groupdn = "ldap:///cn=System: Remove Hosts,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=hostgroups,cn=accounts,dc=ipa,dc=example
|
dn: cn=hostgroups,cn=accounts,dc=ipa,dc=example
|
||||||
@@ -182,16 +180,6 @@ dn: cn=views,cn=accounts,dc=ipa,dc=example
|
|||||||
aci: (targetattr = "cn || createtimestamp || description || entryusn || gidnumber || ipaanchoruuid || modifytimestamp || objectclass")(targetfilter = "(objectclass=ipaGroupOverride)")(version 3.0;acl "permission:System: Read Group ID Overrides";allow (compare,read,search) userdn = "ldap:///all";)
|
aci: (targetattr = "cn || createtimestamp || description || entryusn || gidnumber || ipaanchoruuid || modifytimestamp || objectclass")(targetfilter = "(objectclass=ipaGroupOverride)")(version 3.0;acl "permission:System: Read Group ID Overrides";allow (compare,read,search) userdn = "ldap:///all";)
|
||||||
dn: cn=views,cn=accounts,dc=ipa,dc=example
|
dn: cn=views,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "createtimestamp || description || entryusn || gecos || gidnumber || homedirectory || ipaanchoruuid || ipaoriginaluid || ipasshpubkey || loginshell || memberof || modifytimestamp || objectclass || uid || uidnumber || usercertificate")(targetfilter = "(objectclass=ipaUserOverride)")(version 3.0;acl "permission:System: Read User ID Overrides";allow (compare,read,search) userdn = "ldap:///all";)
|
aci: (targetattr = "createtimestamp || description || entryusn || gecos || gidnumber || homedirectory || ipaanchoruuid || ipaoriginaluid || ipasshpubkey || loginshell || memberof || modifytimestamp || objectclass || uid || uidnumber || usercertificate")(targetfilter = "(objectclass=ipaUserOverride)")(version 3.0;acl "permission:System: Read User ID Overrides";allow (compare,read,search) userdn = "ldap:///all";)
|
||||||
dn: cn=idp,dc=ipa,dc=example
|
|
||||||
aci: (targetfilter = "(objectclass=ipaidp)")(version 3.0;acl "permission:System: Add External IdP server";allow (add) groupdn = "ldap:///cn=System: Add External IdP server,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
|
||||||
dn: cn=idp,dc=ipa,dc=example
|
|
||||||
aci: (targetfilter = "(objectclass=ipaidp)")(version 3.0;acl "permission:System: Delete External IdP server";allow (delete) groupdn = "ldap:///cn=System: Delete External IdP server,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
|
||||||
dn: cn=idp,dc=ipa,dc=example
|
|
||||||
aci: (targetattr = "cn || ipaidpauthendpoint || ipaidpclientid || ipaidpclientsecret || ipaidpdevauthendpoint || ipaidpissuerurl || ipaidpkeysendpoint || ipaidpscope || ipaidpsub || ipaidptokenendpoint || ipaidpuserinfoendpoint || objectclass")(targetfilter = "(objectclass=ipaidp)")(version 3.0;acl "permission:System: Modify External IdP server";allow (write) groupdn = "ldap:///cn=System: Modify External IdP server,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
|
||||||
dn: cn=idp,dc=ipa,dc=example
|
|
||||||
aci: (targetattr = "cn || createtimestamp || entryusn || ipaidpauthendpoint || ipaidpclientid || ipaidpdevauthendpoint || ipaidpissuerurl || ipaidpkeysendpoint || ipaidpscope || ipaidpsub || ipaidptokenendpoint || ipaidpuserinfoendpoint || modifytimestamp || objectclass")(targetfilter = "(objectclass=ipaidp)")(version 3.0;acl "permission:System: Read External IdP server";allow (compare,read,search) groupdn = "ldap:///cn=System: Read External IdP server,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
|
||||||
dn: cn=idp,dc=ipa,dc=example
|
|
||||||
aci: (targetattr = "cn || createtimestamp || entryusn || ipaidpauthendpoint || ipaidpclientid || ipaidpclientsecret || ipaidpdevauthendpoint || ipaidpissuerurl || ipaidpkeysendpoint || ipaidpscope || ipaidpsub || ipaidptokenendpoint || ipaidpuserinfoendpoint || modifytimestamp || objectclass")(targetfilter = "(objectclass=ipaidp)")(version 3.0;acl "permission:System: Read External IdP server client secret";allow (compare,read,search) groupdn = "ldap:///cn=System: Read External IdP server client secret,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
|
||||||
dn: cn=ranges,cn=etc,dc=ipa,dc=example
|
dn: cn=ranges,cn=etc,dc=ipa,dc=example
|
||||||
aci: (targetattr = "cn || createtimestamp || entryusn || ipaautoprivategroups || ipabaseid || ipabaserid || ipaidrangesize || ipanttrusteddomainsid || iparangetype || ipasecondarybaserid || modifytimestamp || objectclass")(targetfilter = "(objectclass=ipaidrange)")(version 3.0;acl "permission:System: Read ID Ranges";allow (compare,read,search) userdn = "ldap:///all";)
|
aci: (targetattr = "cn || createtimestamp || entryusn || ipaautoprivategroups || ipabaseid || ipabaserid || ipaidrangesize || ipanttrusteddomainsid || iparangetype || ipasecondarybaserid || modifytimestamp || objectclass")(targetfilter = "(objectclass=ipaidrange)")(version 3.0;acl "permission:System: Read ID Ranges";allow (compare,read,search) userdn = "ldap:///all";)
|
||||||
dn: cn=views,cn=accounts,dc=ipa,dc=example
|
dn: cn=views,cn=accounts,dc=ipa,dc=example
|
||||||
@@ -224,10 +212,6 @@ dn: cn=ng,cn=alt,dc=ipa,dc=example
|
|||||||
aci: (targetfilter = "(objectclass=ipanisnetgroup)")(version 3.0;acl "permission:System: Remove Netgroups";allow (delete) groupdn = "ldap:///cn=System: Remove Netgroups,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetfilter = "(objectclass=ipanisnetgroup)")(version 3.0;acl "permission:System: Remove Netgroups";allow (delete) groupdn = "ldap:///cn=System: Remove Netgroups,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=otp,cn=etc,dc=ipa,dc=example
|
dn: cn=otp,cn=etc,dc=ipa,dc=example
|
||||||
aci: (targetattr = "cn || ipatokenhotpauthwindow || ipatokenhotpsyncwindow || ipatokentotpauthwindow || ipatokentotpsyncwindow")(targetfilter = "(objectclass=ipatokenotpconfig)")(version 3.0;acl "permission:System: Read OTP Configuration";allow (compare,read,search) userdn = "ldap:///all";)
|
aci: (targetattr = "cn || ipatokenhotpauthwindow || ipatokenhotpsyncwindow || ipatokentotpauthwindow || ipatokentotpsyncwindow")(targetfilter = "(objectclass=ipatokenotpconfig)")(version 3.0;acl "permission:System: Read OTP Configuration";allow (compare,read,search) userdn = "ldap:///all";)
|
||||||
dn: cn=passkeyconfig,cn=etc,dc=ipa,dc=example
|
|
||||||
aci: (targetattr = "iparequireuserverification")(targetfilter = "(objectclass=ipapasskeyconfigobject)")(version 3.0;acl "permission:System: Modify Passkey Configuration";allow (write) groupdn = "ldap:///cn=System: Modify Passkey Configuration,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
|
||||||
dn: cn=passkeyconfig,cn=etc,dc=ipa,dc=example
|
|
||||||
aci: (targetattr = "cn || iparequireuserverification")(targetfilter = "(objectclass=ipapasskeyconfigobject)")(version 3.0;acl "permission:System: Read Passkey Configuration";allow (compare,read,search) userdn = "ldap:///all";)
|
|
||||||
dn: cn=permissions,cn=pbac,dc=ipa,dc=example
|
dn: cn=permissions,cn=pbac,dc=ipa,dc=example
|
||||||
aci: (targetattr = "member")(targetfilter = "(objectclass=ipapermission)")(version 3.0;acl "permission:System: Modify Privilege Membership";allow (write) groupdn = "ldap:///cn=System: Modify Privilege Membership,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetattr = "member")(targetfilter = "(objectclass=ipapermission)")(version 3.0;acl "permission:System: Modify Privilege Membership";allow (write) groupdn = "ldap:///cn=System: Modify Privilege Membership,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: dc=ipa,dc=example
|
dn: dc=ipa,dc=example
|
||||||
@@ -247,9 +231,9 @@ aci: (targetfilter = "(|(objectclass=ipapwdpolicy)(objectclass=krbpwdpolicy))")(
|
|||||||
dn: cn=IPA.EXAMPLE,cn=kerberos,dc=ipa,dc=example
|
dn: cn=IPA.EXAMPLE,cn=kerberos,dc=ipa,dc=example
|
||||||
aci: (targetfilter = "(|(objectclass=ipapwdpolicy)(objectclass=krbpwdpolicy))")(version 3.0;acl "permission:System: Delete Group Password Policy";allow (delete) groupdn = "ldap:///cn=System: Delete Group Password Policy,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetfilter = "(|(objectclass=ipapwdpolicy)(objectclass=krbpwdpolicy))")(version 3.0;acl "permission:System: Delete Group Password Policy";allow (delete) groupdn = "ldap:///cn=System: Delete Group Password Policy,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=IPA.EXAMPLE,cn=kerberos,dc=ipa,dc=example
|
dn: cn=IPA.EXAMPLE,cn=kerberos,dc=ipa,dc=example
|
||||||
aci: (targetattr = "ipapwddictcheck || ipapwdmaxrepeat || ipapwdmaxsequence || ipapwdusercheck || krbmaxpwdlife || krbminpwdlife || krbpwdfailurecountinterval || krbpwdhistorylength || krbpwdlockoutduration || krbpwdmaxfailure || krbpwdmindiffchars || krbpwdminlength || passwordgracelimit")(targetfilter = "(|(objectclass=ipapwdpolicy)(objectclass=krbpwdpolicy))")(version 3.0;acl "permission:System: Modify Group Password Policy";allow (write) groupdn = "ldap:///cn=System: Modify Group Password Policy,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetattr = "ipapwddictcheck || ipapwdmaxrepeat || ipapwdmaxsequence || ipapwdusercheck || krbmaxpwdlife || krbminpwdlife || krbpwdfailurecountinterval || krbpwdhistorylength || krbpwdlockoutduration || krbpwdmaxfailure || krbpwdmindiffchars || krbpwdminlength")(targetfilter = "(|(objectclass=ipapwdpolicy)(objectclass=krbpwdpolicy))")(version 3.0;acl "permission:System: Modify Group Password Policy";allow (write) groupdn = "ldap:///cn=System: Modify Group Password Policy,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=IPA.EXAMPLE,cn=kerberos,dc=ipa,dc=example
|
dn: cn=IPA.EXAMPLE,cn=kerberos,dc=ipa,dc=example
|
||||||
aci: (targetattr = "cn || cospriority || createtimestamp || entryusn || ipapwddictcheck || ipapwdmaxrepeat || ipapwdmaxsequence || ipapwdusercheck || krbmaxpwdlife || krbminpwdlife || krbpwdfailurecountinterval || krbpwdhistorylength || krbpwdlockoutduration || krbpwdmaxfailure || krbpwdmindiffchars || krbpwdminlength || modifytimestamp || objectclass || passwordgracelimit")(targetfilter = "(|(objectclass=ipapwdpolicy)(objectclass=krbpwdpolicy))")(version 3.0;acl "permission:System: Read Group Password Policy";allow (compare,read,search) groupdn = "ldap:///cn=System: Read Group Password Policy,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetattr = "cn || cospriority || createtimestamp || entryusn || ipapwddictcheck || ipapwdmaxrepeat || ipapwdmaxsequence || ipapwdusercheck || krbmaxpwdlife || krbminpwdlife || krbpwdfailurecountinterval || krbpwdhistorylength || krbpwdlockoutduration || krbpwdmaxfailure || krbpwdmindiffchars || krbpwdminlength || modifytimestamp || objectclass")(targetfilter = "(|(objectclass=ipapwdpolicy)(objectclass=krbpwdpolicy))")(version 3.0;acl "permission:System: Read Group Password Policy";allow (compare,read,search) groupdn = "ldap:///cn=System: Read Group Password Policy,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=radiusproxy,dc=ipa,dc=example
|
dn: cn=radiusproxy,dc=ipa,dc=example
|
||||||
aci: (targetattr = "cn || createtimestamp || description || entryusn || ipatokenradiusretries || ipatokenradiusserver || ipatokenradiustimeout || ipatokenusermapattribute || modifytimestamp || objectclass")(targetfilter = "(objectclass=ipatokenradiusconfiguration)")(version 3.0;acl "permission:System: Read Radius Servers";allow (compare,read,search) groupdn = "ldap:///cn=System: Read Radius Servers,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetattr = "cn || createtimestamp || description || entryusn || ipatokenradiusretries || ipatokenradiusserver || ipatokenradiustimeout || ipatokenusermapattribute || modifytimestamp || objectclass")(targetfilter = "(objectclass=ipatokenradiusconfiguration)")(version 3.0;acl "permission:System: Read Radius Servers";allow (compare,read,search) groupdn = "ldap:///cn=System: Read Radius Servers,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=Realm Domains,cn=ipa,cn=etc,dc=ipa,dc=example
|
dn: cn=Realm Domains,cn=ipa,cn=etc,dc=ipa,dc=example
|
||||||
@@ -287,15 +271,11 @@ aci: (targetattr = "createtimestamp || entryusn || ipaallowedtoperform;read_keys
|
|||||||
dn: cn=services,cn=accounts,dc=ipa,dc=example
|
dn: cn=services,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "krbcanonicalname || krbprincipalname")(targetfilter = "(objectclass=ipaservice)")(version 3.0;acl "permission:System: Manage Service Principals";allow (write) groupdn = "ldap:///cn=System: Manage Service Principals,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetattr = "krbcanonicalname || krbprincipalname")(targetfilter = "(objectclass=ipaservice)")(version 3.0;acl "permission:System: Manage Service Principals";allow (write) groupdn = "ldap:///cn=System: Manage Service Principals,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=services,cn=accounts,dc=ipa,dc=example
|
dn: cn=services,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "memberprincipal || objectclass")(targetfilter = "(objectclass=ipaservice)")(version 3.0;acl "permission:System: Manage Service Resource Delegation";allow (delete,write) groupdn = "ldap:///cn=System: Manage Service Resource Delegation,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
|
||||||
dn: cn=services,cn=accounts,dc=ipa,dc=example
|
|
||||||
aci: (targetattr = "createtimestamp || entryusn || ipaallowedtoperform;write_delegation || modifytimestamp || objectclass")(targetfilter = "(objectclass=ipaservice)")(version 3.0;acl "permission:System: Manage Service Resource Delegation Permissions";allow (compare,read,search,write) groupdn = "ldap:///cn=System: Manage Service Resource Delegation Permissions,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
|
||||||
dn: cn=services,cn=accounts,dc=ipa,dc=example
|
|
||||||
aci: (targetattr = "krbprincipalauthind || usercertificate")(targetfilter = "(objectclass=ipaservice)")(version 3.0;acl "permission:System: Modify Services";allow (write) groupdn = "ldap:///cn=System: Modify Services,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetattr = "krbprincipalauthind || usercertificate")(targetfilter = "(objectclass=ipaservice)")(version 3.0;acl "permission:System: Modify Services";allow (write) groupdn = "ldap:///cn=System: Modify Services,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=services,cn=accounts,dc=ipa,dc=example
|
dn: cn=services,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "cn || createtimestamp || entryusn || gecos || gidnumber || homedirectory || ipantsecurityidentifier || loginshell || modifytimestamp || objectclass || uid || uidnumber")(targetfilter = "(objectclass=ipaservice)")(version 3.0;acl "permission:System: Read POSIX details of SMB services";allow (compare,read,search) userdn = "ldap:///all";)
|
aci: (targetattr = "cn || createtimestamp || entryusn || gecos || gidnumber || homedirectory || ipantsecurityidentifier || loginshell || modifytimestamp || objectclass || uid || uidnumber")(targetfilter = "(objectclass=ipaservice)")(version 3.0;acl "permission:System: Read POSIX details of SMB services";allow (compare,read,search) userdn = "ldap:///all";)
|
||||||
dn: cn=services,cn=accounts,dc=ipa,dc=example
|
dn: cn=services,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "createtimestamp || entryusn || ipakrbauthzdata || ipakrbprincipalalias || ipauniqueid || krbcanonicalname || krblastpwdchange || krbobjectreferences || krbpasswordexpiration || krbprincipalaliases || krbprincipalauthind || krbprincipalexpiration || krbprincipalname || managedby || memberof || memberprincipal || modifytimestamp || objectclass || usercertificate")(targetfilter = "(objectclass=ipaservice)")(version 3.0;acl "permission:System: Read Services";allow (compare,read,search) userdn = "ldap:///all";)
|
aci: (targetattr = "createtimestamp || entryusn || ipakrbauthzdata || ipakrbprincipalalias || ipauniqueid || krbcanonicalname || krblastpwdchange || krbobjectreferences || krbpasswordexpiration || krbprincipalaliases || krbprincipalauthind || krbprincipalexpiration || krbprincipalname || managedby || memberof || modifytimestamp || objectclass || usercertificate")(targetfilter = "(objectclass=ipaservice)")(version 3.0;acl "permission:System: Read Services";allow (compare,read,search) userdn = "ldap:///all";)
|
||||||
dn: cn=services,cn=accounts,dc=ipa,dc=example
|
dn: cn=services,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetfilter = "(objectclass=ipaservice)")(version 3.0;acl "permission:System: Remove Services";allow (delete) groupdn = "ldap:///cn=System: Remove Services,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetfilter = "(objectclass=ipaservice)")(version 3.0;acl "permission:System: Remove Services";allow (delete) groupdn = "ldap:///cn=System: Remove Services,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=s4u2proxy,cn=etc,dc=ipa,dc=example
|
dn: cn=s4u2proxy,cn=etc,dc=ipa,dc=example
|
||||||
@@ -387,8 +367,6 @@ aci: (targetattr = "krbpasswordexpiration || krbprincipalkey || passwordhistory
|
|||||||
dn: cn=users,cn=accounts,dc=ipa,dc=example
|
dn: cn=users,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "krbpasswordexpiration || krbprincipalkey || passwordhistory || sambalmpassword || sambantpassword || userpassword")(targetfilter = "(&(!(memberOf=cn=admins,cn=groups,cn=accounts,dc=ipa,dc=example))(objectclass=posixaccount))")(version 3.0;acl "permission:System: Change User password";allow (write) groupdn = "ldap:///cn=System: Change User password,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetattr = "krbpasswordexpiration || krbprincipalkey || passwordhistory || sambalmpassword || sambantpassword || userpassword")(targetfilter = "(&(!(memberOf=cn=admins,cn=groups,cn=accounts,dc=ipa,dc=example))(objectclass=posixaccount))")(version 3.0;acl "permission:System: Change User password";allow (write) groupdn = "ldap:///cn=System: Change User password,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=users,cn=accounts,dc=ipa,dc=example
|
dn: cn=users,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "ipapasskey || objectclass")(targetfilter = "(objectclass=posixaccount)")(version 3.0;acl "permission:System: Manage Passkey Mappings";allow (write) groupdn = "ldap:///cn=System: Manage Passkey Mappings,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
|
||||||
dn: cn=users,cn=accounts,dc=ipa,dc=example
|
|
||||||
aci: (targetattr = "ipacertmapdata || objectclass")(targetfilter = "(objectclass=posixaccount)")(version 3.0;acl "permission:System: Manage User Certificate Mappings";allow (write) groupdn = "ldap:///cn=System: Manage User Certificate Mappings,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetattr = "ipacertmapdata || objectclass")(targetfilter = "(objectclass=posixaccount)")(version 3.0;acl "permission:System: Manage User Certificate Mappings";allow (write) groupdn = "ldap:///cn=System: Manage User Certificate Mappings,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
dn: cn=users,cn=accounts,dc=ipa,dc=example
|
dn: cn=users,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "usercertificate")(targetfilter = "(&(!(memberOf=cn=admins,cn=groups,cn=accounts,dc=ipa,dc=example))(objectclass=posixaccount))")(version 3.0;acl "permission:System: Manage User Certificates";allow (write) groupdn = "ldap:///cn=System: Manage User Certificates,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
aci: (targetattr = "usercertificate")(targetfilter = "(&(!(memberOf=cn=admins,cn=groups,cn=accounts,dc=ipa,dc=example))(objectclass=posixaccount))")(version 3.0;acl "permission:System: Manage User Certificates";allow (write) groupdn = "ldap:///cn=System: Manage User Certificates,cn=permissions,cn=pbac,dc=ipa,dc=example";)
|
||||||
@@ -405,7 +383,7 @@ aci: (targetattr = "audio || businesscategory || carlicense || departmentnumber
|
|||||||
dn: dc=ipa,dc=example
|
dn: dc=ipa,dc=example
|
||||||
aci: (targetattr = "cn || createtimestamp || entryusn || gecos || gidnumber || homedirectory || loginshell || modifytimestamp || objectclass || uid || uidnumber")(target = "ldap:///cn=users,cn=compat,dc=ipa,dc=example")(version 3.0;acl "permission:System: Read User Compat Tree";allow (compare,read,search) userdn = "ldap:///anyone";)
|
aci: (targetattr = "cn || createtimestamp || entryusn || gecos || gidnumber || homedirectory || loginshell || modifytimestamp || objectclass || uid || uidnumber")(target = "ldap:///cn=users,cn=compat,dc=ipa,dc=example")(version 3.0;acl "permission:System: Read User Compat Tree";allow (compare,read,search) userdn = "ldap:///anyone";)
|
||||||
dn: cn=users,cn=accounts,dc=ipa,dc=example
|
dn: cn=users,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "ipapasskey || ipasshpubkey || ipauniqueid || ipauserauthtype || userclass")(targetfilter = "(objectclass=posixaccount)")(version 3.0;acl "permission:System: Read User IPA Attributes";allow (compare,read,search) userdn = "ldap:///all";)
|
aci: (targetattr = "ipasshpubkey || ipauniqueid || ipauserauthtype || userclass")(targetfilter = "(objectclass=posixaccount)")(version 3.0;acl "permission:System: Read User IPA Attributes";allow (compare,read,search) userdn = "ldap:///all";)
|
||||||
dn: cn=users,cn=accounts,dc=ipa,dc=example
|
dn: cn=users,cn=accounts,dc=ipa,dc=example
|
||||||
aci: (targetattr = "krbcanonicalname || krblastpwdchange || krbpasswordexpiration || krbprincipalaliases || krbprincipalexpiration || krbprincipalname || krbprincipaltype || nsaccountlock")(targetfilter = "(objectclass=posixaccount)")(version 3.0;acl "permission:System: Read User Kerberos Attributes";allow (compare,read,search) userdn = "ldap:///all";)
|
aci: (targetattr = "krbcanonicalname || krblastpwdchange || krbpasswordexpiration || krbprincipalaliases || krbprincipalexpiration || krbprincipalname || krbprincipaltype || nsaccountlock")(targetfilter = "(objectclass=posixaccount)")(version 3.0;acl "permission:System: Read User Kerberos Attributes";allow (compare,read,search) userdn = "ldap:///all";)
|
||||||
dn: cn=users,cn=accounts,dc=ipa,dc=example
|
dn: cn=users,cn=accounts,dc=ipa,dc=example
|
||||||
|
|||||||
@@ -136,8 +136,9 @@ output: Entry('result')
|
|||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: automember_default_group_remove/1
|
command: automember_default_group_remove/1
|
||||||
args: 0,4,3
|
args: 0,5,3
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
|
option: Str('description?', autofill=False, cli_name='desc')
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
||||||
option: StrEnum('type', values=[u'group', u'hostgroup'])
|
option: StrEnum('type', values=[u'group', u'hostgroup'])
|
||||||
option: Str('version?')
|
option: Str('version?')
|
||||||
@@ -145,9 +146,10 @@ output: Entry('result')
|
|||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: Output('value', type=[<type 'unicode'>])
|
output: Output('value', type=[<type 'unicode'>])
|
||||||
command: automember_default_group_set/1
|
command: automember_default_group_set/1
|
||||||
args: 0,5,3
|
args: 0,6,3
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
option: Str('automemberdefaultgroup', cli_name='default_group')
|
option: Str('automemberdefaultgroup', cli_name='default_group')
|
||||||
|
option: Str('description?', autofill=False, cli_name='desc')
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
||||||
option: StrEnum('type', values=[u'group', u'hostgroup'])
|
option: StrEnum('type', values=[u'group', u'hostgroup'])
|
||||||
option: Str('version?')
|
option: Str('version?')
|
||||||
@@ -493,14 +495,13 @@ output: Output('result', type=[<type 'bool'>])
|
|||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: ca_find/1
|
command: ca_find/1
|
||||||
args: 1,12,4
|
args: 1,11,4
|
||||||
arg: Str('criteria?')
|
arg: Str('criteria?')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
option: Str('cn?', autofill=False, cli_name='name')
|
option: Str('cn?', autofill=False, cli_name='name')
|
||||||
option: Str('description?', autofill=False, cli_name='desc')
|
option: Str('description?', autofill=False, cli_name='desc')
|
||||||
option: Str('ipacaid?', autofill=False, cli_name='id')
|
option: Str('ipacaid?', autofill=False, cli_name='id')
|
||||||
option: DNParam('ipacaissuerdn?', autofill=False, cli_name='issuer')
|
option: DNParam('ipacaissuerdn?', autofill=False, cli_name='issuer')
|
||||||
option: Int('ipacarandomserialnumberversion?', autofill=False, cli_name='randomserialnumberversion')
|
|
||||||
option: DNParam('ipacasubjectdn?', autofill=False, cli_name='subject')
|
option: DNParam('ipacasubjectdn?', autofill=False, cli_name='subject')
|
||||||
option: Flag('pkey_only?', autofill=True, default=False)
|
option: Flag('pkey_only?', autofill=True, default=False)
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
||||||
@@ -763,8 +764,8 @@ option: Str('host*', cli_name='hosts')
|
|||||||
option: DateTime('issuedon_from?', autofill=False)
|
option: DateTime('issuedon_from?', autofill=False)
|
||||||
option: DateTime('issuedon_to?', autofill=False)
|
option: DateTime('issuedon_to?', autofill=False)
|
||||||
option: DNParam('issuer?', autofill=False)
|
option: DNParam('issuer?', autofill=False)
|
||||||
option: SerialNumber('max_serial_number?', autofill=False)
|
option: Int('max_serial_number?', autofill=False)
|
||||||
option: SerialNumber('min_serial_number?', autofill=False)
|
option: Int('min_serial_number?', autofill=False)
|
||||||
option: Str('no_host*', cli_name='no_hosts')
|
option: Str('no_host*', cli_name='no_hosts')
|
||||||
option: Flag('no_members', autofill=True, default=True)
|
option: Flag('no_members', autofill=True, default=True)
|
||||||
option: Principal('no_service*', cli_name='no_services')
|
option: Principal('no_service*', cli_name='no_services')
|
||||||
@@ -791,7 +792,7 @@ output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|||||||
output: Output('truncated', type=[<type 'bool'>])
|
output: Output('truncated', type=[<type 'bool'>])
|
||||||
command: cert_remove_hold/1
|
command: cert_remove_hold/1
|
||||||
args: 1,2,1
|
args: 1,2,1
|
||||||
arg: SerialNumber('serial_number')
|
arg: Int('serial_number')
|
||||||
option: Str('cacn?', autofill=True, cli_name='ca', default=u'ipa')
|
option: Str('cacn?', autofill=True, cli_name='ca', default=u'ipa')
|
||||||
option: Str('version?')
|
option: Str('version?')
|
||||||
output: Output('result')
|
output: Output('result')
|
||||||
@@ -812,14 +813,14 @@ output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: cert_revoke/1
|
command: cert_revoke/1
|
||||||
args: 1,3,1
|
args: 1,3,1
|
||||||
arg: SerialNumber('serial_number')
|
arg: Int('serial_number')
|
||||||
option: Str('cacn?', autofill=True, cli_name='ca', default=u'ipa')
|
option: Str('cacn?', autofill=True, cli_name='ca', default=u'ipa')
|
||||||
option: Int('revocation_reason', autofill=True, default=0)
|
option: Int('revocation_reason', autofill=True, default=0)
|
||||||
option: Str('version?')
|
option: Str('version?')
|
||||||
output: Output('result')
|
output: Output('result')
|
||||||
command: cert_show/1
|
command: cert_show/1
|
||||||
args: 1,7,3
|
args: 1,7,3
|
||||||
arg: SerialNumber('serial_number')
|
arg: Int('serial_number')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
option: Str('cacn?', autofill=True, cli_name='ca', default=u'ipa')
|
option: Str('cacn?', autofill=True, cli_name='ca', default=u'ipa')
|
||||||
option: Flag('chain', autofill=True, default=False)
|
option: Flag('chain', autofill=True, default=False)
|
||||||
@@ -832,7 +833,7 @@ output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: cert_status/1
|
command: cert_status/1
|
||||||
args: 1,4,3
|
args: 1,4,3
|
||||||
arg: Str('request_id')
|
arg: Int('request_id')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
option: Str('cacn?', autofill=True, cli_name='ca', default=u'ipa')
|
option: Str('cacn?', autofill=True, cli_name='ca', default=u'ipa')
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
||||||
@@ -1099,7 +1100,7 @@ option: Int('ipasearchrecordslimit?', autofill=False, cli_name='searchrecordslim
|
|||||||
option: Int('ipasearchtimelimit?', autofill=False, cli_name='searchtimelimit')
|
option: Int('ipasearchtimelimit?', autofill=False, cli_name='searchtimelimit')
|
||||||
option: Str('ipaselinuxusermapdefault?', autofill=False)
|
option: Str('ipaselinuxusermapdefault?', autofill=False)
|
||||||
option: Str('ipaselinuxusermaporder?', autofill=False)
|
option: Str('ipaselinuxusermaporder?', autofill=False)
|
||||||
option: StrEnum('ipauserauthtype*', autofill=False, cli_name='user_auth_type', values=[u'password', u'radius', u'otp', u'pkinit', u'hardened', u'idp', u'passkey', u'disabled'])
|
option: StrEnum('ipauserauthtype*', autofill=False, cli_name='user_auth_type', values=[u'password', u'radius', u'otp', u'pkinit', u'hardened', u'disabled'])
|
||||||
option: Bool('ipauserdefaultsubordinateid?', autofill=False, cli_name='user_default_subid')
|
option: Bool('ipauserdefaultsubordinateid?', autofill=False, cli_name='user_default_subid')
|
||||||
option: Str('ipauserobjectclasses*', autofill=False, cli_name='userobjectclasses')
|
option: Str('ipauserobjectclasses*', autofill=False, cli_name='userobjectclasses')
|
||||||
option: IA5Str('ipausersearchfields?', autofill=False, cli_name='usersearch')
|
option: IA5Str('ipausersearchfields?', autofill=False, cli_name='usersearch')
|
||||||
@@ -1798,7 +1799,7 @@ option: DNSNameParam('idnssoamname?', cli_name='name_server')
|
|||||||
option: Int('idnssoarefresh', autofill=True, cli_name='refresh', default=3600)
|
option: Int('idnssoarefresh', autofill=True, cli_name='refresh', default=3600)
|
||||||
option: Int('idnssoaretry', autofill=True, cli_name='retry', default=900)
|
option: Int('idnssoaretry', autofill=True, cli_name='retry', default=900)
|
||||||
option: DNSNameParam('idnssoarname', autofill=True, cli_name='admin_email', default=<DNS name hostmaster>)
|
option: DNSNameParam('idnssoarname', autofill=True, cli_name='admin_email', default=<DNS name hostmaster>)
|
||||||
option: Int('idnssoaserial?', cli_name='serial', deprecated=True)
|
option: Int('idnssoaserial', autofill=True, cli_name='serial')
|
||||||
option: Str('idnsupdatepolicy?', autofill=True, cli_name='update_policy')
|
option: Str('idnsupdatepolicy?', autofill=True, cli_name='update_policy')
|
||||||
option: Str('ip_address?')
|
option: Str('ip_address?')
|
||||||
option: Str('name_from_ip?')
|
option: Str('name_from_ip?')
|
||||||
@@ -1862,7 +1863,7 @@ option: DNSNameParam('idnssoamname?', autofill=False, cli_name='name_server')
|
|||||||
option: Int('idnssoarefresh?', autofill=False, cli_name='refresh', default=3600)
|
option: Int('idnssoarefresh?', autofill=False, cli_name='refresh', default=3600)
|
||||||
option: Int('idnssoaretry?', autofill=False, cli_name='retry', default=900)
|
option: Int('idnssoaretry?', autofill=False, cli_name='retry', default=900)
|
||||||
option: DNSNameParam('idnssoarname?', autofill=False, cli_name='admin_email', default=<DNS name hostmaster>)
|
option: DNSNameParam('idnssoarname?', autofill=False, cli_name='admin_email', default=<DNS name hostmaster>)
|
||||||
option: Int('idnssoaserial?', autofill=False, cli_name='serial', deprecated=True)
|
option: Int('idnssoaserial?', autofill=False, cli_name='serial')
|
||||||
option: Str('idnsupdatepolicy?', autofill=False, cli_name='update_policy')
|
option: Str('idnsupdatepolicy?', autofill=False, cli_name='update_policy')
|
||||||
option: Bool('idnszoneactive?', autofill=False, cli_name='zone_active')
|
option: Bool('idnszoneactive?', autofill=False, cli_name='zone_active')
|
||||||
option: Str('name_from_ip?', autofill=False)
|
option: Str('name_from_ip?', autofill=False)
|
||||||
@@ -1899,7 +1900,7 @@ option: DNSNameParam('idnssoamname?', autofill=False, cli_name='name_server')
|
|||||||
option: Int('idnssoarefresh?', autofill=False, cli_name='refresh', default=3600)
|
option: Int('idnssoarefresh?', autofill=False, cli_name='refresh', default=3600)
|
||||||
option: Int('idnssoaretry?', autofill=False, cli_name='retry', default=900)
|
option: Int('idnssoaretry?', autofill=False, cli_name='retry', default=900)
|
||||||
option: DNSNameParam('idnssoarname?', autofill=False, cli_name='admin_email', default=<DNS name hostmaster>)
|
option: DNSNameParam('idnssoarname?', autofill=False, cli_name='admin_email', default=<DNS name hostmaster>)
|
||||||
option: Int('idnssoaserial?', autofill=False, cli_name='serial', deprecated=True)
|
option: Int('idnssoaserial?', autofill=False, cli_name='serial')
|
||||||
option: Str('idnsupdatepolicy?', autofill=False, cli_name='update_policy')
|
option: Str('idnsupdatepolicy?', autofill=False, cli_name='update_policy')
|
||||||
option: Str('name_from_ip?', autofill=False)
|
option: Str('name_from_ip?', autofill=False)
|
||||||
option: Str('nsec3paramrecord?', autofill=False, cli_name='nsec3param_rec')
|
option: Str('nsec3paramrecord?', autofill=False, cli_name='nsec3param_rec')
|
||||||
@@ -2478,7 +2479,7 @@ option: Bool('ipakrbokasdelegate?', cli_name='ok_as_delegate')
|
|||||||
option: Bool('ipakrboktoauthasdelegate?', cli_name='ok_to_auth_as_delegate')
|
option: Bool('ipakrboktoauthasdelegate?', cli_name='ok_to_auth_as_delegate')
|
||||||
option: Bool('ipakrbrequirespreauth?', cli_name='requires_pre_auth')
|
option: Bool('ipakrbrequirespreauth?', cli_name='requires_pre_auth')
|
||||||
option: Str('ipasshpubkey*', cli_name='sshpubkey')
|
option: Str('ipasshpubkey*', cli_name='sshpubkey')
|
||||||
option: StrEnum('krbprincipalauthind*', cli_name='auth_ind', values=[u'radius', u'otp', u'pkinit', u'hardened', u'idp', u'passkey'])
|
option: StrEnum('krbprincipalauthind*', cli_name='auth_ind', values=[u'radius', u'otp', u'pkinit', u'hardened'])
|
||||||
option: Str('l?', cli_name='locality')
|
option: Str('l?', cli_name='locality')
|
||||||
option: Str('macaddress*')
|
option: Str('macaddress*')
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
option: Flag('no_members', autofill=True, default=False)
|
||||||
@@ -2507,17 +2508,6 @@ option: Str('version?')
|
|||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: host_add_delegation/1
|
|
||||||
args: 2,4,3
|
|
||||||
arg: Str('fqdn', cli_name='hostname')
|
|
||||||
arg: Str('memberprincipal+', alwaysask=True, cli_name='principal')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Str('version?')
|
|
||||||
output: Entry('result')
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: PrimaryKey('value')
|
|
||||||
command: host_add_managedby/1
|
command: host_add_managedby/1
|
||||||
args: 1,5,3
|
args: 1,5,3
|
||||||
arg: Str('fqdn', cli_name='hostname')
|
arg: Str('fqdn', cli_name='hostname')
|
||||||
@@ -2540,20 +2530,6 @@ option: Str('version?')
|
|||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: host_allow_add_delegation/1
|
|
||||||
args: 1,8,3
|
|
||||||
arg: Str('fqdn', cli_name='hostname')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Str('group*', alwaysask=True, cli_name='groups')
|
|
||||||
option: Str('host*', alwaysask=True, cli_name='hosts')
|
|
||||||
option: Str('hostgroup*', alwaysask=True, cli_name='hostgroups')
|
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Str('user*', alwaysask=True, cli_name='users')
|
|
||||||
option: Str('version?')
|
|
||||||
output: Output('completed', type=[<type 'int'>])
|
|
||||||
output: Output('failed', type=[<type 'dict'>])
|
|
||||||
output: Entry('result')
|
|
||||||
command: host_allow_create_keytab/1
|
command: host_allow_create_keytab/1
|
||||||
args: 1,8,3
|
args: 1,8,3
|
||||||
arg: Str('fqdn', cli_name='hostname')
|
arg: Str('fqdn', cli_name='hostname')
|
||||||
@@ -2598,20 +2574,6 @@ option: Str('version?')
|
|||||||
output: Output('result', type=[<type 'bool'>])
|
output: Output('result', type=[<type 'bool'>])
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: host_disallow_add_delegation/1
|
|
||||||
args: 1,8,3
|
|
||||||
arg: Str('fqdn', cli_name='hostname')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Str('group*', alwaysask=True, cli_name='groups')
|
|
||||||
option: Str('host*', alwaysask=True, cli_name='hosts')
|
|
||||||
option: Str('hostgroup*', alwaysask=True, cli_name='hostgroups')
|
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Str('user*', alwaysask=True, cli_name='users')
|
|
||||||
option: Str('version?')
|
|
||||||
output: Output('completed', type=[<type 'int'>])
|
|
||||||
output: Output('failed', type=[<type 'dict'>])
|
|
||||||
output: Entry('result')
|
|
||||||
command: host_disallow_create_keytab/1
|
command: host_disallow_create_keytab/1
|
||||||
args: 1,8,3
|
args: 1,8,3
|
||||||
arg: Str('fqdn', cli_name='hostname')
|
arg: Str('fqdn', cli_name='hostname')
|
||||||
@@ -2653,7 +2615,7 @@ option: Str('in_netgroup*', cli_name='in_netgroups')
|
|||||||
option: Str('in_role*', cli_name='in_roles')
|
option: Str('in_role*', cli_name='in_roles')
|
||||||
option: Str('in_sudorule*', cli_name='in_sudorules')
|
option: Str('in_sudorule*', cli_name='in_sudorules')
|
||||||
option: Str('ipaassignedidview?', autofill=False)
|
option: Str('ipaassignedidview?', autofill=False)
|
||||||
option: StrEnum('krbprincipalauthind*', autofill=False, cli_name='auth_ind', values=[u'radius', u'otp', u'pkinit', u'hardened', u'idp', u'passkey'])
|
option: StrEnum('krbprincipalauthind*', autofill=False, cli_name='auth_ind', values=[u'radius', u'otp', u'pkinit', u'hardened'])
|
||||||
option: Str('l?', autofill=False, cli_name='locality')
|
option: Str('l?', autofill=False, cli_name='locality')
|
||||||
option: Str('macaddress*', autofill=False)
|
option: Str('macaddress*', autofill=False)
|
||||||
option: Str('man_by_host*', cli_name='man_by_hosts')
|
option: Str('man_by_host*', cli_name='man_by_hosts')
|
||||||
@@ -2693,7 +2655,7 @@ option: Bool('ipakrbokasdelegate?', autofill=False, cli_name='ok_as_delegate')
|
|||||||
option: Bool('ipakrboktoauthasdelegate?', autofill=False, cli_name='ok_to_auth_as_delegate')
|
option: Bool('ipakrboktoauthasdelegate?', autofill=False, cli_name='ok_to_auth_as_delegate')
|
||||||
option: Bool('ipakrbrequirespreauth?', autofill=False, cli_name='requires_pre_auth')
|
option: Bool('ipakrbrequirespreauth?', autofill=False, cli_name='requires_pre_auth')
|
||||||
option: Str('ipasshpubkey*', autofill=False, cli_name='sshpubkey')
|
option: Str('ipasshpubkey*', autofill=False, cli_name='sshpubkey')
|
||||||
option: StrEnum('krbprincipalauthind*', autofill=False, cli_name='auth_ind', values=[u'radius', u'otp', u'pkinit', u'hardened', u'idp', u'passkey'])
|
option: StrEnum('krbprincipalauthind*', autofill=False, cli_name='auth_ind', values=[u'radius', u'otp', u'pkinit', u'hardened'])
|
||||||
option: Principal('krbprincipalname*', autofill=False)
|
option: Principal('krbprincipalname*', autofill=False)
|
||||||
option: Str('l?', autofill=False, cli_name='locality')
|
option: Str('l?', autofill=False, cli_name='locality')
|
||||||
option: Str('macaddress*', autofill=False)
|
option: Str('macaddress*', autofill=False)
|
||||||
@@ -2724,17 +2686,6 @@ option: Str('version?')
|
|||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: host_remove_delegation/1
|
|
||||||
args: 2,4,3
|
|
||||||
arg: Str('fqdn', cli_name='hostname')
|
|
||||||
arg: Str('memberprincipal+', alwaysask=True, cli_name='principal')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Str('version?')
|
|
||||||
output: Entry('result')
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: PrimaryKey('value')
|
|
||||||
command: host_remove_managedby/1
|
command: host_remove_managedby/1
|
||||||
args: 1,5,3
|
args: 1,5,3
|
||||||
arg: Str('fqdn', cli_name='hostname')
|
arg: Str('fqdn', cli_name='hostname')
|
||||||
@@ -3102,96 +3053,6 @@ option: Str('version?')
|
|||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: idp_add/1
|
|
||||||
args: 1,18,3
|
|
||||||
arg: Str('cn', cli_name='name')
|
|
||||||
option: Str('addattr*', cli_name='addattr')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Str('ipaidpauthendpoint?', alwaysask=False, cli_name='auth_uri')
|
|
||||||
option: Str('ipaidpbaseurl?', cli_name='base_url')
|
|
||||||
option: Str('ipaidpclientid', cli_name='client_id')
|
|
||||||
option: Password('ipaidpclientsecret?', cli_name='secret', confirm=True)
|
|
||||||
option: Str('ipaidpdevauthendpoint?', alwaysask=False, cli_name='dev_auth_uri')
|
|
||||||
option: Str('ipaidpissuerurl?', cli_name='issuer_url')
|
|
||||||
option: Str('ipaidpkeysendpoint?', alwaysask=False, cli_name='keys_uri')
|
|
||||||
option: Str('ipaidporg?', cli_name='organization')
|
|
||||||
option: StrEnum('ipaidpprovider?', cli_name='provider', values=[u'google', u'github', u'microsoft', u'okta', u'keycloak'])
|
|
||||||
option: Str('ipaidpscope?', cli_name='scope')
|
|
||||||
option: Str('ipaidpsub?', cli_name='idp_user_id')
|
|
||||||
option: Str('ipaidptokenendpoint?', alwaysask=False, cli_name='token_uri')
|
|
||||||
option: Str('ipaidpuserinfoendpoint?', alwaysask=False, cli_name='userinfo_uri')
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Str('setattr*', cli_name='setattr')
|
|
||||||
option: Str('version?')
|
|
||||||
output: Entry('result')
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: PrimaryKey('value')
|
|
||||||
command: idp_del/1
|
|
||||||
args: 1,2,3
|
|
||||||
arg: Str('cn+', cli_name='name')
|
|
||||||
option: Flag('continue', autofill=True, cli_name='continue', default=False)
|
|
||||||
option: Str('version?')
|
|
||||||
output: Output('result', type=[<type 'dict'>])
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: ListOfPrimaryKeys('value')
|
|
||||||
command: idp_find/1
|
|
||||||
args: 1,17,4
|
|
||||||
arg: Str('criteria?')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Str('cn?', autofill=False, cli_name='name')
|
|
||||||
option: Str('ipaidpauthendpoint?', autofill=False, cli_name='auth_uri')
|
|
||||||
option: Str('ipaidpclientid?', autofill=False, cli_name='client_id')
|
|
||||||
option: Password('ipaidpclientsecret?', autofill=False, cli_name='secret', confirm=True)
|
|
||||||
option: Str('ipaidpdevauthendpoint?', autofill=False, cli_name='dev_auth_uri')
|
|
||||||
option: Str('ipaidpissuerurl?', autofill=False, cli_name='issuer_url')
|
|
||||||
option: Str('ipaidpkeysendpoint?', autofill=False, cli_name='keys_uri')
|
|
||||||
option: Str('ipaidpscope?', autofill=False, cli_name='scope')
|
|
||||||
option: Str('ipaidpsub?', autofill=False, cli_name='idp_user_id')
|
|
||||||
option: Str('ipaidptokenendpoint?', autofill=False, cli_name='token_uri')
|
|
||||||
option: Str('ipaidpuserinfoendpoint?', autofill=False, cli_name='userinfo_uri')
|
|
||||||
option: Flag('pkey_only?', autofill=True, default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Int('sizelimit?', autofill=False)
|
|
||||||
option: Int('timelimit?', autofill=False)
|
|
||||||
option: Str('version?')
|
|
||||||
output: Output('count', type=[<type 'int'>])
|
|
||||||
output: ListOfEntries('result')
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: Output('truncated', type=[<type 'bool'>])
|
|
||||||
command: idp_mod/1
|
|
||||||
args: 1,18,3
|
|
||||||
arg: Str('cn', cli_name='name')
|
|
||||||
option: Str('addattr*', cli_name='addattr')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Str('delattr*', cli_name='delattr')
|
|
||||||
option: Str('ipaidpauthendpoint?', autofill=False, cli_name='auth_uri')
|
|
||||||
option: Str('ipaidpclientid?', autofill=False, cli_name='client_id')
|
|
||||||
option: Password('ipaidpclientsecret?', autofill=False, cli_name='secret', confirm=True)
|
|
||||||
option: Str('ipaidpdevauthendpoint?', autofill=False, cli_name='dev_auth_uri')
|
|
||||||
option: Str('ipaidpissuerurl?', autofill=False, cli_name='issuer_url')
|
|
||||||
option: Str('ipaidpkeysendpoint?', autofill=False, cli_name='keys_uri')
|
|
||||||
option: Str('ipaidpscope?', autofill=False, cli_name='scope')
|
|
||||||
option: Str('ipaidpsub?', autofill=False, cli_name='idp_user_id')
|
|
||||||
option: Str('ipaidptokenendpoint?', autofill=False, cli_name='token_uri')
|
|
||||||
option: Str('ipaidpuserinfoendpoint?', autofill=False, cli_name='userinfo_uri')
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Str('rename?', cli_name='rename')
|
|
||||||
option: Flag('rights', autofill=True, default=False)
|
|
||||||
option: Str('setattr*', cli_name='setattr')
|
|
||||||
option: Str('version?')
|
|
||||||
output: Entry('result')
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: PrimaryKey('value')
|
|
||||||
command: idp_show/1
|
|
||||||
args: 1,4,3
|
|
||||||
arg: Str('cn', cli_name='name')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Flag('rights', autofill=True, default=False)
|
|
||||||
option: Str('version?')
|
|
||||||
output: Entry('result')
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: PrimaryKey('value')
|
|
||||||
command: idrange_add/1
|
command: idrange_add/1
|
||||||
args: 1,13,3
|
args: 1,13,3
|
||||||
arg: Str('cn', cli_name='name')
|
arg: Str('cn', cli_name='name')
|
||||||
@@ -3377,21 +3238,17 @@ output: Output('result', type=[<type 'bool'>])
|
|||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: krbtpolicy_mod/1
|
command: krbtpolicy_mod/1
|
||||||
args: 1,21,3
|
args: 1,17,3
|
||||||
arg: Str('uid?', cli_name='user')
|
arg: Str('uid?', cli_name='user')
|
||||||
option: Str('addattr*', cli_name='addattr')
|
option: Str('addattr*', cli_name='addattr')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
option: Str('delattr*', cli_name='delattr')
|
option: Str('delattr*', cli_name='delattr')
|
||||||
option: Int('krbauthindmaxrenewableage_hardened?', autofill=False, cli_name='hardened_maxrenew')
|
option: Int('krbauthindmaxrenewableage_hardened?', autofill=False, cli_name='hardened_maxrenew')
|
||||||
option: Int('krbauthindmaxrenewableage_idp?', autofill=False, cli_name='idp_maxrenew')
|
|
||||||
option: Int('krbauthindmaxrenewableage_otp?', autofill=False, cli_name='otp_maxrenew')
|
option: Int('krbauthindmaxrenewableage_otp?', autofill=False, cli_name='otp_maxrenew')
|
||||||
option: Int('krbauthindmaxrenewableage_passkey?', autofill=False, cli_name='passkey_maxrenew')
|
|
||||||
option: Int('krbauthindmaxrenewableage_pkinit?', autofill=False, cli_name='pkinit_maxrenew')
|
option: Int('krbauthindmaxrenewableage_pkinit?', autofill=False, cli_name='pkinit_maxrenew')
|
||||||
option: Int('krbauthindmaxrenewableage_radius?', autofill=False, cli_name='radius_maxrenew')
|
option: Int('krbauthindmaxrenewableage_radius?', autofill=False, cli_name='radius_maxrenew')
|
||||||
option: Int('krbauthindmaxticketlife_hardened?', autofill=False, cli_name='hardened_maxlife')
|
option: Int('krbauthindmaxticketlife_hardened?', autofill=False, cli_name='hardened_maxlife')
|
||||||
option: Int('krbauthindmaxticketlife_idp?', autofill=False, cli_name='idp_maxlife')
|
|
||||||
option: Int('krbauthindmaxticketlife_otp?', autofill=False, cli_name='otp_maxlife')
|
option: Int('krbauthindmaxticketlife_otp?', autofill=False, cli_name='otp_maxlife')
|
||||||
option: Int('krbauthindmaxticketlife_passkey?', autofill=False, cli_name='passkey_maxlife')
|
|
||||||
option: Int('krbauthindmaxticketlife_pkinit?', autofill=False, cli_name='pkinit_maxlife')
|
option: Int('krbauthindmaxticketlife_pkinit?', autofill=False, cli_name='pkinit_maxlife')
|
||||||
option: Int('krbauthindmaxticketlife_radius?', autofill=False, cli_name='radius_maxlife')
|
option: Int('krbauthindmaxticketlife_radius?', autofill=False, cli_name='radius_maxlife')
|
||||||
option: Int('krbmaxrenewableage?', autofill=False, cli_name='maxrenew')
|
option: Int('krbmaxrenewableage?', autofill=False, cli_name='maxrenew')
|
||||||
@@ -3821,28 +3678,6 @@ option: Str('version?')
|
|||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: passkeyconfig_mod/1
|
|
||||||
args: 0,8,3
|
|
||||||
option: Str('addattr*', cli_name='addattr')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Str('delattr*', cli_name='delattr')
|
|
||||||
option: Bool('iparequireuserverification?', autofill=False, cli_name='require_user_verification')
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Flag('rights', autofill=True, default=False)
|
|
||||||
option: Str('setattr*', cli_name='setattr')
|
|
||||||
option: Str('version?')
|
|
||||||
output: Entry('result')
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: PrimaryKey('value')
|
|
||||||
command: passkeyconfig_show/1
|
|
||||||
args: 0,4,3
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Flag('rights', autofill=True, default=False)
|
|
||||||
option: Str('version?')
|
|
||||||
output: Entry('result')
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: PrimaryKey('value')
|
|
||||||
command: passwd/1
|
command: passwd/1
|
||||||
args: 3,2,3
|
args: 3,2,3
|
||||||
arg: Principal('principal', autofill=True, cli_name='user')
|
arg: Principal('principal', autofill=True, cli_name='user')
|
||||||
@@ -4133,7 +3968,7 @@ output: Entry('result')
|
|||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: pwpolicy_add/1
|
command: pwpolicy_add/1
|
||||||
args: 1,19,3
|
args: 1,18,3
|
||||||
arg: Str('cn', cli_name='group')
|
arg: Str('cn', cli_name='group')
|
||||||
option: Str('addattr*', cli_name='addattr')
|
option: Str('addattr*', cli_name='addattr')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
@@ -4150,7 +3985,6 @@ option: Int('krbpwdlockoutduration?', cli_name='lockouttime')
|
|||||||
option: Int('krbpwdmaxfailure?', cli_name='maxfail')
|
option: Int('krbpwdmaxfailure?', cli_name='maxfail')
|
||||||
option: Int('krbpwdmindiffchars?', cli_name='minclasses')
|
option: Int('krbpwdmindiffchars?', cli_name='minclasses')
|
||||||
option: Int('krbpwdminlength?', cli_name='minlength')
|
option: Int('krbpwdminlength?', cli_name='minlength')
|
||||||
option: Int('passwordgracelimit?', autofill=True, cli_name='gracelimit', default=-1)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
||||||
option: Str('setattr*', cli_name='setattr')
|
option: Str('setattr*', cli_name='setattr')
|
||||||
option: Str('version?')
|
option: Str('version?')
|
||||||
@@ -4166,7 +4000,7 @@ output: Output('result', type=[<type 'dict'>])
|
|||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: ListOfPrimaryKeys('value')
|
output: ListOfPrimaryKeys('value')
|
||||||
command: pwpolicy_find/1
|
command: pwpolicy_find/1
|
||||||
args: 1,21,4
|
args: 1,20,4
|
||||||
arg: Str('criteria?')
|
arg: Str('criteria?')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
option: Str('cn?', autofill=False, cli_name='group')
|
option: Str('cn?', autofill=False, cli_name='group')
|
||||||
@@ -4183,7 +4017,6 @@ option: Int('krbpwdlockoutduration?', autofill=False, cli_name='lockouttime')
|
|||||||
option: Int('krbpwdmaxfailure?', autofill=False, cli_name='maxfail')
|
option: Int('krbpwdmaxfailure?', autofill=False, cli_name='maxfail')
|
||||||
option: Int('krbpwdmindiffchars?', autofill=False, cli_name='minclasses')
|
option: Int('krbpwdmindiffchars?', autofill=False, cli_name='minclasses')
|
||||||
option: Int('krbpwdminlength?', autofill=False, cli_name='minlength')
|
option: Int('krbpwdminlength?', autofill=False, cli_name='minlength')
|
||||||
option: Int('passwordgracelimit?', autofill=False, cli_name='gracelimit', default=-1)
|
|
||||||
option: Flag('pkey_only?', autofill=True, default=False)
|
option: Flag('pkey_only?', autofill=True, default=False)
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
||||||
option: Int('sizelimit?', autofill=False)
|
option: Int('sizelimit?', autofill=False)
|
||||||
@@ -4194,7 +4027,7 @@ output: ListOfEntries('result')
|
|||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: Output('truncated', type=[<type 'bool'>])
|
output: Output('truncated', type=[<type 'bool'>])
|
||||||
command: pwpolicy_mod/1
|
command: pwpolicy_mod/1
|
||||||
args: 1,21,3
|
args: 1,20,3
|
||||||
arg: Str('cn?', cli_name='group')
|
arg: Str('cn?', cli_name='group')
|
||||||
option: Str('addattr*', cli_name='addattr')
|
option: Str('addattr*', cli_name='addattr')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
@@ -4212,7 +4045,6 @@ option: Int('krbpwdlockoutduration?', autofill=False, cli_name='lockouttime')
|
|||||||
option: Int('krbpwdmaxfailure?', autofill=False, cli_name='maxfail')
|
option: Int('krbpwdmaxfailure?', autofill=False, cli_name='maxfail')
|
||||||
option: Int('krbpwdmindiffchars?', autofill=False, cli_name='minclasses')
|
option: Int('krbpwdmindiffchars?', autofill=False, cli_name='minclasses')
|
||||||
option: Int('krbpwdminlength?', autofill=False, cli_name='minlength')
|
option: Int('krbpwdminlength?', autofill=False, cli_name='minlength')
|
||||||
option: Int('passwordgracelimit?', autofill=False, cli_name='gracelimit', default=-1)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
||||||
option: Flag('rights', autofill=True, default=False)
|
option: Flag('rights', autofill=True, default=False)
|
||||||
option: Str('setattr*', cli_name='setattr')
|
option: Str('setattr*', cli_name='setattr')
|
||||||
@@ -4758,7 +4590,7 @@ option: StrEnum('ipakrbauthzdata*', cli_name='pac_type', values=[u'MS-PAC', u'PA
|
|||||||
option: Bool('ipakrbokasdelegate?', cli_name='ok_as_delegate')
|
option: Bool('ipakrbokasdelegate?', cli_name='ok_as_delegate')
|
||||||
option: Bool('ipakrboktoauthasdelegate?', cli_name='ok_to_auth_as_delegate')
|
option: Bool('ipakrboktoauthasdelegate?', cli_name='ok_to_auth_as_delegate')
|
||||||
option: Bool('ipakrbrequirespreauth?', cli_name='requires_pre_auth')
|
option: Bool('ipakrbrequirespreauth?', cli_name='requires_pre_auth')
|
||||||
option: StrEnum('krbprincipalauthind*', cli_name='auth_ind', values=[u'radius', u'otp', u'pkinit', u'hardened', u'idp', u'passkey'])
|
option: StrEnum('krbprincipalauthind*', cli_name='auth_ind', values=[u'radius', u'otp', u'pkinit', u'hardened'])
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
option: Flag('no_members', autofill=True, default=False)
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
||||||
option: Str('setattr*', cli_name='setattr')
|
option: Str('setattr*', cli_name='setattr')
|
||||||
@@ -4779,17 +4611,6 @@ option: Str('version?')
|
|||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: service_add_delegation/1
|
|
||||||
args: 2,4,3
|
|
||||||
arg: Principal('krbcanonicalname', cli_name='canonical_principal')
|
|
||||||
arg: Str('memberprincipal+', alwaysask=True, cli_name='principal')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Str('version?')
|
|
||||||
output: Entry('result')
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: PrimaryKey('value')
|
|
||||||
command: service_add_host/1
|
command: service_add_host/1
|
||||||
args: 1,5,3
|
args: 1,5,3
|
||||||
arg: Principal('krbcanonicalname', cli_name='canonical_principal')
|
arg: Principal('krbcanonicalname', cli_name='canonical_principal')
|
||||||
@@ -4828,20 +4649,6 @@ option: Str('version?')
|
|||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: service_allow_add_delegation/1
|
|
||||||
args: 1,8,3
|
|
||||||
arg: Principal('krbcanonicalname', cli_name='canonical_principal')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Str('group*', alwaysask=True, cli_name='groups')
|
|
||||||
option: Str('host*', alwaysask=True, cli_name='hosts')
|
|
||||||
option: Str('hostgroup*', alwaysask=True, cli_name='hostgroups')
|
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Str('user*', alwaysask=True, cli_name='users')
|
|
||||||
option: Str('version?')
|
|
||||||
output: Output('completed', type=[<type 'int'>])
|
|
||||||
output: Output('failed', type=[<type 'dict'>])
|
|
||||||
output: Entry('result')
|
|
||||||
command: service_allow_create_keytab/1
|
command: service_allow_create_keytab/1
|
||||||
args: 1,8,3
|
args: 1,8,3
|
||||||
arg: Principal('krbcanonicalname', cli_name='canonical_principal')
|
arg: Principal('krbcanonicalname', cli_name='canonical_principal')
|
||||||
@@ -4885,20 +4692,6 @@ option: Str('version?')
|
|||||||
output: Output('result', type=[<type 'bool'>])
|
output: Output('result', type=[<type 'bool'>])
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: service_disallow_add_delegation/1
|
|
||||||
args: 1,8,3
|
|
||||||
arg: Principal('krbcanonicalname', cli_name='canonical_principal')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Str('group*', alwaysask=True, cli_name='groups')
|
|
||||||
option: Str('host*', alwaysask=True, cli_name='hosts')
|
|
||||||
option: Str('hostgroup*', alwaysask=True, cli_name='hostgroups')
|
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Str('user*', alwaysask=True, cli_name='users')
|
|
||||||
option: Str('version?')
|
|
||||||
output: Output('completed', type=[<type 'int'>])
|
|
||||||
output: Output('failed', type=[<type 'dict'>])
|
|
||||||
output: Entry('result')
|
|
||||||
command: service_disallow_create_keytab/1
|
command: service_disallow_create_keytab/1
|
||||||
args: 1,8,3
|
args: 1,8,3
|
||||||
arg: Principal('krbcanonicalname', cli_name='canonical_principal')
|
arg: Principal('krbcanonicalname', cli_name='canonical_principal')
|
||||||
@@ -4933,7 +4726,7 @@ arg: Str('criteria?')
|
|||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
option: StrEnum('ipakrbauthzdata*', autofill=False, cli_name='pac_type', values=[u'MS-PAC', u'PAD', u'NONE'])
|
option: StrEnum('ipakrbauthzdata*', autofill=False, cli_name='pac_type', values=[u'MS-PAC', u'PAD', u'NONE'])
|
||||||
option: Principal('krbcanonicalname?', autofill=False, cli_name='canonical_principal')
|
option: Principal('krbcanonicalname?', autofill=False, cli_name='canonical_principal')
|
||||||
option: StrEnum('krbprincipalauthind*', autofill=False, cli_name='auth_ind', values=[u'radius', u'otp', u'pkinit', u'hardened', u'idp', u'passkey'])
|
option: StrEnum('krbprincipalauthind*', autofill=False, cli_name='auth_ind', values=[u'radius', u'otp', u'pkinit', u'hardened'])
|
||||||
option: Principal('krbprincipalname*', autofill=False, cli_name='principal')
|
option: Principal('krbprincipalname*', autofill=False, cli_name='principal')
|
||||||
option: Str('man_by_host*', cli_name='man_by_hosts')
|
option: Str('man_by_host*', cli_name='man_by_hosts')
|
||||||
option: Flag('no_members', autofill=True, default=True)
|
option: Flag('no_members', autofill=True, default=True)
|
||||||
@@ -4957,7 +4750,7 @@ option: StrEnum('ipakrbauthzdata*', autofill=False, cli_name='pac_type', values=
|
|||||||
option: Bool('ipakrbokasdelegate?', autofill=False, cli_name='ok_as_delegate')
|
option: Bool('ipakrbokasdelegate?', autofill=False, cli_name='ok_as_delegate')
|
||||||
option: Bool('ipakrboktoauthasdelegate?', autofill=False, cli_name='ok_to_auth_as_delegate')
|
option: Bool('ipakrboktoauthasdelegate?', autofill=False, cli_name='ok_to_auth_as_delegate')
|
||||||
option: Bool('ipakrbrequirespreauth?', autofill=False, cli_name='requires_pre_auth')
|
option: Bool('ipakrbrequirespreauth?', autofill=False, cli_name='requires_pre_auth')
|
||||||
option: StrEnum('krbprincipalauthind*', autofill=False, cli_name='auth_ind', values=[u'radius', u'otp', u'pkinit', u'hardened', u'idp', u'passkey'])
|
option: StrEnum('krbprincipalauthind*', autofill=False, cli_name='auth_ind', values=[u'radius', u'otp', u'pkinit', u'hardened'])
|
||||||
option: Principal('krbprincipalname*', autofill=False, cli_name='principal')
|
option: Principal('krbprincipalname*', autofill=False, cli_name='principal')
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
option: Flag('no_members', autofill=True, default=False)
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
||||||
@@ -4979,17 +4772,6 @@ option: Str('version?')
|
|||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: service_remove_delegation/1
|
|
||||||
args: 2,4,3
|
|
||||||
arg: Principal('krbcanonicalname', cli_name='canonical_principal')
|
|
||||||
arg: Str('memberprincipal+', alwaysask=True, cli_name='principal')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Str('version?')
|
|
||||||
output: Entry('result')
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: PrimaryKey('value')
|
|
||||||
command: service_remove_host/1
|
command: service_remove_host/1
|
||||||
args: 1,5,3
|
args: 1,5,3
|
||||||
arg: Principal('krbcanonicalname', cli_name='canonical_principal')
|
arg: Principal('krbcanonicalname', cli_name='canonical_principal')
|
||||||
@@ -5196,7 +4978,7 @@ output: Entry('result')
|
|||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: stageuser_add/1
|
command: stageuser_add/1
|
||||||
args: 1,47,3
|
args: 1,45,3
|
||||||
arg: Str('uid', cli_name='login')
|
arg: Str('uid', cli_name='login')
|
||||||
option: Str('addattr*', cli_name='addattr')
|
option: Str('addattr*', cli_name='addattr')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
@@ -5213,12 +4995,10 @@ option: Int('gidnumber?')
|
|||||||
option: Str('givenname', cli_name='first')
|
option: Str('givenname', cli_name='first')
|
||||||
option: Str('homedirectory?', cli_name='homedir')
|
option: Str('homedirectory?', cli_name='homedir')
|
||||||
option: Str('initials?', autofill=True)
|
option: Str('initials?', autofill=True)
|
||||||
option: Str('ipaidpconfiglink?', cli_name='idp')
|
|
||||||
option: Str('ipaidpsub?', cli_name='idp_user_id')
|
|
||||||
option: Str('ipasshpubkey*', cli_name='sshpubkey')
|
option: Str('ipasshpubkey*', cli_name='sshpubkey')
|
||||||
option: Str('ipatokenradiusconfiglink?', cli_name='radius')
|
option: Str('ipatokenradiusconfiglink?', cli_name='radius')
|
||||||
option: Str('ipatokenradiususername?', cli_name='radius_username')
|
option: Str('ipatokenradiususername?', cli_name='radius_username')
|
||||||
option: StrEnum('ipauserauthtype*', cli_name='user_auth_type', values=[u'password', u'radius', u'otp', u'pkinit', u'hardened', u'idp', u'passkey'])
|
option: StrEnum('ipauserauthtype*', cli_name='user_auth_type', values=[u'password', u'radius', u'otp', u'pkinit', u'hardened'])
|
||||||
option: DateTime('krbpasswordexpiration?', cli_name='password_expiration')
|
option: DateTime('krbpasswordexpiration?', cli_name='password_expiration')
|
||||||
option: DateTime('krbprincipalexpiration?', cli_name='principal_expiration')
|
option: DateTime('krbprincipalexpiration?', cli_name='principal_expiration')
|
||||||
option: Principal('krbprincipalname*', autofill=True, cli_name='principal')
|
option: Principal('krbprincipalname*', autofill=True, cli_name='principal')
|
||||||
@@ -5284,17 +5064,6 @@ option: Str('version?')
|
|||||||
output: Output('completed', type=[<type 'int'>])
|
output: Output('completed', type=[<type 'int'>])
|
||||||
output: Output('failed', type=[<type 'dict'>])
|
output: Output('failed', type=[<type 'dict'>])
|
||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
command: stageuser_add_passkey/1
|
|
||||||
args: 2,4,3
|
|
||||||
arg: Str('uid', cli_name='login')
|
|
||||||
arg: Str('ipapasskey+', alwaysask=True, cli_name='passkey')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Str('version?')
|
|
||||||
output: Entry('result')
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: PrimaryKey('value')
|
|
||||||
command: stageuser_add_principal/1
|
command: stageuser_add_principal/1
|
||||||
args: 2,4,3
|
args: 2,4,3
|
||||||
arg: Str('uid', cli_name='login')
|
arg: Str('uid', cli_name='login')
|
||||||
@@ -5315,7 +5084,7 @@ output: Output('result', type=[<type 'dict'>])
|
|||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: ListOfPrimaryKeys('value')
|
output: ListOfPrimaryKeys('value')
|
||||||
command: stageuser_find/1
|
command: stageuser_find/1
|
||||||
args: 1,62,4
|
args: 1,60,4
|
||||||
arg: Str('criteria?')
|
arg: Str('criteria?')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
option: Str('carlicense*', autofill=False)
|
option: Str('carlicense*', autofill=False)
|
||||||
@@ -5336,15 +5105,13 @@ option: Str('in_role*', cli_name='in_roles')
|
|||||||
option: Str('in_subid*', cli_name='in_subids')
|
option: Str('in_subid*', cli_name='in_subids')
|
||||||
option: Str('in_sudorule*', cli_name='in_sudorules')
|
option: Str('in_sudorule*', cli_name='in_sudorules')
|
||||||
option: Str('initials?', autofill=False)
|
option: Str('initials?', autofill=False)
|
||||||
option: Str('ipaidpconfiglink?', autofill=False, cli_name='idp')
|
|
||||||
option: Str('ipaidpsub?', autofill=False, cli_name='idp_user_id')
|
|
||||||
option: Str('ipanthomedirectory?', autofill=False, cli_name='smb_home_dir')
|
option: Str('ipanthomedirectory?', autofill=False, cli_name='smb_home_dir')
|
||||||
option: StrEnum('ipanthomedirectorydrive?', autofill=False, cli_name='smb_home_drive', values=[u'A:', u'B:', u'C:', u'D:', u'E:', u'F:', u'G:', u'H:', u'I:', u'J:', u'K:', u'L:', u'M:', u'N:', u'O:', u'P:', u'Q:', u'R:', u'S:', u'T:', u'U:', u'V:', u'W:', u'X:', u'Y:', u'Z:'])
|
option: StrEnum('ipanthomedirectorydrive?', autofill=False, cli_name='smb_home_drive', values=[u'A:', u'B:', u'C:', u'D:', u'E:', u'F:', u'G:', u'H:', u'I:', u'J:', u'K:', u'L:', u'M:', u'N:', u'O:', u'P:', u'Q:', u'R:', u'S:', u'T:', u'U:', u'V:', u'W:', u'X:', u'Y:', u'Z:'])
|
||||||
option: Str('ipantlogonscript?', autofill=False, cli_name='smb_logon_script')
|
option: Str('ipantlogonscript?', autofill=False, cli_name='smb_logon_script')
|
||||||
option: Str('ipantprofilepath?', autofill=False, cli_name='smb_profile_path')
|
option: Str('ipantprofilepath?', autofill=False, cli_name='smb_profile_path')
|
||||||
option: Str('ipatokenradiusconfiglink?', autofill=False, cli_name='radius')
|
option: Str('ipatokenradiusconfiglink?', autofill=False, cli_name='radius')
|
||||||
option: Str('ipatokenradiususername?', autofill=False, cli_name='radius_username')
|
option: Str('ipatokenradiususername?', autofill=False, cli_name='radius_username')
|
||||||
option: StrEnum('ipauserauthtype*', autofill=False, cli_name='user_auth_type', values=[u'password', u'radius', u'otp', u'pkinit', u'hardened', u'idp', u'passkey'])
|
option: StrEnum('ipauserauthtype*', autofill=False, cli_name='user_auth_type', values=[u'password', u'radius', u'otp', u'pkinit', u'hardened'])
|
||||||
option: DateTime('krbpasswordexpiration?', autofill=False, cli_name='password_expiration')
|
option: DateTime('krbpasswordexpiration?', autofill=False, cli_name='password_expiration')
|
||||||
option: DateTime('krbprincipalexpiration?', autofill=False, cli_name='principal_expiration')
|
option: DateTime('krbprincipalexpiration?', autofill=False, cli_name='principal_expiration')
|
||||||
option: Principal('krbprincipalname*', autofill=False, cli_name='principal')
|
option: Principal('krbprincipalname*', autofill=False, cli_name='principal')
|
||||||
@@ -5384,7 +5151,7 @@ output: ListOfEntries('result')
|
|||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: Output('truncated', type=[<type 'bool'>])
|
output: Output('truncated', type=[<type 'bool'>])
|
||||||
command: stageuser_mod/1
|
command: stageuser_mod/1
|
||||||
args: 1,53,3
|
args: 1,51,3
|
||||||
arg: Str('uid', cli_name='login')
|
arg: Str('uid', cli_name='login')
|
||||||
option: Str('addattr*', cli_name='addattr')
|
option: Str('addattr*', cli_name='addattr')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
@@ -5401,8 +5168,6 @@ option: Int('gidnumber?', autofill=False)
|
|||||||
option: Str('givenname?', autofill=False, cli_name='first')
|
option: Str('givenname?', autofill=False, cli_name='first')
|
||||||
option: Str('homedirectory?', autofill=False, cli_name='homedir')
|
option: Str('homedirectory?', autofill=False, cli_name='homedir')
|
||||||
option: Str('initials?', autofill=False)
|
option: Str('initials?', autofill=False)
|
||||||
option: Str('ipaidpconfiglink?', autofill=False, cli_name='idp')
|
|
||||||
option: Str('ipaidpsub?', autofill=False, cli_name='idp_user_id')
|
|
||||||
option: Str('ipanthomedirectory?', autofill=False, cli_name='smb_home_dir')
|
option: Str('ipanthomedirectory?', autofill=False, cli_name='smb_home_dir')
|
||||||
option: StrEnum('ipanthomedirectorydrive?', autofill=False, cli_name='smb_home_drive', values=[u'A:', u'B:', u'C:', u'D:', u'E:', u'F:', u'G:', u'H:', u'I:', u'J:', u'K:', u'L:', u'M:', u'N:', u'O:', u'P:', u'Q:', u'R:', u'S:', u'T:', u'U:', u'V:', u'W:', u'X:', u'Y:', u'Z:'])
|
option: StrEnum('ipanthomedirectorydrive?', autofill=False, cli_name='smb_home_drive', values=[u'A:', u'B:', u'C:', u'D:', u'E:', u'F:', u'G:', u'H:', u'I:', u'J:', u'K:', u'L:', u'M:', u'N:', u'O:', u'P:', u'Q:', u'R:', u'S:', u'T:', u'U:', u'V:', u'W:', u'X:', u'Y:', u'Z:'])
|
||||||
option: Str('ipantlogonscript?', autofill=False, cli_name='smb_logon_script')
|
option: Str('ipantlogonscript?', autofill=False, cli_name='smb_logon_script')
|
||||||
@@ -5410,7 +5175,7 @@ option: Str('ipantprofilepath?', autofill=False, cli_name='smb_profile_path')
|
|||||||
option: Str('ipasshpubkey*', autofill=False, cli_name='sshpubkey')
|
option: Str('ipasshpubkey*', autofill=False, cli_name='sshpubkey')
|
||||||
option: Str('ipatokenradiusconfiglink?', autofill=False, cli_name='radius')
|
option: Str('ipatokenradiusconfiglink?', autofill=False, cli_name='radius')
|
||||||
option: Str('ipatokenradiususername?', autofill=False, cli_name='radius_username')
|
option: Str('ipatokenradiususername?', autofill=False, cli_name='radius_username')
|
||||||
option: StrEnum('ipauserauthtype*', autofill=False, cli_name='user_auth_type', values=[u'password', u'radius', u'otp', u'pkinit', u'hardened', u'idp', u'passkey'])
|
option: StrEnum('ipauserauthtype*', autofill=False, cli_name='user_auth_type', values=[u'password', u'radius', u'otp', u'pkinit', u'hardened'])
|
||||||
option: DateTime('krbpasswordexpiration?', autofill=False, cli_name='password_expiration')
|
option: DateTime('krbpasswordexpiration?', autofill=False, cli_name='password_expiration')
|
||||||
option: DateTime('krbprincipalexpiration?', autofill=False, cli_name='principal_expiration')
|
option: DateTime('krbprincipalexpiration?', autofill=False, cli_name='principal_expiration')
|
||||||
option: Principal('krbprincipalname*', autofill=False, cli_name='principal')
|
option: Principal('krbprincipalname*', autofill=False, cli_name='principal')
|
||||||
@@ -5478,17 +5243,6 @@ option: Str('version?')
|
|||||||
output: Output('completed', type=[<type 'int'>])
|
output: Output('completed', type=[<type 'int'>])
|
||||||
output: Output('failed', type=[<type 'dict'>])
|
output: Output('failed', type=[<type 'dict'>])
|
||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
command: stageuser_remove_passkey/1
|
|
||||||
args: 2,4,3
|
|
||||||
arg: Str('uid', cli_name='login')
|
|
||||||
arg: Str('ipapasskey+', alwaysask=True, cli_name='passkey')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Str('version?')
|
|
||||||
output: Entry('result')
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: PrimaryKey('value')
|
|
||||||
command: stageuser_remove_principal/1
|
command: stageuser_remove_principal/1
|
||||||
args: 2,4,3
|
args: 2,4,3
|
||||||
arg: Str('uid', cli_name='login')
|
arg: Str('uid', cli_name='login')
|
||||||
@@ -5818,7 +5572,7 @@ command: sudorule_add_option/1
|
|||||||
args: 1,5,3
|
args: 1,5,3
|
||||||
arg: Str('cn', cli_name='sudorule_name')
|
arg: Str('cn', cli_name='sudorule_name')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
option: Str('ipasudoopt+', cli_name='sudooption')
|
option: Str('ipasudoopt', cli_name='sudooption')
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
option: Flag('no_members', autofill=True, default=False)
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
||||||
option: Str('version?')
|
option: Str('version?')
|
||||||
@@ -5973,7 +5727,7 @@ command: sudorule_remove_option/1
|
|||||||
args: 1,5,3
|
args: 1,5,3
|
||||||
arg: Str('cn', cli_name='sudorule_name')
|
arg: Str('cn', cli_name='sudorule_name')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
option: Str('ipasudoopt+', cli_name='sudooption')
|
option: Str('ipasudoopt', cli_name='sudooption')
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
option: Flag('no_members', autofill=True, default=False)
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
||||||
option: Str('version?')
|
option: Str('version?')
|
||||||
@@ -6404,7 +6158,7 @@ output: Entry('result')
|
|||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: user_add/1
|
command: user_add/1
|
||||||
args: 1,48,3
|
args: 1,46,3
|
||||||
arg: Str('uid', cli_name='login')
|
arg: Str('uid', cli_name='login')
|
||||||
option: Str('addattr*', cli_name='addattr')
|
option: Str('addattr*', cli_name='addattr')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
@@ -6420,12 +6174,10 @@ option: Int('gidnumber?')
|
|||||||
option: Str('givenname', cli_name='first')
|
option: Str('givenname', cli_name='first')
|
||||||
option: Str('homedirectory?', cli_name='homedir')
|
option: Str('homedirectory?', cli_name='homedir')
|
||||||
option: Str('initials?', autofill=True)
|
option: Str('initials?', autofill=True)
|
||||||
option: Str('ipaidpconfiglink?', cli_name='idp')
|
|
||||||
option: Str('ipaidpsub?', cli_name='idp_user_id')
|
|
||||||
option: Str('ipasshpubkey*', cli_name='sshpubkey')
|
option: Str('ipasshpubkey*', cli_name='sshpubkey')
|
||||||
option: Str('ipatokenradiusconfiglink?', cli_name='radius')
|
option: Str('ipatokenradiusconfiglink?', cli_name='radius')
|
||||||
option: Str('ipatokenradiususername?', cli_name='radius_username')
|
option: Str('ipatokenradiususername?', cli_name='radius_username')
|
||||||
option: StrEnum('ipauserauthtype*', cli_name='user_auth_type', values=[u'password', u'radius', u'otp', u'pkinit', u'hardened', u'idp', u'passkey'])
|
option: StrEnum('ipauserauthtype*', cli_name='user_auth_type', values=[u'password', u'radius', u'otp', u'pkinit', u'hardened'])
|
||||||
option: DateTime('krbpasswordexpiration?', cli_name='password_expiration')
|
option: DateTime('krbpasswordexpiration?', cli_name='password_expiration')
|
||||||
option: DateTime('krbprincipalexpiration?', cli_name='principal_expiration')
|
option: DateTime('krbprincipalexpiration?', cli_name='principal_expiration')
|
||||||
option: Principal('krbprincipalname*', autofill=True, cli_name='principal')
|
option: Principal('krbprincipalname*', autofill=True, cli_name='principal')
|
||||||
@@ -6493,17 +6245,6 @@ option: Str('version?')
|
|||||||
output: Output('completed', type=[<type 'int'>])
|
output: Output('completed', type=[<type 'int'>])
|
||||||
output: Output('failed', type=[<type 'dict'>])
|
output: Output('failed', type=[<type 'dict'>])
|
||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
command: user_add_passkey/1
|
|
||||||
args: 2,4,3
|
|
||||||
arg: Str('uid', cli_name='login')
|
|
||||||
arg: Str('ipapasskey+', alwaysask=True, cli_name='passkey')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Str('version?')
|
|
||||||
output: Entry('result')
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: PrimaryKey('value')
|
|
||||||
command: user_add_principal/1
|
command: user_add_principal/1
|
||||||
args: 2,4,3
|
args: 2,4,3
|
||||||
arg: Str('uid', cli_name='login')
|
arg: Str('uid', cli_name='login')
|
||||||
@@ -6539,7 +6280,7 @@ output: Output('result', type=[<type 'bool'>])
|
|||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
command: user_find/1
|
command: user_find/1
|
||||||
args: 1,65,4
|
args: 1,63,4
|
||||||
arg: Str('criteria?')
|
arg: Str('criteria?')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
option: Str('carlicense*', autofill=False)
|
option: Str('carlicense*', autofill=False)
|
||||||
@@ -6560,15 +6301,13 @@ option: Str('in_role*', cli_name='in_roles')
|
|||||||
option: Str('in_subid*', cli_name='in_subids')
|
option: Str('in_subid*', cli_name='in_subids')
|
||||||
option: Str('in_sudorule*', cli_name='in_sudorules')
|
option: Str('in_sudorule*', cli_name='in_sudorules')
|
||||||
option: Str('initials?', autofill=False)
|
option: Str('initials?', autofill=False)
|
||||||
option: Str('ipaidpconfiglink?', autofill=False, cli_name='idp')
|
|
||||||
option: Str('ipaidpsub?', autofill=False, cli_name='idp_user_id')
|
|
||||||
option: Str('ipanthomedirectory?', autofill=False, cli_name='smb_home_dir')
|
option: Str('ipanthomedirectory?', autofill=False, cli_name='smb_home_dir')
|
||||||
option: StrEnum('ipanthomedirectorydrive?', autofill=False, cli_name='smb_home_drive', values=[u'A:', u'B:', u'C:', u'D:', u'E:', u'F:', u'G:', u'H:', u'I:', u'J:', u'K:', u'L:', u'M:', u'N:', u'O:', u'P:', u'Q:', u'R:', u'S:', u'T:', u'U:', u'V:', u'W:', u'X:', u'Y:', u'Z:'])
|
option: StrEnum('ipanthomedirectorydrive?', autofill=False, cli_name='smb_home_drive', values=[u'A:', u'B:', u'C:', u'D:', u'E:', u'F:', u'G:', u'H:', u'I:', u'J:', u'K:', u'L:', u'M:', u'N:', u'O:', u'P:', u'Q:', u'R:', u'S:', u'T:', u'U:', u'V:', u'W:', u'X:', u'Y:', u'Z:'])
|
||||||
option: Str('ipantlogonscript?', autofill=False, cli_name='smb_logon_script')
|
option: Str('ipantlogonscript?', autofill=False, cli_name='smb_logon_script')
|
||||||
option: Str('ipantprofilepath?', autofill=False, cli_name='smb_profile_path')
|
option: Str('ipantprofilepath?', autofill=False, cli_name='smb_profile_path')
|
||||||
option: Str('ipatokenradiusconfiglink?', autofill=False, cli_name='radius')
|
option: Str('ipatokenradiusconfiglink?', autofill=False, cli_name='radius')
|
||||||
option: Str('ipatokenradiususername?', autofill=False, cli_name='radius_username')
|
option: Str('ipatokenradiususername?', autofill=False, cli_name='radius_username')
|
||||||
option: StrEnum('ipauserauthtype*', autofill=False, cli_name='user_auth_type', values=[u'password', u'radius', u'otp', u'pkinit', u'hardened', u'idp', u'passkey'])
|
option: StrEnum('ipauserauthtype*', autofill=False, cli_name='user_auth_type', values=[u'password', u'radius', u'otp', u'pkinit', u'hardened'])
|
||||||
option: DateTime('krbpasswordexpiration?', autofill=False, cli_name='password_expiration')
|
option: DateTime('krbpasswordexpiration?', autofill=False, cli_name='password_expiration')
|
||||||
option: DateTime('krbprincipalexpiration?', autofill=False, cli_name='principal_expiration')
|
option: DateTime('krbprincipalexpiration?', autofill=False, cli_name='principal_expiration')
|
||||||
option: Principal('krbprincipalname*', autofill=False, cli_name='principal')
|
option: Principal('krbprincipalname*', autofill=False, cli_name='principal')
|
||||||
@@ -6611,7 +6350,7 @@ output: ListOfEntries('result')
|
|||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: Output('truncated', type=[<type 'bool'>])
|
output: Output('truncated', type=[<type 'bool'>])
|
||||||
command: user_mod/1
|
command: user_mod/1
|
||||||
args: 1,54,3
|
args: 1,52,3
|
||||||
arg: Str('uid', cli_name='login')
|
arg: Str('uid', cli_name='login')
|
||||||
option: Str('addattr*', cli_name='addattr')
|
option: Str('addattr*', cli_name='addattr')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
@@ -6628,8 +6367,6 @@ option: Int('gidnumber?', autofill=False)
|
|||||||
option: Str('givenname?', autofill=False, cli_name='first')
|
option: Str('givenname?', autofill=False, cli_name='first')
|
||||||
option: Str('homedirectory?', autofill=False, cli_name='homedir')
|
option: Str('homedirectory?', autofill=False, cli_name='homedir')
|
||||||
option: Str('initials?', autofill=False)
|
option: Str('initials?', autofill=False)
|
||||||
option: Str('ipaidpconfiglink?', autofill=False, cli_name='idp')
|
|
||||||
option: Str('ipaidpsub?', autofill=False, cli_name='idp_user_id')
|
|
||||||
option: Str('ipanthomedirectory?', autofill=False, cli_name='smb_home_dir')
|
option: Str('ipanthomedirectory?', autofill=False, cli_name='smb_home_dir')
|
||||||
option: StrEnum('ipanthomedirectorydrive?', autofill=False, cli_name='smb_home_drive', values=[u'A:', u'B:', u'C:', u'D:', u'E:', u'F:', u'G:', u'H:', u'I:', u'J:', u'K:', u'L:', u'M:', u'N:', u'O:', u'P:', u'Q:', u'R:', u'S:', u'T:', u'U:', u'V:', u'W:', u'X:', u'Y:', u'Z:'])
|
option: StrEnum('ipanthomedirectorydrive?', autofill=False, cli_name='smb_home_drive', values=[u'A:', u'B:', u'C:', u'D:', u'E:', u'F:', u'G:', u'H:', u'I:', u'J:', u'K:', u'L:', u'M:', u'N:', u'O:', u'P:', u'Q:', u'R:', u'S:', u'T:', u'U:', u'V:', u'W:', u'X:', u'Y:', u'Z:'])
|
||||||
option: Str('ipantlogonscript?', autofill=False, cli_name='smb_logon_script')
|
option: Str('ipantlogonscript?', autofill=False, cli_name='smb_logon_script')
|
||||||
@@ -6637,7 +6374,7 @@ option: Str('ipantprofilepath?', autofill=False, cli_name='smb_profile_path')
|
|||||||
option: Str('ipasshpubkey*', autofill=False, cli_name='sshpubkey')
|
option: Str('ipasshpubkey*', autofill=False, cli_name='sshpubkey')
|
||||||
option: Str('ipatokenradiusconfiglink?', autofill=False, cli_name='radius')
|
option: Str('ipatokenradiusconfiglink?', autofill=False, cli_name='radius')
|
||||||
option: Str('ipatokenradiususername?', autofill=False, cli_name='radius_username')
|
option: Str('ipatokenradiususername?', autofill=False, cli_name='radius_username')
|
||||||
option: StrEnum('ipauserauthtype*', autofill=False, cli_name='user_auth_type', values=[u'password', u'radius', u'otp', u'pkinit', u'hardened', u'idp', u'passkey'])
|
option: StrEnum('ipauserauthtype*', autofill=False, cli_name='user_auth_type', values=[u'password', u'radius', u'otp', u'pkinit', u'hardened'])
|
||||||
option: DateTime('krbpasswordexpiration?', autofill=False, cli_name='password_expiration')
|
option: DateTime('krbpasswordexpiration?', autofill=False, cli_name='password_expiration')
|
||||||
option: DateTime('krbprincipalexpiration?', autofill=False, cli_name='principal_expiration')
|
option: DateTime('krbprincipalexpiration?', autofill=False, cli_name='principal_expiration')
|
||||||
option: Principal('krbprincipalname*', autofill=False, cli_name='principal')
|
option: Principal('krbprincipalname*', autofill=False, cli_name='principal')
|
||||||
@@ -6706,17 +6443,6 @@ option: Str('version?')
|
|||||||
output: Output('completed', type=[<type 'int'>])
|
output: Output('completed', type=[<type 'int'>])
|
||||||
output: Output('failed', type=[<type 'dict'>])
|
output: Output('failed', type=[<type 'dict'>])
|
||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
command: user_remove_passkey/1
|
|
||||||
args: 2,4,3
|
|
||||||
arg: Str('uid', cli_name='login')
|
|
||||||
arg: Str('ipapasskey+', alwaysask=True, cli_name='passkey')
|
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
|
||||||
option: Flag('no_members', autofill=True, default=False)
|
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
|
||||||
option: Str('version?')
|
|
||||||
output: Entry('result')
|
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
|
||||||
output: PrimaryKey('value')
|
|
||||||
command: user_remove_principal/1
|
command: user_remove_principal/1
|
||||||
args: 2,4,3
|
args: 2,4,3
|
||||||
arg: Str('uid', cli_name='login')
|
arg: Str('uid', cli_name='login')
|
||||||
@@ -6824,7 +6550,7 @@ output: Output('completed', type=[<type 'int'>])
|
|||||||
output: Output('failed', type=[<type 'dict'>])
|
output: Output('failed', type=[<type 'dict'>])
|
||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
command: vault_archive_internal/1
|
command: vault_archive_internal/1
|
||||||
args: 1,10,3
|
args: 1,9,3
|
||||||
arg: Str('cn', cli_name='name')
|
arg: Str('cn', cli_name='name')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
option: Bytes('nonce')
|
option: Bytes('nonce')
|
||||||
@@ -6835,7 +6561,6 @@ option: Flag('shared?', autofill=True, default=False)
|
|||||||
option: Str('username?', cli_name='user')
|
option: Str('username?', cli_name='user')
|
||||||
option: Bytes('vault_data')
|
option: Bytes('vault_data')
|
||||||
option: Str('version?')
|
option: Str('version?')
|
||||||
option: StrEnum('wrapping_algo?', autofill=True, default=u'des-ede3-cbc', values=[u'aes-128-cbc', u'des-ede3-cbc'])
|
|
||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
@@ -6926,7 +6651,7 @@ output: Output('completed', type=[<type 'int'>])
|
|||||||
output: Output('failed', type=[<type 'dict'>])
|
output: Output('failed', type=[<type 'dict'>])
|
||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
command: vault_retrieve_internal/1
|
command: vault_retrieve_internal/1
|
||||||
args: 1,8,3
|
args: 1,7,3
|
||||||
arg: Str('cn', cli_name='name')
|
arg: Str('cn', cli_name='name')
|
||||||
option: Flag('all', autofill=True, cli_name='all', default=False)
|
option: Flag('all', autofill=True, cli_name='all', default=False)
|
||||||
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
option: Flag('raw', autofill=True, cli_name='raw', default=False)
|
||||||
@@ -6935,7 +6660,6 @@ option: Bytes('session_key')
|
|||||||
option: Flag('shared?', autofill=True, default=False)
|
option: Flag('shared?', autofill=True, default=False)
|
||||||
option: Str('username?', cli_name='user')
|
option: Str('username?', cli_name='user')
|
||||||
option: Str('version?')
|
option: Str('version?')
|
||||||
option: StrEnum('wrapping_algo?', autofill=True, default=u'des-ede3-cbc', values=[u'aes-128-cbc', u'des-ede3-cbc'])
|
|
||||||
output: Entry('result')
|
output: Entry('result')
|
||||||
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
output: Output('summary', type=[<type 'unicode'>, <type 'NoneType'>])
|
||||||
output: PrimaryKey('value')
|
output: PrimaryKey('value')
|
||||||
@@ -7260,21 +6984,17 @@ default: hbactest/1
|
|||||||
default: host/1
|
default: host/1
|
||||||
default: host_add/1
|
default: host_add/1
|
||||||
default: host_add_cert/1
|
default: host_add_cert/1
|
||||||
default: host_add_delegation/1
|
|
||||||
default: host_add_managedby/1
|
default: host_add_managedby/1
|
||||||
default: host_add_principal/1
|
default: host_add_principal/1
|
||||||
default: host_allow_add_delegation/1
|
|
||||||
default: host_allow_create_keytab/1
|
default: host_allow_create_keytab/1
|
||||||
default: host_allow_retrieve_keytab/1
|
default: host_allow_retrieve_keytab/1
|
||||||
default: host_del/1
|
default: host_del/1
|
||||||
default: host_disable/1
|
default: host_disable/1
|
||||||
default: host_disallow_add_delegation/1
|
|
||||||
default: host_disallow_create_keytab/1
|
default: host_disallow_create_keytab/1
|
||||||
default: host_disallow_retrieve_keytab/1
|
default: host_disallow_retrieve_keytab/1
|
||||||
default: host_find/1
|
default: host_find/1
|
||||||
default: host_mod/1
|
default: host_mod/1
|
||||||
default: host_remove_cert/1
|
default: host_remove_cert/1
|
||||||
default: host_remove_delegation/1
|
|
||||||
default: host_remove_managedby/1
|
default: host_remove_managedby/1
|
||||||
default: host_remove_principal/1
|
default: host_remove_principal/1
|
||||||
default: host_show/1
|
default: host_show/1
|
||||||
@@ -7303,12 +7023,6 @@ default: idoverrideuser_find/1
|
|||||||
default: idoverrideuser_mod/1
|
default: idoverrideuser_mod/1
|
||||||
default: idoverrideuser_remove_cert/1
|
default: idoverrideuser_remove_cert/1
|
||||||
default: idoverrideuser_show/1
|
default: idoverrideuser_show/1
|
||||||
default: idp/1
|
|
||||||
default: idp_add/1
|
|
||||||
default: idp_del/1
|
|
||||||
default: idp_find/1
|
|
||||||
default: idp_mod/1
|
|
||||||
default: idp_show/1
|
|
||||||
default: idrange/1
|
default: idrange/1
|
||||||
default: idrange_add/1
|
default: idrange_add/1
|
||||||
default: idrange_del/1
|
default: idrange_del/1
|
||||||
@@ -7363,9 +7077,6 @@ default: output_show/1
|
|||||||
default: param/1
|
default: param/1
|
||||||
default: param_find/1
|
default: param_find/1
|
||||||
default: param_show/1
|
default: param_show/1
|
||||||
default: passkeyconfig/1
|
|
||||||
default: passkeyconfig_mod/1
|
|
||||||
default: passkeyconfig_show/1
|
|
||||||
default: passwd/1
|
default: passwd/1
|
||||||
default: permission/1
|
default: permission/1
|
||||||
default: permission_add/1
|
default: permission_add/1
|
||||||
@@ -7447,22 +7158,18 @@ default: server_state/1
|
|||||||
default: service/1
|
default: service/1
|
||||||
default: service_add/1
|
default: service_add/1
|
||||||
default: service_add_cert/1
|
default: service_add_cert/1
|
||||||
default: service_add_delegation/1
|
|
||||||
default: service_add_host/1
|
default: service_add_host/1
|
||||||
default: service_add_principal/1
|
default: service_add_principal/1
|
||||||
default: service_add_smb/1
|
default: service_add_smb/1
|
||||||
default: service_allow_add_delegation/1
|
|
||||||
default: service_allow_create_keytab/1
|
default: service_allow_create_keytab/1
|
||||||
default: service_allow_retrieve_keytab/1
|
default: service_allow_retrieve_keytab/1
|
||||||
default: service_del/1
|
default: service_del/1
|
||||||
default: service_disable/1
|
default: service_disable/1
|
||||||
default: service_disallow_add_delegation/1
|
|
||||||
default: service_disallow_create_keytab/1
|
default: service_disallow_create_keytab/1
|
||||||
default: service_disallow_retrieve_keytab/1
|
default: service_disallow_retrieve_keytab/1
|
||||||
default: service_find/1
|
default: service_find/1
|
||||||
default: service_mod/1
|
default: service_mod/1
|
||||||
default: service_remove_cert/1
|
default: service_remove_cert/1
|
||||||
default: service_remove_delegation/1
|
|
||||||
default: service_remove_host/1
|
default: service_remove_host/1
|
||||||
default: service_remove_principal/1
|
default: service_remove_principal/1
|
||||||
default: service_show/1
|
default: service_show/1
|
||||||
@@ -7491,7 +7198,6 @@ default: stageuser_add/1
|
|||||||
default: stageuser_add_cert/1
|
default: stageuser_add_cert/1
|
||||||
default: stageuser_add_certmapdata/1
|
default: stageuser_add_certmapdata/1
|
||||||
default: stageuser_add_manager/1
|
default: stageuser_add_manager/1
|
||||||
default: stageuser_add_passkey/1
|
|
||||||
default: stageuser_add_principal/1
|
default: stageuser_add_principal/1
|
||||||
default: stageuser_del/1
|
default: stageuser_del/1
|
||||||
default: stageuser_find/1
|
default: stageuser_find/1
|
||||||
@@ -7499,7 +7205,6 @@ default: stageuser_mod/1
|
|||||||
default: stageuser_remove_cert/1
|
default: stageuser_remove_cert/1
|
||||||
default: stageuser_remove_certmapdata/1
|
default: stageuser_remove_certmapdata/1
|
||||||
default: stageuser_remove_manager/1
|
default: stageuser_remove_manager/1
|
||||||
default: stageuser_remove_passkey/1
|
|
||||||
default: stageuser_remove_principal/1
|
default: stageuser_remove_principal/1
|
||||||
default: stageuser_show/1
|
default: stageuser_show/1
|
||||||
default: subid/1
|
default: subid/1
|
||||||
@@ -7588,7 +7293,6 @@ default: user_add/1
|
|||||||
default: user_add_cert/1
|
default: user_add_cert/1
|
||||||
default: user_add_certmapdata/1
|
default: user_add_certmapdata/1
|
||||||
default: user_add_manager/1
|
default: user_add_manager/1
|
||||||
default: user_add_passkey/1
|
|
||||||
default: user_add_principal/1
|
default: user_add_principal/1
|
||||||
default: user_del/1
|
default: user_del/1
|
||||||
default: user_disable/1
|
default: user_disable/1
|
||||||
@@ -7598,7 +7302,6 @@ default: user_mod/1
|
|||||||
default: user_remove_cert/1
|
default: user_remove_cert/1
|
||||||
default: user_remove_certmapdata/1
|
default: user_remove_certmapdata/1
|
||||||
default: user_remove_manager/1
|
default: user_remove_manager/1
|
||||||
default: user_remove_passkey/1
|
|
||||||
default: user_remove_principal/1
|
default: user_remove_principal/1
|
||||||
default: user_show/1
|
default: user_show/1
|
||||||
default: user_stage/1
|
default: user_stage/1
|
||||||
@@ -7626,7 +7329,6 @@ default: vaultcontainer_del/1
|
|||||||
default: vaultcontainer_remove_owner/1
|
default: vaultcontainer_remove_owner/1
|
||||||
default: vaultcontainer_show/1
|
default: vaultcontainer_show/1
|
||||||
default: whoami/1
|
default: whoami/1
|
||||||
capability: vault_aes_keywrap 2.246
|
|
||||||
capability: messages 2.52
|
capability: messages 2.52
|
||||||
capability: optional_uid_params 2.54
|
capability: optional_uid_params 2.54
|
||||||
capability: permissions2 2.69
|
capability: permissions2 2.69
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ For more information, see http://www.freeipa.org/page/Build
|
|||||||
|
|
||||||
The quickest way to get the dependencies needed for building is:
|
The quickest way to get the dependencies needed for building is:
|
||||||
|
|
||||||
# dnf builddep -D "with_wheels 1" -D "with_lint 1" -D "with_doc 1" --spec freeipa.spec.in --best --allowerasing --setopt=install_weak_deps=False
|
# dnf builddep -b -D "with_wheels 1" -D "with_lint 1" -D "with_doc 1" --spec freeipa.spec.in --best --allowerasing --setopt=install_weak_deps=False
|
||||||
|
|
||||||
TIP: For building with latest dependencies for freeipa master enable copr repo:
|
TIP: For building with latest dependencies for freeipa master enable copr repo:
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,8 @@ Developers:
|
|||||||
Alexander Bokovoy
|
Alexander Bokovoy
|
||||||
Alexander Koksharov
|
Alexander Koksharov
|
||||||
Alexander Scheel
|
Alexander Scheel
|
||||||
Alexandra Nikandrova
|
|
||||||
Alexandre Mulatinho
|
Alexandre Mulatinho
|
||||||
Alexey Slaykovsky
|
Alexey Slaykovsky
|
||||||
Alexey Tikhonov
|
|
||||||
Amit Kumar
|
Amit Kumar
|
||||||
Ana Krivokapić
|
Ana Krivokapić
|
||||||
Andika Triwidada
|
Andika Triwidada
|
||||||
@@ -33,9 +31,7 @@ Developers:
|
|||||||
Benjamin Drung
|
Benjamin Drung
|
||||||
Brian Cook
|
Brian Cook
|
||||||
Brian J. Murrell
|
Brian J. Murrell
|
||||||
Brian Turek
|
|
||||||
Carl George
|
Carl George
|
||||||
Carla Martinez
|
|
||||||
Cédric Jeanneret
|
Cédric Jeanneret
|
||||||
Changmin Teng
|
Changmin Teng
|
||||||
Chris Kelley
|
Chris Kelley
|
||||||
@@ -45,7 +41,6 @@ Developers:
|
|||||||
David Kreitschmann
|
David Kreitschmann
|
||||||
David Kupka
|
David Kupka
|
||||||
David O'Brien
|
David O'Brien
|
||||||
David Pascual
|
|
||||||
David Spångberg
|
David Spångberg
|
||||||
Diane Trout
|
Diane Trout
|
||||||
Dinesh Prasanth M K
|
Dinesh Prasanth M K
|
||||||
@@ -55,11 +50,8 @@ Developers:
|
|||||||
Drew Erny
|
Drew Erny
|
||||||
Emilio Herrera
|
Emilio Herrera
|
||||||
Endi Sukma Dewata
|
Endi Sukma Dewata
|
||||||
Erik
|
|
||||||
Erik Belko
|
|
||||||
Fabiano Fidêncio
|
Fabiano Fidêncio
|
||||||
Felipe Volpone
|
Felipe Volpone
|
||||||
Filip Dvorak
|
|
||||||
Filip Skola
|
Filip Skola
|
||||||
Florence Blanc-Renaud
|
Florence Blanc-Renaud
|
||||||
Francesco Marella
|
Francesco Marella
|
||||||
@@ -73,28 +65,21 @@ Developers:
|
|||||||
German Parente
|
German Parente
|
||||||
Gowrishankar Rajaiyan
|
Gowrishankar Rajaiyan
|
||||||
Günther Deschner
|
Günther Deschner
|
||||||
Hela Basa
|
|
||||||
Ian Kumlien
|
Ian Kumlien
|
||||||
Ian Pilcher
|
Ian Pilcher
|
||||||
Iker Pedrosa
|
|
||||||
Isaac Boukris
|
Isaac Boukris
|
||||||
Jakub Hrozek
|
Jakub Hrozek
|
||||||
James Groffen
|
James Groffen
|
||||||
Jan Barta
|
Jan Barta
|
||||||
Jan Cholasta
|
Jan Cholasta
|
||||||
Jan Kuparinen
|
|
||||||
Jan Pazdziora
|
Jan Pazdziora
|
||||||
Jan Zelený
|
Jan Zelený
|
||||||
Jarl Gullberg
|
|
||||||
Jason Gerard DeRose
|
Jason Gerard DeRose
|
||||||
Jason Woods
|
Jason Woods
|
||||||
Jayesh
|
Jayesh
|
||||||
Jayesh Garg
|
Jayesh Garg
|
||||||
Jeremy Frasier
|
Jeremy Frasier
|
||||||
Jérôme Fenal
|
Jérôme Fenal
|
||||||
Jerry James
|
|
||||||
Jesse Sandberg
|
|
||||||
jh23453
|
|
||||||
Jim Meyering
|
Jim Meyering
|
||||||
Jochen Kellner
|
Jochen Kellner
|
||||||
JoeDrane
|
JoeDrane
|
||||||
@@ -103,7 +88,6 @@ Developers:
|
|||||||
John Morris
|
John Morris
|
||||||
Jr Aquino
|
Jr Aquino
|
||||||
Julian Gethmann
|
Julian Gethmann
|
||||||
Julien Rische
|
|
||||||
Justin Stephenson
|
Justin Stephenson
|
||||||
Kaleemullah Siddiqui
|
Kaleemullah Siddiqui
|
||||||
Karl MacMillan
|
Karl MacMillan
|
||||||
@@ -113,13 +97,11 @@ Developers:
|
|||||||
Lars Sjostrom
|
Lars Sjostrom
|
||||||
Lenka Doudova
|
Lenka Doudova
|
||||||
Lenka Ryznarova
|
Lenka Ryznarova
|
||||||
Lenz Grimmer
|
|
||||||
Lewis Eason
|
Lewis Eason
|
||||||
Lubomír Rintel
|
Lubomír Rintel
|
||||||
Ludwig Krispenz
|
Ludwig Krispenz
|
||||||
Lukáš Slebodník
|
Lukáš Slebodník
|
||||||
Lynn Root
|
Lynn Root
|
||||||
Marcin Stanclik
|
|
||||||
Mark McLoughlin
|
Mark McLoughlin
|
||||||
Mark Reynolds
|
Mark Reynolds
|
||||||
Marko Myllynen
|
Marko Myllynen
|
||||||
@@ -128,8 +110,6 @@ Developers:
|
|||||||
Martin Košek
|
Martin Košek
|
||||||
Martin Nagy
|
Martin Nagy
|
||||||
Matt Rogers
|
Matt Rogers
|
||||||
Matthew Davis
|
|
||||||
mbhalodi
|
|
||||||
Michael Simacek
|
Michael Simacek
|
||||||
Michal Polovka
|
Michal Polovka
|
||||||
Michal Reznik
|
Michal Reznik
|
||||||
@@ -145,7 +125,6 @@ Developers:
|
|||||||
ndehadra
|
ndehadra
|
||||||
Nick Hatch
|
Nick Hatch
|
||||||
Nikhil Dehadrai
|
Nikhil Dehadrai
|
||||||
Nikola Knazekova
|
|
||||||
Nikolai Kondrashov
|
Nikolai Kondrashov
|
||||||
Niranjan Mallapadi
|
Niranjan Mallapadi
|
||||||
Niranjan MR
|
Niranjan MR
|
||||||
@@ -173,22 +152,18 @@ Developers:
|
|||||||
realsobek
|
realsobek
|
||||||
René Genz
|
René Genz
|
||||||
Rich Megginson
|
Rich Megginson
|
||||||
Ricky Tigg
|
|
||||||
Rishabh Dave
|
Rishabh Dave
|
||||||
Rob Crittenden
|
Rob Crittenden
|
||||||
Robbie Harwood
|
Robbie Harwood
|
||||||
Robert Collins
|
Robert Collins
|
||||||
Robert Kuska
|
Robert Kuska
|
||||||
s1341
|
|
||||||
Sam Bristow
|
Sam Bristow
|
||||||
Sam Morris
|
Sam Morris
|
||||||
Scott Poore
|
|
||||||
Sergey Orlov
|
Sergey Orlov
|
||||||
Sergio Oliveira Campos
|
Sergio Oliveira Campos
|
||||||
Serhii Tsymbaliuk
|
Serhii Tsymbaliuk
|
||||||
shanyin
|
shanyin
|
||||||
Simo Sorce
|
Simo Sorce
|
||||||
Simon Nussbaum
|
|
||||||
Slava Aseev
|
Slava Aseev
|
||||||
Spencer E. Olson
|
Spencer E. Olson
|
||||||
Stanislav Laznicka
|
Stanislav Laznicka
|
||||||
@@ -202,20 +177,17 @@ Developers:
|
|||||||
Sumit Bose
|
Sumit Bose
|
||||||
Sylvain Baubeau
|
Sylvain Baubeau
|
||||||
Takeshi MIZUTA
|
Takeshi MIZUTA
|
||||||
Temuri Doghonadze
|
|
||||||
Theodor van Nahl
|
Theodor van Nahl
|
||||||
Thierry Bordaz
|
Thierry Bordaz
|
||||||
Thomas Woerner
|
Thomas Woerner
|
||||||
Thorsten Scherf
|
Thorsten Scherf
|
||||||
Tibor Dudlák
|
Tibor Dudlák
|
||||||
Timo Aaltonen
|
Timo Aaltonen
|
||||||
Todd Zullinger
|
|
||||||
Tomáš Babej
|
Tomáš Babej
|
||||||
Tomas Halman
|
Tomas Halman
|
||||||
Tomáš Křížek
|
Tomáš Křížek
|
||||||
Troy Dawson
|
Troy Dawson
|
||||||
Varun Mylaraiah
|
Varun Mylaraiah
|
||||||
Viacheslav Sychov
|
|
||||||
Viktor Ashirov
|
Viktor Ashirov
|
||||||
Vit Mojzis
|
Vit Mojzis
|
||||||
W. Michael Petullo
|
W. Michael Petullo
|
||||||
@@ -226,7 +198,6 @@ Developers:
|
|||||||
Yuri Chornoivan
|
Yuri Chornoivan
|
||||||
Zdenek Pytela
|
Zdenek Pytela
|
||||||
zdover
|
zdover
|
||||||
김인수
|
|
||||||
|
|
||||||
Documentation:
|
Documentation:
|
||||||
Gabe Alford
|
Gabe Alford
|
||||||
|
|||||||
+4
-11
@@ -23,8 +23,6 @@ PYTHON_SCRIPT_SUBDIRS = \
|
|||||||
$(top_builddir)/install/tools \
|
$(top_builddir)/install/tools \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
PRCI_DEFINITIONS_DIR = $(top_srcdir)/ipatests/prci_definitions
|
|
||||||
|
|
||||||
AZURE_PYTHON_SCRIPT_SUBDIR = $(top_builddir)/ipatests/azure
|
AZURE_PYTHON_SCRIPT_SUBDIR = $(top_builddir)/ipatests/azure
|
||||||
|
|
||||||
IPA_PLACEHOLDERS = freeipa ipa ipaserver ipatests
|
IPA_PLACEHOLDERS = freeipa ipa ipaserver ipatests
|
||||||
@@ -244,7 +242,7 @@ fastcodestyle: $(GENERATED_PYTHON_FILES) ipasetup.py
|
|||||||
| xargs -n1 file 2>/dev/null | grep Python \
|
| xargs -n1 file 2>/dev/null | grep Python \
|
||||||
| cut -d':' -f1; ); \
|
| cut -d':' -f1; ); \
|
||||||
if [ -n "$${PYFILES}" ] && [ -n "$${INFILES}" ]; then \
|
if [ -n "$${PYFILES}" ] && [ -n "$${INFILES}" ]; then \
|
||||||
FILES="$$( printf '%s\n' "$${PYFILES}" "$${INFILES}" )" ; \
|
FILES="$$( printf $${PYFILES}\\n$${INFILES} )" ; \
|
||||||
elif [ -n "$${PYFILES}" ]; then \
|
elif [ -n "$${PYFILES}" ]; then \
|
||||||
FILES="$${PYFILES}" ; \
|
FILES="$${PYFILES}" ; \
|
||||||
else \
|
else \
|
||||||
@@ -274,7 +272,7 @@ endif
|
|||||||
| xargs -n1 file 2>/dev/null | grep Python \
|
| xargs -n1 file 2>/dev/null | grep Python \
|
||||||
| cut -d':' -f1; ); \
|
| cut -d':' -f1; ); \
|
||||||
if [ -n "$${PYFILES}" ] && [ -n "$${INFILES}" ]; then \
|
if [ -n "$${PYFILES}" ] && [ -n "$${INFILES}" ]; then \
|
||||||
FILES="$$( printf '%s\n' "$${PYFILES}" "$${INFILES}" )" ; \
|
FILES="$$( printf $${PYFILES}\\n$${INFILES} )" ; \
|
||||||
elif [ -n "$${PYFILES}" ]; then \
|
elif [ -n "$${PYFILES}" ]; then \
|
||||||
FILES="$${PYFILES}" ; \
|
FILES="$${PYFILES}" ; \
|
||||||
else \
|
else \
|
||||||
@@ -338,8 +336,6 @@ endif # WITH_RPMLINT
|
|||||||
# There are Jinja yaml templates, which differ from reqular ones. These
|
# There are Jinja yaml templates, which differ from reqular ones. These
|
||||||
# files should be placed on skip list (YAML_TEMPLATE_FILES), otherwise
|
# files should be placed on skip list (YAML_TEMPLATE_FILES), otherwise
|
||||||
# safe_load fails.
|
# safe_load fails.
|
||||||
# Also check PRCI definitions yaml files jobs format and content with
|
|
||||||
# prci_checker script
|
|
||||||
.PHONY: yamllint
|
.PHONY: yamllint
|
||||||
yamllint:
|
yamllint:
|
||||||
YAML_TEMPLATE_FILES="\
|
YAML_TEMPLATE_FILES="\
|
||||||
@@ -361,10 +357,7 @@ yamllint:
|
|||||||
echo $${YAML}; \
|
echo $${YAML}; \
|
||||||
$(PYTHON) -c "import yaml; f = open('$${YAML}'); yaml.safe_load(f); f.close()" || { echo Your YAML file: $${YAML} has a wrong syntax or this is a Jinja template. In the latter clause, consider to add your YAML file to the YAML_TEMPLATE_FILES list in Makefile.am.; exit 1; } \
|
$(PYTHON) -c "import yaml; f = open('$${YAML}'); yaml.safe_load(f); f.close()" || { echo Your YAML file: $${YAML} has a wrong syntax or this is a Jinja template. In the latter clause, consider to add your YAML file to the YAML_TEMPLATE_FILES list in Makefile.am.; exit 1; } \
|
||||||
done; \
|
done; \
|
||||||
echo -e "\nCheck PRCI definitions";
|
echo "-----------"
|
||||||
@echo "-----------"
|
|
||||||
$(PYTHON) $(PRCI_DEFINITIONS_DIR)/prci_checker.py -d $(PRCI_DEFINITIONS_DIR) -s $(PRCI_DEFINITIONS_DIR)/prci_jobs_spec.yaml;
|
|
||||||
@echo "-----------"
|
|
||||||
|
|
||||||
# Build & lint documentation.
|
# Build & lint documentation.
|
||||||
#
|
#
|
||||||
@@ -396,7 +389,7 @@ pylint: $(GENERATED_PYTHON_FILES) ipasetup.py python_scripts
|
|||||||
-name '*~' -o \
|
-name '*~' -o \
|
||||||
-name '*.py' -print -o \
|
-name '*.py' -print -o \
|
||||||
-type f -exec grep -qsm1 '^#!.*\bpython' '{}' \; -print`; \
|
-type f -exec grep -qsm1 '^#!.*\bpython' '{}' \; -print`; \
|
||||||
FILES=`echo -e "$${FILES}\n$(AZURE_PYTHON_SCRIPT_SUBDIR)\n$(PRCI_DEFINITIONS_DIR)"`; \
|
FILES=`echo -e "$${FILES}\n$(AZURE_PYTHON_SCRIPT_SUBDIR)"`; \
|
||||||
echo -e "Pylint on $(PYTHON) is running over files:\n$${FILES}\nPlease wait ...\n"; \
|
echo -e "Pylint on $(PYTHON) is running over files:\n$${FILES}\nPlease wait ...\n"; \
|
||||||
$(PYTHON) -m pylint --version; \
|
$(PYTHON) -m pylint --version; \
|
||||||
PYTHONPATH=$(top_srcdir) $(PYTHON) -m pylint \
|
PYTHONPATH=$(top_srcdir) $(PYTHON) -m pylint \
|
||||||
|
|||||||
+9
-14
@@ -20,8 +20,8 @@
|
|||||||
# -> "1.0.0" #
|
# -> "1.0.0" #
|
||||||
########################################################
|
########################################################
|
||||||
define(IPA_VERSION_MAJOR, 4)
|
define(IPA_VERSION_MAJOR, 4)
|
||||||
define(IPA_VERSION_MINOR, 12)
|
define(IPA_VERSION_MINOR, 9)
|
||||||
define(IPA_VERSION_RELEASE, 0)
|
define(IPA_VERSION_RELEASE, 8)
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# For 'pre' releases the version will be #
|
# For 'pre' releases the version will be #
|
||||||
@@ -34,7 +34,7 @@ define(IPA_VERSION_RELEASE, 0)
|
|||||||
# e.g. define(IPA_VERSION_PRE_RELEASE, rc1) #
|
# e.g. define(IPA_VERSION_PRE_RELEASE, rc1) #
|
||||||
# -> "1.0.0rc1" #
|
# -> "1.0.0rc1" #
|
||||||
########################################################
|
########################################################
|
||||||
define(IPA_VERSION_PRE_RELEASE, )
|
define(IPA_VERSION_PRE_RELEASE,)
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# To mark GIT snapshots this should be set to 'yes' #
|
# To mark GIT snapshots this should be set to 'yes' #
|
||||||
@@ -49,7 +49,7 @@ define(IPA_VERSION_PRE_RELEASE, )
|
|||||||
# This option works only with GNU m4: #
|
# This option works only with GNU m4: #
|
||||||
# it requires esyscmd m4 macro. #
|
# it requires esyscmd m4 macro. #
|
||||||
########################################################
|
########################################################
|
||||||
define(IPA_VERSION_IS_GIT_SNAPSHOT, yes)
|
define(IPA_VERSION_IS_GIT_SNAPSHOT, no)
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# git development branch: #
|
# git development branch: #
|
||||||
@@ -58,8 +58,8 @@ define(IPA_VERSION_IS_GIT_SNAPSHOT, yes)
|
|||||||
# - ipa-X-X: define(IPA_GIT_BRANCH, #
|
# - ipa-X-X: define(IPA_GIT_BRANCH, #
|
||||||
# ipa-IPA_VERSION_MAJOR-IPA_VERSION_MINOR) #
|
# ipa-IPA_VERSION_MAJOR-IPA_VERSION_MINOR) #
|
||||||
########################################################
|
########################################################
|
||||||
define(IPA_GIT_BRANCH, master)
|
dnl define(IPA_GIT_BRANCH, master)
|
||||||
dnl define(IPA_GIT_BRANCH, ipa-IPA_VERSION_MAJOR-IPA_VERSION_MINOR)
|
define(IPA_GIT_BRANCH, ipa-IPA_VERSION_MAJOR-IPA_VERSION_MINOR)
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# The version of IPA data. This is used to identify #
|
# The version of IPA data. This is used to identify #
|
||||||
@@ -86,8 +86,9 @@ define(IPA_DATA_VERSION, 20100614120000)
|
|||||||
# #
|
# #
|
||||||
########################################################
|
########################################################
|
||||||
define(IPA_API_VERSION_MAJOR, 2)
|
define(IPA_API_VERSION_MAJOR, 2)
|
||||||
# Last change: add passkey support
|
# Last change: add enable_sid to config
|
||||||
define(IPA_API_VERSION_MINOR, 253)
|
define(IPA_API_VERSION_MINOR, 245)
|
||||||
|
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# Following values are auto-generated from values above
|
# Following values are auto-generated from values above
|
||||||
@@ -137,11 +138,6 @@ ifelse(IPA_VERSION_IS_GIT_SNAPSHOT, yes,
|
|||||||
IPA_GIT_VERSION),
|
IPA_GIT_VERSION),
|
||||||
NEWLINE)) dnl IPA_VERSION end
|
NEWLINE)) dnl IPA_VERSION end
|
||||||
|
|
||||||
########################################################
|
|
||||||
# Version of MIT krb5 used to build IPA
|
|
||||||
########################################################
|
|
||||||
define(IPA_KRB5_BUILD_VERSION, translit(esyscmd(krb5-config --version | awk '{ print $NF }'), NEWLINE))
|
|
||||||
|
|
||||||
dnl DEBUG: uncomment following lines and run command m4 VERSION.m4
|
dnl DEBUG: uncomment following lines and run command m4 VERSION.m4
|
||||||
dnl `IPA_VERSION: ''IPA_VERSION'
|
dnl `IPA_VERSION: ''IPA_VERSION'
|
||||||
dnl `IPA_GIT_VERSION: ''IPA_GIT_VERSION'
|
dnl `IPA_GIT_VERSION: ''IPA_GIT_VERSION'
|
||||||
@@ -149,4 +145,3 @@ dnl `IPA_GIT_BRANCH: ''IPA_GIT_BRANCH'
|
|||||||
dnl `IPA_API_VERSION: ''IPA_API_VERSION'
|
dnl `IPA_API_VERSION: ''IPA_API_VERSION'
|
||||||
dnl `IPA_DATA_VERSION: ''IPA_DATA_VERSION'
|
dnl `IPA_DATA_VERSION: ''IPA_DATA_VERSION'
|
||||||
dnl `IPA_NUM_VERSION: ''IPA_NUM_VERSION'
|
dnl `IPA_NUM_VERSION: ''IPA_NUM_VERSION'
|
||||||
dnl `IPA_KRB5_BUILD_VERSION: ''IPA_KRB5_BUILD_VERSION'
|
|
||||||
@@ -4,6 +4,14 @@ AUTOMAKE_OPTIONS = 1.7 subdir-objects
|
|||||||
|
|
||||||
NULL =
|
NULL =
|
||||||
|
|
||||||
|
AM_CFLAGS = $(NULL)
|
||||||
|
if HAVE_GCC
|
||||||
|
AM_CFLAGS += -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith \
|
||||||
|
-Wcast-align -Werror-implicit-function-declaration \
|
||||||
|
$(NULL)
|
||||||
|
endif
|
||||||
|
export AM_CFLAGS
|
||||||
|
|
||||||
IPA_CONF_FILE=$(sysconfdir)/ipa/default.conf
|
IPA_CONF_FILE=$(sysconfdir)/ipa/default.conf
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
|
|||||||
@@ -769,7 +769,7 @@ static char *ask_password(krb5_context krbctx, char *prompt1, char *prompt2,
|
|||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
num_prompts, ap_prompts);
|
num_prompts, ap_prompts);
|
||||||
|
|
||||||
if (match && (strcmp(pw0, pw1) != 0)) {
|
if (match && (strcmp(pw0, pw1))) {
|
||||||
fprintf(stderr, _("Passwords do not match!\n"));
|
fprintf(stderr, _("Passwords do not match!\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
+101
-67
@@ -57,14 +57,13 @@
|
|||||||
|
|
||||||
char * read_config_file(const char *filename);
|
char * read_config_file(const char *filename);
|
||||||
char * get_config_entry(char * data, const char *section, const char *key);
|
char * get_config_entry(char * data, const char *section, const char *key);
|
||||||
static size_t
|
|
||||||
jsonrpc_handle_response(char *ptr, size_t size, size_t nmemb, void *userdata);
|
|
||||||
|
|
||||||
static int debug = 0;
|
static int debug = 0;
|
||||||
|
|
||||||
#define ASPRINTF(strp, fmt...) \
|
#define ASPRINTF(strp, fmt...) \
|
||||||
if (asprintf(strp, fmt) == -1) { \
|
if (asprintf(strp, fmt) == -1) { \
|
||||||
fprintf(stderr, _("Out of memory!\n")); \
|
if (!quiet) \
|
||||||
|
fprintf(stderr, _("Out of memory!\n")); \
|
||||||
rval = 3; \
|
rval = 3; \
|
||||||
goto cleanup; \
|
goto cleanup; \
|
||||||
}
|
}
|
||||||
@@ -298,7 +297,7 @@ check_ipa_server(LDAP *ld, char **ldap_base, struct berval **vals)
|
|||||||
|
|
||||||
entry = ldap_first_entry(ld, res);
|
entry = ldap_first_entry(ld, res);
|
||||||
infovals = ldap_get_values_len(ld, entry, info_attrs[0]);
|
infovals = ldap_get_values_len(ld, entry, info_attrs[0]);
|
||||||
if (strcmp(infovals[0]->bv_val, "IPA V2.0") == 0)
|
if (!strcmp(infovals[0]->bv_val, "IPA V2.0"))
|
||||||
*ldap_base = strdup(vals[i]->bv_val);
|
*ldap_base = strdup(vals[i]->bv_val);
|
||||||
ldap_msgfree(res);
|
ldap_msgfree(res);
|
||||||
res = NULL;
|
res = NULL;
|
||||||
@@ -419,35 +418,34 @@ join_ldap(const char *ipaserver, const char *hostname, char ** binddn, const cha
|
|||||||
if (NULL != basedn) {
|
if (NULL != basedn) {
|
||||||
ldap_base = strdup(basedn);
|
ldap_base = strdup(basedn);
|
||||||
if (!ldap_base) {
|
if (!ldap_base) {
|
||||||
fprintf(stderr, _("Out of memory!\n"));
|
if (!quiet)
|
||||||
|
fprintf(stderr, _("Out of memory!\n"));
|
||||||
rval = 3;
|
rval = 3;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (get_root_dn(ipaserver, &ldap_base) != 0) {
|
if (get_root_dn(ipaserver, &ldap_base) != 0) {
|
||||||
fprintf(stderr, _("Unable to determine root DN of %s\n"),
|
if (!quiet)
|
||||||
ipaserver);
|
fprintf(stderr, _("Unable to determine root DN of %s\n"),
|
||||||
|
ipaserver);
|
||||||
rval = 14;
|
rval = 14;
|
||||||
goto done;
|
goto done;
|
||||||
} else {
|
|
||||||
if (debug) {
|
|
||||||
fprintf(stderr, "root DN %s\n", ldap_base);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = asprintf(binddn, "fqdn=%s,cn=computers,cn=accounts,%s", hostname, ldap_base);
|
ret = asprintf(binddn, "fqdn=%s,cn=computers,cn=accounts,%s", hostname, ldap_base);
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("Out of memory!\n"));
|
if (!quiet)
|
||||||
|
fprintf(stderr, _("Out of memory!\n"));
|
||||||
rval = 3;
|
rval = 3;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (debug) {
|
|
||||||
fprintf(stderr, "Connecting to %s as %s\n", ipaserver, *binddn);
|
|
||||||
}
|
|
||||||
ld = connect_ldap(ipaserver, *binddn, bindpw, &ret);
|
ld = connect_ldap(ipaserver, *binddn, bindpw, &ret);
|
||||||
if (ld == NULL) {
|
if (!ld) {
|
||||||
|
if (quiet)
|
||||||
|
goto done;
|
||||||
|
|
||||||
switch(ret) {
|
switch(ret) {
|
||||||
case LDAP_NO_MEMORY:
|
case LDAP_NO_MEMORY:
|
||||||
rval = 3;
|
rval = 3;
|
||||||
@@ -473,7 +471,8 @@ join_ldap(const char *ipaserver, const char *hostname, char ** binddn, const cha
|
|||||||
#else
|
#else
|
||||||
ldap_get_option(ld, LDAP_OPT_ERROR_STRING, &s);
|
ldap_get_option(ld, LDAP_OPT_ERROR_STRING, &s);
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr, _("Enrollment failed. %s\n"), s);
|
if (!quiet)
|
||||||
|
fprintf(stderr, _("Enrollment failed. %s\n"), s);
|
||||||
if (debug) {
|
if (debug) {
|
||||||
fprintf(stderr, "ldap_extended_operation_s failed: %s",
|
fprintf(stderr, "ldap_extended_operation_s failed: %s",
|
||||||
ldap_err2string(rc));
|
ldap_err2string(rc));
|
||||||
@@ -537,7 +536,8 @@ join_krb5_xmlrpc(const char *ipaserver, const char *hostname, char **hostdn, con
|
|||||||
#endif
|
#endif
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("Out of memory!\n"));
|
if (!quiet)
|
||||||
|
fprintf(stderr, _("Out of memory!\n"));
|
||||||
rval = 3;
|
rval = 3;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -591,7 +591,8 @@ join_krb5_xmlrpc(const char *ipaserver, const char *hostname, char **hostdn, con
|
|||||||
xmlrpc_DECREF(princP);
|
xmlrpc_DECREF(princP);
|
||||||
xmlrpc_DECREF(singleprincP);
|
xmlrpc_DECREF(singleprincP);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, _("principal not found in XML-RPC response\n"));
|
if (!quiet)
|
||||||
|
fprintf(stderr, _("principal not found in XML-RPC response\n"));
|
||||||
rval = 12;
|
rval = 12;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -605,7 +606,8 @@ join_krb5_xmlrpc(const char *ipaserver, const char *hostname, char **hostdn, con
|
|||||||
xmlrpc_array_read_item(&env, krblastpwdchangeP, 0, &singleprincP);
|
xmlrpc_array_read_item(&env, krblastpwdchangeP, 0, &singleprincP);
|
||||||
xmlrpc_read_string(&env, singleprincP, &krblastpwdchange);
|
xmlrpc_read_string(&env, singleprincP, &krblastpwdchange);
|
||||||
xmlrpc_DECREF(krblastpwdchangeP);
|
xmlrpc_DECREF(krblastpwdchangeP);
|
||||||
fprintf(stderr, _("Host is already joined.\n"));
|
if (!quiet)
|
||||||
|
fprintf(stderr, _("Host is already joined.\n"));
|
||||||
rval = 13;
|
rval = 13;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -631,7 +633,8 @@ static inline struct curl_slist *
|
|||||||
curl_slist_append_log(struct curl_slist *list, char *string, bool quiet) {
|
curl_slist_append_log(struct curl_slist *list, char *string, bool quiet) {
|
||||||
list = curl_slist_append(list, string);
|
list = curl_slist_append(list, string);
|
||||||
if (!list) {
|
if (!list) {
|
||||||
fprintf(stderr, _("curl_slist_append() failed for value: '%s'\n"), string);
|
if (!quiet)
|
||||||
|
fprintf(stderr, _("curl_slist_append() failed for value: '%s'\n"), string);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
@@ -639,12 +642,13 @@ curl_slist_append_log(struct curl_slist *list, char *string, bool quiet) {
|
|||||||
|
|
||||||
#define CURL_SETOPT(curl, opt, val) \
|
#define CURL_SETOPT(curl, opt, val) \
|
||||||
if (curl_easy_setopt(curl, opt, val) != CURLE_OK) { \
|
if (curl_easy_setopt(curl, opt, val) != CURLE_OK) { \
|
||||||
fprintf(stderr, _("curl_easy_setopt() failed\n")); \
|
if (!quiet) \
|
||||||
|
fprintf(stderr, _("curl_easy_setopt() failed\n")); \
|
||||||
rval = 17; \
|
rval = 17; \
|
||||||
goto cleanup; \
|
goto cleanup; \
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t
|
size_t
|
||||||
jsonrpc_handle_response(char *ptr, size_t size, size_t nmemb, void *userdata) {
|
jsonrpc_handle_response(char *ptr, size_t size, size_t nmemb, void *userdata) {
|
||||||
size_t realsize = size * nmemb;
|
size_t realsize = size * nmemb;
|
||||||
curl_buffer *cb = (curl_buffer *) userdata;
|
curl_buffer *cb = (curl_buffer *) userdata;
|
||||||
@@ -679,14 +683,18 @@ jsonrpc_request(const char *ipaserver, const json_t *json, curl_buffer *response
|
|||||||
char *json_str = NULL;
|
char *json_str = NULL;
|
||||||
|
|
||||||
if (curl_global_init(CURL_GLOBAL_DEFAULT) != CURLE_OK) {
|
if (curl_global_init(CURL_GLOBAL_DEFAULT) != CURLE_OK) {
|
||||||
fprintf(stderr, _("curl_global_init() failed\n"));
|
if (!quiet)
|
||||||
|
fprintf(stderr, _("curl_global_init() failed\n"));
|
||||||
|
|
||||||
rval = 17;
|
rval = 17;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
curl = curl_easy_init();
|
curl = curl_easy_init();
|
||||||
if (!curl) {
|
if (!curl) {
|
||||||
fprintf(stderr, _("curl_easy_init() failed\n"));
|
if (!quiet)
|
||||||
|
fprintf(stderr, _("curl_easy_init() failed\n"));
|
||||||
|
|
||||||
rval = 17;
|
rval = 17;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -724,7 +732,7 @@ jsonrpc_request(const char *ipaserver, const json_t *json, curl_buffer *response
|
|||||||
|
|
||||||
CURL_SETOPT(curl, CURLOPT_CAINFO, DEFAULT_CA_CERT_FILE);
|
CURL_SETOPT(curl, CURLOPT_CAINFO, DEFAULT_CA_CERT_FILE);
|
||||||
|
|
||||||
CURL_SETOPT(curl, CURLOPT_WRITEFUNCTION, jsonrpc_handle_response);
|
CURL_SETOPT(curl, CURLOPT_WRITEFUNCTION, &jsonrpc_handle_response);
|
||||||
CURL_SETOPT(curl, CURLOPT_WRITEDATA, response);
|
CURL_SETOPT(curl, CURLOPT_WRITEDATA, response);
|
||||||
|
|
||||||
CURL_SETOPT(curl, CURLOPT_HTTPAUTH, CURLAUTH_NEGOTIATE);
|
CURL_SETOPT(curl, CURLOPT_HTTPAUTH, CURLAUTH_NEGOTIATE);
|
||||||
@@ -735,7 +743,9 @@ jsonrpc_request(const char *ipaserver, const json_t *json, curl_buffer *response
|
|||||||
|
|
||||||
json_str = json_dumps(json, 0);
|
json_str = json_dumps(json, 0);
|
||||||
if (!json_str) {
|
if (!json_str) {
|
||||||
fprintf(stderr, _("json_dumps() failed\n"));
|
if (debug)
|
||||||
|
fprintf(stderr, _("json_dumps() failed\n"));
|
||||||
|
|
||||||
rval = 17;
|
rval = 17;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -748,7 +758,8 @@ jsonrpc_request(const char *ipaserver, const json_t *json, curl_buffer *response
|
|||||||
CURLcode res = curl_easy_perform(curl);
|
CURLcode res = curl_easy_perform(curl);
|
||||||
if (res != CURLE_OK)
|
if (res != CURLE_OK)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("JSON-RPC call failed: %s\n"), curl_easy_strerror(res));
|
if (debug)
|
||||||
|
fprintf(stderr, _("JSON-RPC call failed: %s\n"), curl_easy_strerror(res));
|
||||||
|
|
||||||
rval = 17;
|
rval = 17;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@@ -758,11 +769,12 @@ jsonrpc_request(const char *ipaserver, const json_t *json, curl_buffer *response
|
|||||||
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &resp_code);
|
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &resp_code);
|
||||||
|
|
||||||
if (resp_code != 200) {
|
if (resp_code != 200) {
|
||||||
if (resp_code == 401)
|
if (debug)
|
||||||
fprintf(stderr, _("JSON-RPC call was unauthorized. Check your credentials.\n"));
|
|
||||||
else
|
|
||||||
fprintf(stderr, _("JSON-RPC call failed with status code: %li\n"), resp_code);
|
fprintf(stderr, _("JSON-RPC call failed with status code: %li\n"), resp_code);
|
||||||
|
|
||||||
|
if (!quiet && resp_code == 401)
|
||||||
|
fprintf(stderr, _("JSON-RPC call was unauthorized. Check your credentials.\n"));
|
||||||
|
|
||||||
rval = 17;
|
rval = 17;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -836,7 +848,8 @@ jsonrpc_parse_response(const char *payload, json_t** j_result_obj, bool quiet) {
|
|||||||
|
|
||||||
j_root = json_loads(payload, 0, &j_error);
|
j_root = json_loads(payload, 0, &j_error);
|
||||||
if (!j_root) {
|
if (!j_root) {
|
||||||
fprintf(stderr, _("Parsing JSON-RPC response failed: %s\n"), j_error.text);
|
if (debug)
|
||||||
|
fprintf(stderr, _("Parsing JSON-RPC response failed: %s\n"), j_error.text);
|
||||||
|
|
||||||
rval = 17;
|
rval = 17;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@@ -851,7 +864,8 @@ jsonrpc_parse_response(const char *payload, json_t** j_result_obj, bool quiet) {
|
|||||||
|
|
||||||
*j_result_obj = json_object_get(j_root, "result");
|
*j_result_obj = json_object_get(j_root, "result");
|
||||||
if (!*j_result_obj) {
|
if (!*j_result_obj) {
|
||||||
fprintf(stderr, _("Parsing JSON-RPC response failed: no 'result' value found.\n"));
|
if (debug)
|
||||||
|
fprintf(stderr, _("Parsing JSON-RPC response failed: no 'result' value found.\n"));
|
||||||
|
|
||||||
rval = 17;
|
rval = 17;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@@ -883,7 +897,8 @@ jsonrpc_parse_join_response(const char *payload, join_info *join_i, bool quiet)
|
|||||||
&tmp_hostdn,
|
&tmp_hostdn,
|
||||||
"krbprincipalname", &tmp_princ,
|
"krbprincipalname", &tmp_princ,
|
||||||
"krblastpwdchange", &tmp_pwdch) != 0) {
|
"krblastpwdchange", &tmp_pwdch) != 0) {
|
||||||
fprintf(stderr, _("Extracting the data from the JSON-RPC response failed: %s\n"), j_error.text);
|
if (debug)
|
||||||
|
fprintf(stderr, _("Extracting the data from the JSON-RPC response failed: %s\n"), j_error.text);
|
||||||
|
|
||||||
rval = 17;
|
rval = 17;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@@ -926,7 +941,8 @@ join_krb5_jsonrpc(const char *ipaserver, const char *hostname, char **hostdn, co
|
|||||||
"nshardwareplatform", uinfo.machine);
|
"nshardwareplatform", uinfo.machine);
|
||||||
|
|
||||||
if (!json_req) {
|
if (!json_req) {
|
||||||
fprintf(stderr, _("json_pack_ex() failed: %s\n"), j_error.text);
|
if (debug)
|
||||||
|
fprintf(stderr, _("json_pack_ex() failed: %s\n"), j_error.text);
|
||||||
|
|
||||||
rval = 17;
|
rval = 17;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@@ -944,7 +960,9 @@ join_krb5_jsonrpc(const char *ipaserver, const char *hostname, char **hostdn, co
|
|||||||
*princ = join_i.krb_principal;
|
*princ = join_i.krb_principal;
|
||||||
|
|
||||||
if (!force && join_i.is_provisioned) {
|
if (!force && join_i.is_provisioned) {
|
||||||
fprintf(stderr, _("Host is already joined.\n"));
|
if (!quiet)
|
||||||
|
fprintf(stderr, _("Host is already joined.\n"));
|
||||||
|
|
||||||
rval = 13;
|
rval = 13;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -972,7 +990,8 @@ jsonrpc_parse_unenroll_response(const char *payload, bool* result, bool quiet) {
|
|||||||
|
|
||||||
if (json_unpack_ex(j_result_obj, &j_error, 0, "{s:b}",
|
if (json_unpack_ex(j_result_obj, &j_error, 0, "{s:b}",
|
||||||
"result", result) != 0) {
|
"result", result) != 0) {
|
||||||
fprintf(stderr, _("Extracting the data from the JSON-RPC response failed: %s\n"), j_error.text);
|
if (debug)
|
||||||
|
fprintf(stderr, _("Extracting the data from the JSON-RPC response failed: %s\n"), j_error.text);
|
||||||
|
|
||||||
rval = 20;
|
rval = 20;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@@ -1002,7 +1021,8 @@ jsonrpc_unenroll_host(const char *ipaserver, const char *host, bool quiet) {
|
|||||||
host);
|
host);
|
||||||
|
|
||||||
if (!json_req) {
|
if (!json_req) {
|
||||||
fprintf(stderr, _("json_pack_ex() failed: %s\n"), j_error.text);
|
if (debug)
|
||||||
|
fprintf(stderr, _("json_pack_ex() failed: %s\n"), j_error.text);
|
||||||
|
|
||||||
rval = 17;
|
rval = 17;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@@ -1020,7 +1040,8 @@ jsonrpc_unenroll_host(const char *ipaserver, const char *host, bool quiet) {
|
|||||||
if (!quiet)
|
if (!quiet)
|
||||||
fprintf(stderr, _("Unenrollment successful.\n"));
|
fprintf(stderr, _("Unenrollment successful.\n"));
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, _("Unenrollment failed.\n"));
|
if (!quiet)
|
||||||
|
fprintf(stderr, _("Unenrollment failed.\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
@@ -1064,7 +1085,8 @@ xmlrpc_unenroll_host(const char *ipaserver, const char *host, bool quiet)
|
|||||||
#endif
|
#endif
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("Out of memory!\n"));
|
if (!quiet)
|
||||||
|
fprintf(stderr, _("Out of memory!\n"));
|
||||||
rval = 3;
|
rval = 3;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -1097,7 +1119,8 @@ xmlrpc_unenroll_host(const char *ipaserver, const char *host, bool quiet)
|
|||||||
if (!quiet)
|
if (!quiet)
|
||||||
fprintf(stderr, _("Unenrollment successful.\n"));
|
fprintf(stderr, _("Unenrollment successful.\n"));
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, _("Unenrollment failed.\n"));
|
if (!quiet)
|
||||||
|
fprintf(stderr, _("Unenrollment failed.\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
xmlrpc_DECREF(princP);
|
xmlrpc_DECREF(princP);
|
||||||
@@ -1214,9 +1237,6 @@ join(const char *server, const char *hostname, const char *bindpw, const char *b
|
|||||||
argv[arg++] = "-w";
|
argv[arg++] = "-w";
|
||||||
argv[arg++] = (char *)bindpw;
|
argv[arg++] = (char *)bindpw;
|
||||||
}
|
}
|
||||||
if (quiet) {
|
|
||||||
argv[arg++] = "-q";
|
|
||||||
}
|
|
||||||
argv[arg++] = NULL;
|
argv[arg++] = NULL;
|
||||||
err = execv(path, argv);
|
err = execv(path, argv);
|
||||||
if (err == -1) {
|
if (err == -1) {
|
||||||
@@ -1286,8 +1306,9 @@ unenroll_host(const char *server, const char *hostname, const char *ktname, bool
|
|||||||
} else {
|
} else {
|
||||||
char * conf_data = read_config_file(IPA_CONFIG);
|
char * conf_data = read_config_file(IPA_CONFIG);
|
||||||
if ((ipaserver = getIPAserver(conf_data)) == NULL) {
|
if ((ipaserver = getIPAserver(conf_data)) == NULL) {
|
||||||
fprintf(stderr, _("Unable to determine IPA server from %s\n"),
|
if (!quiet)
|
||||||
IPA_CONFIG);
|
fprintf(stderr, _("Unable to determine IPA server from %s\n"),
|
||||||
|
IPA_CONFIG);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
free(conf_data);
|
free(conf_data);
|
||||||
@@ -1295,24 +1316,27 @@ unenroll_host(const char *server, const char *hostname, const char *ktname, bool
|
|||||||
|
|
||||||
krberr = krb5_init_context(&krbctx);
|
krberr = krb5_init_context(&krbctx);
|
||||||
if (krberr) {
|
if (krberr) {
|
||||||
fprintf(stderr, _("Unable to join host: "
|
if (!quiet)
|
||||||
"Kerberos context initialization failed\n"));
|
fprintf(stderr, _("Unable to join host: "
|
||||||
|
"Kerberos context initialization failed\n"));
|
||||||
rval = 1;
|
rval = 1;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
krberr = krb5_kt_resolve(krbctx, ktname, &keytab);
|
krberr = krb5_kt_resolve(krbctx, ktname, &keytab);
|
||||||
if (krberr != 0) {
|
if (krberr != 0) {
|
||||||
fprintf(stderr, _("Error resolving keytab: %s.\n"),
|
if (!quiet)
|
||||||
error_message(krberr));
|
fprintf(stderr, _("Error resolving keytab: %s.\n"),
|
||||||
|
error_message(krberr));
|
||||||
rval = 7;
|
rval = 7;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
krberr = krb5_get_default_realm(krbctx, &realm);
|
krberr = krb5_get_default_realm(krbctx, &realm);
|
||||||
if (krberr != 0) {
|
if (krberr != 0) {
|
||||||
fprintf(stderr, _("Error getting default Kerberos realm: %s.\n"),
|
if (!quiet)
|
||||||
error_message(krberr));
|
fprintf(stderr, _("Error getting default Kerberos realm: %s.\n"),
|
||||||
|
error_message(krberr));
|
||||||
rval = 21;
|
rval = 21;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -1321,8 +1345,9 @@ unenroll_host(const char *server, const char *hostname, const char *ktname, bool
|
|||||||
|
|
||||||
krberr = krb5_parse_name(krbctx, principal, &princ);
|
krberr = krb5_parse_name(krbctx, principal, &princ);
|
||||||
if (krberr != 0) {
|
if (krberr != 0) {
|
||||||
fprintf(stderr, _("Error parsing \"%1$s\": %2$s.\n"),
|
if (!quiet)
|
||||||
principal, error_message(krberr));
|
fprintf(stderr, _("Error parsing \"%1$s\": %2$s.\n"),
|
||||||
|
principal, error_message(krberr));
|
||||||
rval = 4;
|
rval = 4;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -1339,8 +1364,9 @@ unenroll_host(const char *server, const char *hostname, const char *ktname, bool
|
|||||||
krberr = krb5_get_init_creds_keytab(krbctx, &creds, princ, keytab,
|
krberr = krb5_get_init_creds_keytab(krbctx, &creds, princ, keytab,
|
||||||
0, tgs, &gicopts);
|
0, tgs, &gicopts);
|
||||||
if (krberr != 0) {
|
if (krberr != 0) {
|
||||||
fprintf(stderr, _("Error obtaining initial credentials: %s.\n"),
|
if (!quiet)
|
||||||
error_message(krberr));
|
fprintf(stderr, _("Error obtaining initial credentials: %s.\n"),
|
||||||
|
error_message(krberr));
|
||||||
rval = 19;
|
rval = 19;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -1349,24 +1375,27 @@ unenroll_host(const char *server, const char *hostname, const char *ktname, bool
|
|||||||
if (krberr == 0) {
|
if (krberr == 0) {
|
||||||
krberr = krb5_cc_initialize(krbctx, ccache, creds.client);
|
krberr = krb5_cc_initialize(krbctx, ccache, creds.client);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr,
|
if (!quiet)
|
||||||
_("Unable to generate Kerberos Credential Cache\n"));
|
fprintf(stderr,
|
||||||
|
_("Unable to generate Kerberos Credential Cache\n"));
|
||||||
rval = 19;
|
rval = 19;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (krberr != 0) {
|
if (krberr != 0) {
|
||||||
fprintf(stderr,
|
if (!quiet)
|
||||||
_("Unable to generate Kerberos Credential Cache\n"));
|
fprintf(stderr,
|
||||||
|
_("Unable to generate Kerberos Credential Cache\n"));
|
||||||
rval = 19;
|
rval = 19;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
krberr = krb5_cc_store_cred(krbctx, ccache, &creds);
|
krberr = krb5_cc_store_cred(krbctx, ccache, &creds);
|
||||||
if (krberr != 0) {
|
if (krberr != 0) {
|
||||||
fprintf(stderr,
|
if (!quiet)
|
||||||
_("Error storing creds in credential cache: %s.\n"),
|
fprintf(stderr,
|
||||||
error_message(krberr));
|
_("Error storing creds in credential cache: %s.\n"),
|
||||||
|
error_message(krberr));
|
||||||
rval = 19;
|
rval = 19;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -1470,16 +1499,21 @@ main(int argc, const char **argv) {
|
|||||||
if (!hostname) {
|
if (!hostname) {
|
||||||
hostname = ipa_gethostfqdn();
|
hostname = ipa_gethostfqdn();
|
||||||
if (hostname == NULL) {
|
if (hostname == NULL) {
|
||||||
fprintf(stderr, _("Cannot get host's FQDN!\n"));
|
if (!quiet)
|
||||||
|
fprintf(stderr, _("Cannot get host's FQDN!\n"));
|
||||||
exit(22);
|
exit(22);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (NULL == strstr(hostname, ".")) {
|
if (NULL == strstr(hostname, ".")) {
|
||||||
fprintf(stderr, _("The hostname must be fully-qualified: %s\n"), hostname);
|
if (!quiet) {
|
||||||
|
fprintf(stderr, _("The hostname must be fully-qualified: %s\n"), hostname);
|
||||||
|
}
|
||||||
exit(16);
|
exit(16);
|
||||||
}
|
}
|
||||||
if ((strcmp(hostname, "localhost") == 0) || (strcmp(hostname, "localhost.localdomain") == 0)){
|
if ((!strcmp(hostname, "localhost")) || (!strcmp(hostname, "localhost.localdomain"))){
|
||||||
fprintf(stderr, _("The hostname must not be: %s\n"), hostname);
|
if (!quiet) {
|
||||||
|
fprintf(stderr, _("The hostname must not be: %s\n"), hostname);
|
||||||
|
}
|
||||||
exit(16);
|
exit(16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ Specifies the insecure CA end user port. The default is 8080.
|
|||||||
The time to wait for a certmonger request to complete during installation. The default value is 300 seconds.
|
The time to wait for a certmonger request to complete during installation. The default value is 300 seconds.
|
||||||
.TP
|
.TP
|
||||||
.B context <context>
|
.B context <context>
|
||||||
Specifies the context that IPA is being executed in. IPA may operate differently depending on the context. The current defined contexts are cli, server and dns. Additionally this value is used to load /etc/ipa/\fBcontext\fR.conf to provide context\-specific configuration. For example, if you want to always perform client requests in verbose mode but do not want to have verbose enabled on the server, add the verbose option to \fI/etc/ipa/cli.conf\fR.
|
Specifies the context that IPA is being executed in. IPA may operate differently depending on the context. The current defined contexts are cli and server. Additionally this value is used to load /etc/ipa/\fBcontext\fR.conf to provide context\-specific configuration. For example, if you want to always perform client requests in verbose mode but do not want to have verbose enabled on the server, add the verbose option to \fI/etc/ipa/cli.conf\fR.
|
||||||
.TP
|
.TP
|
||||||
.B debug <boolean>
|
.B debug <boolean>
|
||||||
When True provides detailed information. Specifically this set the global log level to "debug". Default is False.
|
When True provides detailed information. Specifically this set the global log level to "debug". Default is False.
|
||||||
@@ -119,9 +119,6 @@ Enable a per-request LDAP cache. The default is True.
|
|||||||
.B ldap_cache_size <integer>
|
.B ldap_cache_size <integer>
|
||||||
The maximum number of entries cached if ldap_cache is True. Since this cache is per-request it is not expected to be very large. The default is 100. Setting the value < 1 effectively disables the cache regardless of the ldap_cache setting
|
The maximum number of entries cached if ldap_cache is True. Since this cache is per-request it is not expected to be very large. The default is 100. Setting the value < 1 effectively disables the cache regardless of the ldap_cache setting
|
||||||
.TP
|
.TP
|
||||||
.B ldap_cache_debug <boolean>
|
|
||||||
Log details on hits, misses, etc. for the LDAP cache if the cache is enabled.
|
|
||||||
.TP
|
|
||||||
.B ldap_uri <URI>
|
.B ldap_uri <URI>
|
||||||
Specifies the URI of the IPA LDAP server to connect to. The URI scheme may be one of \fBldap\fR or \fBldapi\fR. The default is to use ldapi, e.g. ldapi://%2fvar%2frun%2fslapd\-EXAMPLE\-COM.socket
|
Specifies the URI of the IPA LDAP server to connect to. The URI scheme may be one of \fBldap\fR or \fBldapi\fR. The default is to use ldapi, e.g. ldapi://%2fvar%2frun%2fslapd\-EXAMPLE\-COM.socket
|
||||||
.TP
|
.TP
|
||||||
@@ -163,12 +160,6 @@ Specifies the mode the server is running in. The currently support values are \f
|
|||||||
.B mount_ipa <URI>
|
.B mount_ipa <URI>
|
||||||
Specifies the mount point that the development server will register. The default is /ipa/
|
Specifies the mount point that the development server will register. The default is /ipa/
|
||||||
.TP
|
.TP
|
||||||
.B oidc_child_debug_level <debuglevel>
|
|
||||||
Specifies the debug level of \fBoidc_child\fR, a helper process used by \fBipa-otpd\fR for OIDC/OAuth2 authentication. Level can be between 0 and 10, the higher the more details. If the level is 6 or higher HTTP debug output is added as well.
|
|
||||||
.TP
|
|
||||||
.B passkey_child_debug_level <debuglevel>
|
|
||||||
Specifies the debug level of \fBpasskey_child\fR, a helper process used by \fBipa-otpd\fR for passkey authentication. Level can be between 0 and 10, the higher the more details. If the level is 6 or higher libfido2 debug output is added as well.
|
|
||||||
.TP
|
|
||||||
.B prompt_all <boolean>
|
.B prompt_all <boolean>
|
||||||
Specifies that all options should be prompted for in the IPA client, even optional values. Default is False.
|
Specifies that all options should be prompted for in the IPA client, even optional values. Default is False.
|
||||||
.TP
|
.TP
|
||||||
@@ -256,20 +247,12 @@ system\-wide IPA configuration file
|
|||||||
.I $HOME/.ipa/default.conf
|
.I $HOME/.ipa/default.conf
|
||||||
user IPA configuration file
|
user IPA configuration file
|
||||||
.TP
|
.TP
|
||||||
It is also possible to define context\-specific configuration files. The \fBcontext\fR is set when the IPA api is initialized. The currently defined contexts in IPA are \fBcli\fR, \fBserver\fR and \fBdns\fR. This is helpful, for example, if you only want \fBdebug\fR enabled on the server and not in the client. If this is set to True in \fIdefault.conf\fR it will affect both the ipa client tool and the IPA server. If it is only set in \fIserver.conf\fR then only the server will have \fBdebug\fR set. These files will be loaded if they exist:
|
It is also possible to define context\-specific configuration files. The \fBcontext\fR is set when the IPA api is initialized. The two currently defined contexts in IPA are \fBcli\fR and \fBserver\fR. This is helpful, for example, if you only want \fBdebug\fR enabled on the server and not in the client. If this is set to True in \fIdefault.conf\fR it will affect both the ipa client tool and the IPA server. If it is only set in \fIserver.conf\fR then only the server will have \fBdebug\fR set. These files will be loaded if they exist:
|
||||||
.TP
|
.TP
|
||||||
.I /etc/ipa/cli.conf
|
.I /etc/ipa/cli.conf
|
||||||
system\-wide IPA client configuration file
|
system\-wide IPA client configuration file
|
||||||
.TP
|
.TP
|
||||||
.I /etc/ipa/server.conf
|
.I /etc/ipa/server.conf
|
||||||
system\-wide IPA server configuration file
|
system\-wide IPA server configuration file
|
||||||
.SH "EXAMPLES"
|
|
||||||
.TP
|
|
||||||
An example of a context-specific configuration file is \fB/etc/ipa/dns.conf\fR to be used to increase debug output of the IPA DNSSEC daemons.
|
|
||||||
.TP
|
|
||||||
.RS L
|
|
||||||
[global]
|
|
||||||
debug = True
|
|
||||||
.RE
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR ipa (1)
|
.BR ipa (1)
|
||||||
@@ -86,15 +86,9 @@ Time to wait, in milliseconds, between each e-mail sent to try to avoid overload
|
|||||||
Specifies the From: e-mail address value in the e-mails sent. The default is noreply@ipadefaultemaildomain. This value can be found by running
|
Specifies the From: e-mail address value in the e-mails sent. The default is noreply@ipadefaultemaildomain. This value can be found by running
|
||||||
.I ipa config-show
|
.I ipa config-show
|
||||||
.TP
|
.TP
|
||||||
.B mail_from_name <name>
|
|
||||||
Specifies the From: name value in the e-mails sent. The default is IPA-EPN.
|
|
||||||
.TP
|
|
||||||
.B notify_ttls <list of days>
|
.B notify_ttls <list of days>
|
||||||
This is the list of days before a password expiration when ipa-epn should notify a user that their password will soon require a reset. If this value is not specified then the default list will be used: 28, 14, 7, 3, 1.
|
This is the list of days before a password expiration when ipa-epn should notify a user that their password will soon require a reset. If this value is not specified then the default list will be used: 28, 14, 7, 3, 1.
|
||||||
.TP
|
.TP
|
||||||
.B msg_subject <subject>
|
|
||||||
Specifies the subject of the e-mails sent. The default is "Your password will expire soon."
|
|
||||||
.TP
|
|
||||||
.B msg_charset <type>
|
.B msg_charset <type>
|
||||||
Set the character set of the message. The default is utf8. This will result in he body of the message being base64-encoded.
|
Set the character set of the message. The default is utf8. This will result in he body of the message being base64-encoded.
|
||||||
.TP
|
.TP
|
||||||
|
|||||||
@@ -24,12 +24,14 @@ ipa\-client\-automount [\fIOPTION\fR]... <location>
|
|||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
Configures automount for IPA.
|
Configures automount for IPA.
|
||||||
|
|
||||||
The automount configuration consists of two files:
|
The automount configuration consists of three files:
|
||||||
.PP
|
.PP
|
||||||
.IP o
|
.IP o
|
||||||
/etc/nsswitch.conf
|
/etc/nsswitch.conf
|
||||||
.IP o
|
.IP o
|
||||||
/etc/sysconfig/autofs
|
/etc/sysconfig/autofs
|
||||||
|
.IP o
|
||||||
|
/etc/autofs_ldap_auth.conf
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
By default this will use DNS discovery to attempt to determine the IPA server(s) to use. If IPA servers are discovered then the automount client will be configured to use DNS discovery.
|
By default this will use DNS discovery to attempt to determine the IPA server(s) to use. If IPA servers are discovered then the automount client will be configured to use DNS discovery.
|
||||||
@@ -40,9 +42,9 @@ The default automount location is named default. To specify a different one use
|
|||||||
.TP
|
.TP
|
||||||
The IPA client must already be configured in order to configure automount. The IPA client is configured as part of a server installation.
|
The IPA client must already be configured in order to configure automount. The IPA client is configured as part of a server installation.
|
||||||
.TP
|
.TP
|
||||||
SSSD is configured to manage the automount maps.
|
There are two ways to configure automount. The default is to use sssd to manage the automount maps. Alternatively autofs can configured to bind to LDAP over GSSAPI and authenticate using the machine's host principal.
|
||||||
.TP
|
.TP
|
||||||
The nss automount service is configured to use sss and files.
|
The nsswitch automount service is configured to use either sss or ldap and files depending on whether SSSD is configured or not.
|
||||||
.TP
|
.TP
|
||||||
NFSv4 is also configured. The rpc.gssd and rpc.idmapd are started on clients to support Kerberos\-secured mounts.
|
NFSv4 is also configured. The rpc.gssd and rpc.idmapd are started on clients to support Kerberos\-secured mounts.
|
||||||
.SH "OPTIONS"
|
.SH "OPTIONS"
|
||||||
@@ -52,6 +54,9 @@ Set the FQDN of the IPA server to connect to.
|
|||||||
\fB\-\-location\fR=\fILOCATION\fR
|
\fB\-\-location\fR=\fILOCATION\fR
|
||||||
Automount location.
|
Automount location.
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-S\fR, \fB\-\-no\-sssd\fR
|
||||||
|
Do not configure the client to use SSSD for automount.
|
||||||
|
.TP
|
||||||
\fB\-\-idmap\-domain\fR=\fIIDMAP_DOMAIN\fR
|
\fB\-\-idmap\-domain\fR=\fIIDMAP_DOMAIN\fR
|
||||||
NFS domain for idmapd.conf. If unset, defaults to the IPA domain. If set to DNS, let idmapd or nfsidmap determine the domain from DNS (see idmapd(8) or nfsidmap(5) for details). If set to anything else, set idmapd.conf's Domain entry to that value.
|
NFS domain for idmapd.conf. If unset, defaults to the IPA domain. If set to DNS, let idmapd or nfsidmap determine the domain from DNS (see idmapd(8) or nfsidmap(5) for details). If set to anything else, set idmapd.conf's Domain entry to that value.
|
||||||
.TP
|
.TP
|
||||||
@@ -66,12 +71,21 @@ Restore the automount configuration files.
|
|||||||
|
|
||||||
.SH "FILES"
|
.SH "FILES"
|
||||||
.TP
|
.TP
|
||||||
Files that will be configured:
|
Files that will be always be configured:
|
||||||
|
|
||||||
/etc/nsswitch.conf
|
/etc/nsswitch.conf
|
||||||
|
.TP
|
||||||
|
Files that will be configured when SSSD is the automount client (default):
|
||||||
|
|
||||||
/etc/sssd/sssd.conf
|
/etc/sssd/sssd.conf
|
||||||
|
|
||||||
|
.TP
|
||||||
|
Files that will be configured when using the ldap automount client:
|
||||||
|
|
||||||
|
/etc/sysconfig/autofs
|
||||||
|
|
||||||
|
/etc/autofs_ldap_auth.conf
|
||||||
|
|
||||||
.SH "EXIT STATUS"
|
.SH "EXIT STATUS"
|
||||||
0 if the installation was successful
|
0 if the installation was successful
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Configures a client machine to use IPA for authentication and identity services.
|
|||||||
|
|
||||||
By default this configures SSSD to connect to an IPA server for authentication and authorization. Optionally one can instead configure PAM and NSS (Name Switching Service) to work with an IPA server over Kerberos and LDAP.
|
By default this configures SSSD to connect to an IPA server for authentication and authorization. Optionally one can instead configure PAM and NSS (Name Switching Service) to work with an IPA server over Kerberos and LDAP.
|
||||||
|
|
||||||
An authorized account is required to join a client machine to IPA. This can take the form of a kerberos principal, a one\-time password associated with the machine, or PKINIT identity associated with the machine.
|
An authorized user is required to join a client machine to IPA. This can take the form of a kerberos principal or a one\-time password associated with the machine.
|
||||||
|
|
||||||
This same tool is used to unconfigure IPA and attempts to return the machine to its previous state. Part of this process is to unenroll the host from the IPA server. Unenrollment consists of disabling the principal key on the IPA server so that it may be re\-enrolled. The machine principal in /etc/krb5.keytab (host/<fqdn>@REALM) is used to authenticate to the IPA server to unenroll itself. If this principal does not exist then unenrollment will fail and an administrator will need to disable the host principal (ipa host\-disable <fqdn>).
|
This same tool is used to unconfigure IPA and attempts to return the machine to its previous state. Part of this process is to unenroll the host from the IPA server. Unenrollment consists of disabling the principal key on the IPA server so that it may be re\-enrolled. The machine principal in /etc/krb5.keytab (host/<fqdn>@REALM) is used to authenticate to the IPA server to unenroll itself. If this principal does not exist then unenrollment will fail and an administrator will need to disable the host principal (ipa host\-disable <fqdn>).
|
||||||
|
|
||||||
@@ -136,9 +136,6 @@ Do not configure OpenSSH server.
|
|||||||
\fB\-\-no\-sudo\fR
|
\fB\-\-no\-sudo\fR
|
||||||
Do not configure SSSD as a data source for sudo.
|
Do not configure SSSD as a data source for sudo.
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-subid\fR
|
|
||||||
Configure SSSD as data source for subid.
|
|
||||||
.TP
|
|
||||||
\fB\-\-no\-dns\-sshfp\fR
|
\fB\-\-no\-dns\-sshfp\fR
|
||||||
Do not automatically create DNS SSHFP records.
|
Do not automatically create DNS SSHFP records.
|
||||||
.TP
|
.TP
|
||||||
@@ -229,22 +226,6 @@ first. When this option is not specified, \fBipa\-client\-install\fR will back
|
|||||||
up SSSD config and create new one. The back up version will be restored during
|
up SSSD config and create new one. The back up version will be restored during
|
||||||
uninstall.
|
uninstall.
|
||||||
|
|
||||||
.SS "PKINIT OPTIONS"
|
|
||||||
.TP
|
|
||||||
\fB\-\-pkinit\-identity=\fIDENTITY\fR
|
|
||||||
Identity string for PKINIT authentication to use to join the IPA realm,
|
|
||||||
for example 'FILE:/path/to/cert.pem,/path/to/key.pem'. See krb5.conf(5)
|
|
||||||
for more information. The option is mutually exclusive with
|
|
||||||
\fB\-\-password\fR and \fB\-\-keytab\fR.
|
|
||||||
.TP
|
|
||||||
\fB\-\-pkinit\-anchor\fR=\fIFILEDIR\fR
|
|
||||||
Trust anchors (root and intermediate CA certs) for PKINIT. \fIFILEDIR\fR is
|
|
||||||
either the absolute path to a PEM bundle (for example
|
|
||||||
'FILE:/etc/pki/tls/cert.pem') or to an OpenSSL hash directory (for example
|
|
||||||
'DIR:/etc/ssl/certs/'). The option can be used multiple times. PKINIT
|
|
||||||
requires the full trust chain of the Kerberos KDC server as well as the full
|
|
||||||
trust chain of the identity certificate.
|
|
||||||
|
|
||||||
.SS "UNINSTALL OPTIONS"
|
.SS "UNINSTALL OPTIONS"
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-uninstall\fR
|
\fB\-\-uninstall\fR
|
||||||
@@ -253,12 +234,6 @@ Remove the IPA client software and restore the configuration to the pre\-IPA sta
|
|||||||
\fB\-U\fR, \fB\-\-unattended\fR
|
\fB\-U\fR, \fB\-\-unattended\fR
|
||||||
Unattended uninstallation. The user will not be prompted.
|
Unattended uninstallation. The user will not be prompted.
|
||||||
|
|
||||||
.SH "DISABLED SERVICES"
|
|
||||||
.TP
|
|
||||||
ipa-client-install will automatically disable the Name Service Caching Daemon (nscd) when configuring the SSSD client. These are competing services and cannot co-exist.
|
|
||||||
.TP
|
|
||||||
If there are other similar services providing nss capabilities they will need to be manually disabled by the user. An example is unscd, a complete replacement for nscd.
|
|
||||||
|
|
||||||
.SH "FILES"
|
.SH "FILES"
|
||||||
.TP
|
.TP
|
||||||
Files that will be replaced if SSSD is configured (default):
|
Files that will be replaced if SSSD is configured (default):
|
||||||
|
|||||||
@@ -136,10 +136,8 @@ O \- self\-obliterate
|
|||||||
.TP
|
.TP
|
||||||
\fBipa help commands\fR
|
\fBipa help commands\fR
|
||||||
Display a list of available commands
|
Display a list of available commands
|
||||||
.TP
|
|
||||||
\fBipa help topics\fR
|
\fBipa help topics\fR
|
||||||
Display a high\-level list of help topics
|
Display a high\-level list of help topics
|
||||||
.TP
|
|
||||||
\fBipa help user\fR
|
\fBipa help user\fR
|
||||||
Display documentation and list of commands in the "user" topic.
|
Display documentation and list of commands in the "user" topic.
|
||||||
.TP
|
.TP
|
||||||
|
|||||||
@@ -60,17 +60,10 @@ smtp_delay = 0
|
|||||||
# This value can be found by running ipa config-show.
|
# This value can be found by running ipa config-show.
|
||||||
# mail_from =
|
# mail_from =
|
||||||
|
|
||||||
# Specifies the From: name value in the e-mails-sent.
|
|
||||||
# The default when unset is IPA-EPN.
|
|
||||||
# mail_from_name =
|
|
||||||
|
|
||||||
# The list of days before a password expiration when ipa-epn should notify
|
# The list of days before a password expiration when ipa-epn should notify
|
||||||
# a user that their password will soon require a reset.
|
# a user that their password will soon require a reset.
|
||||||
notify_ttls = 28, 14, 7, 3, 1
|
notify_ttls = 28, 14, 7, 3, 1
|
||||||
|
|
||||||
# Set the subject of the message
|
|
||||||
# msg_subject =
|
|
||||||
|
|
||||||
# Set the character set of the message.
|
# Set the character set of the message.
|
||||||
msg_charset = utf8
|
msg_charset = utf8
|
||||||
|
|
||||||
|
|||||||
+20
-20
@@ -101,13 +101,9 @@ dnl ---------------------------------------------------------------------------
|
|||||||
|
|
||||||
SAVE_CPPFLAGS=$CPPFLAGS
|
SAVE_CPPFLAGS=$CPPFLAGS
|
||||||
CPPFLAGS="$NSPR_CFLAGS $NSS_CFLAGS"
|
CPPFLAGS="$NSPR_CFLAGS $NSS_CFLAGS"
|
||||||
SAVE_LIBS="$LIBS"
|
AC_CHECK_LIB([ldap_r], [ldap_search], [ ], AC_MSG_ERROR([libldap_r not found]))
|
||||||
LIBS=
|
AC_CHECK_LIB([lber], [ber_peek_tag], [ ], AC_MSG_ERROR([liblber not found]))
|
||||||
AC_SEARCH_LIBS([ldap_search], [ldap_r ldap], [], [AC_MSG_ERROR([libldap or libldap_r not found])])
|
LDAP_LIBS="-lldap_r -llber"
|
||||||
AC_SEARCH_LIBS([ber_peek_tag], [lber], [], [AC_MSG_ERROR([liblber not found])])
|
|
||||||
LDAP_LIBS="$LIBS"
|
|
||||||
LDAP_CFLAGS=""
|
|
||||||
LIBS="$SAVE_LIBS"
|
|
||||||
LDAP_CFLAGS=""
|
LDAP_CFLAGS=""
|
||||||
AC_SUBST(LDAP_LIBS)
|
AC_SUBST(LDAP_LIBS)
|
||||||
AC_SUBST(LDAP_CFLAGS)
|
AC_SUBST(LDAP_CFLAGS)
|
||||||
@@ -293,9 +289,6 @@ AM_COND_IF([BUILD_IPA_CERTAUTH_PLUGIN], [
|
|||||||
AM_CONDITIONAL([BUILD_IPA_KDCPOLICY_PLUGIN],
|
AM_CONDITIONAL([BUILD_IPA_KDCPOLICY_PLUGIN],
|
||||||
[test x$have_kdcpolicy_plugin = xyes])
|
[test x$have_kdcpolicy_plugin = xyes])
|
||||||
|
|
||||||
AM_CONDITIONAL([BUILD_IPA_ISSUE_PAC],
|
|
||||||
[test x$have_kdb_issue_pac = xyes])
|
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl - Check for program paths
|
dnl - Check for program paths
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
@@ -391,7 +384,6 @@ AC_SUBST([IPAPLATFORM])
|
|||||||
AC_MSG_RESULT([${IPAPLATFORM}])
|
AC_MSG_RESULT([${IPAPLATFORM}])
|
||||||
|
|
||||||
if test "x${IPAPLATFORM}" == "xdebian"; then
|
if test "x${IPAPLATFORM}" == "xdebian"; then
|
||||||
HTTPD_GROUP="www-data"
|
|
||||||
KRB5KDC_SERVICE="krb5-kdc.service"
|
KRB5KDC_SERVICE="krb5-kdc.service"
|
||||||
NAMED_GROUP="bind"
|
NAMED_GROUP="bind"
|
||||||
ODS_USER="opendnssec"
|
ODS_USER="opendnssec"
|
||||||
@@ -399,7 +391,6 @@ if test "x${IPAPLATFORM}" == "xdebian"; then
|
|||||||
# see https://www.debian.org/doc/packaging-manuals/python-policy/ap-packaging_tools.html
|
# see https://www.debian.org/doc/packaging-manuals/python-policy/ap-packaging_tools.html
|
||||||
PYTHON_INSTALL_EXTRA_OPTIONS="--install-layout=deb"
|
PYTHON_INSTALL_EXTRA_OPTIONS="--install-layout=deb"
|
||||||
else
|
else
|
||||||
HTTPD_GROUP="apache"
|
|
||||||
KRB5KDC_SERVICE="krb5kdc.service"
|
KRB5KDC_SERVICE="krb5kdc.service"
|
||||||
NAMED_GROUP="named"
|
NAMED_GROUP="named"
|
||||||
ODS_USER="ods"
|
ODS_USER="ods"
|
||||||
@@ -407,10 +398,6 @@ else
|
|||||||
PYTHON_INSTALL_EXTRA_OPTIONS=""
|
PYTHON_INSTALL_EXTRA_OPTIONS=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING([HTTPD_GROUP])
|
|
||||||
AC_SUBST([HTTPD_GROUP])
|
|
||||||
AC_MSG_RESULT([${HTTPD_GROUP}])
|
|
||||||
|
|
||||||
AC_SUBST([KRB5KDC_SERVICE])
|
AC_SUBST([KRB5KDC_SERVICE])
|
||||||
|
|
||||||
AC_MSG_CHECKING([NAMED_GROUP])
|
AC_MSG_CHECKING([NAMED_GROUP])
|
||||||
@@ -460,7 +447,6 @@ AC_SUBST(VENDOR_SUFFIX)
|
|||||||
AC_SUBST([VERSION], [IPA_VERSION])
|
AC_SUBST([VERSION], [IPA_VERSION])
|
||||||
AC_SUBST([GIT_VERSION], [IPA_GIT_VERSION])
|
AC_SUBST([GIT_VERSION], [IPA_GIT_VERSION])
|
||||||
AC_SUBST([GIT_BRANCH], [IPA_GIT_BRANCH])
|
AC_SUBST([GIT_BRANCH], [IPA_GIT_BRANCH])
|
||||||
AC_SUBST([KRB5_BUILD_VERSION], [IPA_KRB5_BUILD_VERSION])
|
|
||||||
# used by Makefile.am for files depending on templates
|
# used by Makefile.am for files depending on templates
|
||||||
AC_SUBST([CONFIG_STATUS])
|
AC_SUBST([CONFIG_STATUS])
|
||||||
|
|
||||||
@@ -493,7 +479,7 @@ AC_ARG_ENABLE(more-warnings,
|
|||||||
[AC_HELP_STRING([--enable-more-warnings],
|
[AC_HELP_STRING([--enable-more-warnings],
|
||||||
[Maximum compiler warnings])],
|
[Maximum compiler warnings])],
|
||||||
set_more_warnings="$enableval",[
|
set_more_warnings="$enableval",[
|
||||||
if test -d $srcdir/.git; then
|
if test -d $srcdir/../.hg; then
|
||||||
set_more_warnings=yes
|
set_more_warnings=yes
|
||||||
else
|
else
|
||||||
set_more_warnings=no
|
set_more_warnings=no
|
||||||
@@ -507,8 +493,23 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
|
|||||||
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
|
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
|
||||||
-Wnested-externs -Wpointer-arith \
|
-Wnested-externs -Wpointer-arith \
|
||||||
-Wcast-align -Wsign-compare \
|
-Wcast-align -Wsign-compare \
|
||||||
-Wshadow -Wstrict-prototypes \
|
|
||||||
$CFLAGS"
|
$CFLAGS"
|
||||||
|
|
||||||
|
for option in -Wno-strict-aliasing -Wno-sign-compare; do
|
||||||
|
SAVE_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS $option"
|
||||||
|
AC_MSG_CHECKING([whether gcc understands $option])
|
||||||
|
AC_TRY_COMPILE([], [],
|
||||||
|
has_option=yes,
|
||||||
|
has_option=no,)
|
||||||
|
if test $has_option = no; then
|
||||||
|
CFLAGS="$SAVE_CFLAGS"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($has_option)
|
||||||
|
unset has_option
|
||||||
|
unset SAVE_CFLAGS
|
||||||
|
done
|
||||||
|
unset option
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi
|
||||||
@@ -632,7 +633,6 @@ AC_CONFIG_FILES([
|
|||||||
daemons/ipa-slapi-plugins/ipa-cldap/Makefile
|
daemons/ipa-slapi-plugins/ipa-cldap/Makefile
|
||||||
daemons/ipa-slapi-plugins/ipa-dns/Makefile
|
daemons/ipa-slapi-plugins/ipa-dns/Makefile
|
||||||
daemons/ipa-slapi-plugins/ipa-enrollment/Makefile
|
daemons/ipa-slapi-plugins/ipa-enrollment/Makefile
|
||||||
daemons/ipa-slapi-plugins/ipa-graceperiod/Makefile
|
|
||||||
daemons/ipa-slapi-plugins/ipa-lockout/Makefile
|
daemons/ipa-slapi-plugins/ipa-lockout/Makefile
|
||||||
daemons/ipa-slapi-plugins/ipa-otp-counter/Makefile
|
daemons/ipa-slapi-plugins/ipa-otp-counter/Makefile
|
||||||
daemons/ipa-slapi-plugins/ipa-otp-lasttoken/Makefile
|
daemons/ipa-slapi-plugins/ipa-otp-lasttoken/Makefile
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
#
|
#
|
||||||
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
|
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
#
|
#
|
||||||
# Copyright (C) 2020 FreeIPA Contributors see COPYING for license
|
# Copyright (C) 2020 FreeIPA Contributors see COPYING for license
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -4,6 +4,14 @@ AUTOMAKE_OPTIONS = 1.7 subdir-objects
|
|||||||
|
|
||||||
NULL =
|
NULL =
|
||||||
|
|
||||||
|
AM_CFLAGS = $(NULL)
|
||||||
|
if HAVE_GCC
|
||||||
|
AM_CFLAGS += -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith \
|
||||||
|
-Wcast-align -Werror-implicit-function-declaration \
|
||||||
|
$(NULL)
|
||||||
|
endif
|
||||||
|
export AM_CFLAGS
|
||||||
|
|
||||||
nodist_noinst_HEADERS = ipa-version.h
|
nodist_noinst_HEADERS = ipa-version.h
|
||||||
noinst_HEADERS = ipa-version.h.in
|
noinst_HEADERS = ipa-version.h.in
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ from ipalib.constants import SOFTHSM_DNSSEC_TOKEN_LABEL
|
|||||||
from ipalib.install.kinit import kinit_keytab
|
from ipalib.install.kinit import kinit_keytab
|
||||||
from ipapython.dn import DN
|
from ipapython.dn import DN
|
||||||
from ipapython.ipa_log_manager import standard_logging_setup
|
from ipapython.ipa_log_manager import standard_logging_setup
|
||||||
from ipapython.ipautil import get_config_debug
|
|
||||||
from ipapython import ipaldap
|
from ipapython import ipaldap
|
||||||
from ipaplatform.paths import paths
|
from ipaplatform.paths import paths
|
||||||
from ipaserver.dnssec.abshsm import (sync_pkcs11_metadata,
|
from ipaserver.dnssec.abshsm import (sync_pkcs11_metadata,
|
||||||
@@ -146,11 +145,7 @@ def ldap2replica_zone_keys_sync(ldapkeydb, localhsm):
|
|||||||
|
|
||||||
|
|
||||||
# IPA framework initialization
|
# IPA framework initialization
|
||||||
debug = get_config_debug('dns')
|
standard_logging_setup(debug=True)
|
||||||
standard_logging_setup(debug=debug, verbose=True)
|
|
||||||
if not debug:
|
|
||||||
logger.info("To increase debugging set debug=True in dns.conf "
|
|
||||||
"See default.conf(5) for details")
|
|
||||||
ipalib.api.bootstrap(context='dns', confdir=paths.ETC_IPA, in_server=True)
|
ipalib.api.bootstrap(context='dns', confdir=paths.ETC_IPA, in_server=True)
|
||||||
ipalib.api.finalize()
|
ipalib.api.finalize()
|
||||||
|
|
||||||
|
|||||||
@@ -16,31 +16,14 @@ from ipalib.install.kinit import kinit_keytab
|
|||||||
from ipapython.dn import DN
|
from ipapython.dn import DN
|
||||||
from ipapython.ipa_log_manager import standard_logging_setup
|
from ipapython.ipa_log_manager import standard_logging_setup
|
||||||
from ipapython import ipaldap
|
from ipapython import ipaldap
|
||||||
from ipapython.ipautil import get_config_debug
|
|
||||||
from ipaplatform.paths import paths
|
from ipaplatform.paths import paths
|
||||||
from ipaserver.dnssec.keysyncer import KeySyncer
|
from ipaserver.dnssec.keysyncer import KeySyncer
|
||||||
|
|
||||||
logger = logging.getLogger(os.path.basename(__file__))
|
logger = logging.getLogger(os.path.basename(__file__))
|
||||||
|
|
||||||
|
|
||||||
def fixup_dnssec_utils(self):
|
|
||||||
try:
|
|
||||||
os.stat(self.DNSSEC_KEYFROMLABEL)
|
|
||||||
except FileNotFoundError:
|
|
||||||
try:
|
|
||||||
os.stat(self.DNSSEC_KEYFROMLABEL_9_17)
|
|
||||||
except FileNotFoundError:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
self.DNSSEC_KEYFROMLABEL = self.DNSSEC_KEYFROMLABEL_9_17
|
|
||||||
|
|
||||||
fixup_dnssec_utils(paths)
|
|
||||||
# IPA framework initialization
|
# IPA framework initialization
|
||||||
debug = get_config_debug('dns')
|
standard_logging_setup(debug=True)
|
||||||
standard_logging_setup(debug=debug, verbose=True)
|
|
||||||
if not debug:
|
|
||||||
logger.info("To increase debugging set debug=True in dns.conf "
|
|
||||||
"See default.conf(5) for details")
|
|
||||||
api.bootstrap(context='dns', confdir=paths.ETC_IPA, in_server=True)
|
api.bootstrap(context='dns', confdir=paths.ETC_IPA, in_server=True)
|
||||||
api.finalize()
|
api.finalize()
|
||||||
|
|
||||||
@@ -57,7 +40,7 @@ KEYTAB_FB = paths.IPA_DNSKEYSYNCD_KEYTAB
|
|||||||
def commenceShutdown(signum, stack):
|
def commenceShutdown(signum, stack):
|
||||||
# Declare the needed global variables
|
# Declare the needed global variables
|
||||||
global watcher_running
|
global watcher_running
|
||||||
global ldap_connection
|
global ldap_connection # pylint: disable=global-variable-not-assigned
|
||||||
|
|
||||||
logger.info('Signal %s received: Shutting down!', signum)
|
logger.info('Signal %s received: Shutting down!', signum)
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ from ipalib.install.kinit import kinit_keytab
|
|||||||
from ipapython.dn import DN
|
from ipapython.dn import DN
|
||||||
from ipapython.ipa_log_manager import standard_logging_setup
|
from ipapython.ipa_log_manager import standard_logging_setup
|
||||||
from ipapython import ipaldap
|
from ipapython import ipaldap
|
||||||
from ipapython.ipautil import get_config_debug
|
|
||||||
from ipaplatform.paths import paths
|
from ipaplatform.paths import paths
|
||||||
from ipaserver import p11helper
|
from ipaserver import p11helper
|
||||||
from ipaserver.dnssec.abshsm import sync_pkcs11_metadata, wrappingmech_name2id
|
from ipaserver.dnssec.abshsm import sync_pkcs11_metadata, wrappingmech_name2id
|
||||||
@@ -676,11 +675,7 @@ def cleanup_ldap_zone(ldap, dns_dn, zone_name):
|
|||||||
|
|
||||||
|
|
||||||
# IPA framework initialization
|
# IPA framework initialization
|
||||||
debug = get_config_debug('dns')
|
standard_logging_setup(debug=True)
|
||||||
standard_logging_setup(debug=debug, verbose=True)
|
|
||||||
if not debug:
|
|
||||||
logger.info("To increase debugging set debug=True in dns.conf "
|
|
||||||
"See default.conf(5) for details")
|
|
||||||
ipalib.api.bootstrap(context='dns', confdir=paths.ETC_IPA, in_server=True)
|
ipalib.api.bootstrap(context='dns', confdir=paths.ETC_IPA, in_server=True)
|
||||||
ipalib.api.finalize()
|
ipalib.api.finalize()
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ ipadb_la_SOURCES = \
|
|||||||
ipa_kdb_passwords.c \
|
ipa_kdb_passwords.c \
|
||||||
ipa_kdb_principals.c \
|
ipa_kdb_principals.c \
|
||||||
ipa_kdb_pwdpolicy.c \
|
ipa_kdb_pwdpolicy.c \
|
||||||
ipa_kdb_mspac.c \
|
ipa_kdb_mspac.c \
|
||||||
ipa_kdb_mspac_private.h \
|
ipa_kdb_mspac_private.h \
|
||||||
ipa_kdb_delegation.c \
|
ipa_kdb_delegation.c \
|
||||||
ipa_kdb_audit_as.c \
|
ipa_kdb_audit_as.c \
|
||||||
@@ -41,12 +41,6 @@ ipadb_la_SOURCES = \
|
|||||||
|
|
||||||
dist_noinst_DATA = ipa_kdb.exports
|
dist_noinst_DATA = ipa_kdb.exports
|
||||||
|
|
||||||
if BUILD_IPA_ISSUE_PAC
|
|
||||||
ipadb_la_SOURCES += ipa_kdb_mspac_v9.c
|
|
||||||
else
|
|
||||||
ipadb_la_SOURCES += ipa_kdb_mspac_v6.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_IPA_CERTAUTH_PLUGIN
|
if BUILD_IPA_CERTAUTH_PLUGIN
|
||||||
ipadb_la_SOURCES += ipa_kdb_certauth.c
|
ipadb_la_SOURCES += ipa_kdb_certauth.c
|
||||||
endif
|
endif
|
||||||
@@ -90,12 +84,6 @@ ipa_kdb_tests_SOURCES = \
|
|||||||
ipa_kdb_audit_as.c \
|
ipa_kdb_audit_as.c \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
if BUILD_IPA_ISSUE_PAC
|
|
||||||
ipa_kdb_tests_SOURCES += ipa_kdb_mspac_v9.c
|
|
||||||
else
|
|
||||||
ipa_kdb_tests_SOURCES += ipa_kdb_mspac_v6.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
if BUILD_IPA_CERTAUTH_PLUGIN
|
if BUILD_IPA_CERTAUTH_PLUGIN
|
||||||
ipa_kdb_tests_SOURCES += ipa_kdb_certauth.c
|
ipa_kdb_tests_SOURCES += ipa_kdb_certauth.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -494,7 +494,7 @@ init_with_password(const char *name, const char *password)
|
|||||||
|
|
||||||
done:
|
done:
|
||||||
if (service_creds != GSS_C_NO_CREDENTIAL)
|
if (service_creds != GSS_C_NO_CREDENTIAL)
|
||||||
gss_release_cred(&min, &service_creds);
|
gss_release_cred(&min, &client_creds);
|
||||||
|
|
||||||
if (client_creds != GSS_C_NO_CREDENTIAL)
|
if (client_creds != GSS_C_NO_CREDENTIAL)
|
||||||
gss_release_cred(&min, &client_creds);
|
gss_release_cred(&min, &client_creds);
|
||||||
@@ -600,7 +600,7 @@ ask_password(TALLOC_CTX *context, char *prompt1, char *prompt2, bool match)
|
|||||||
/* krb5_prompter_posix does not use krb5_context internally */
|
/* krb5_prompter_posix does not use krb5_context internally */
|
||||||
krb5_prompter_posix(NULL, NULL, NULL, NULL, num_prompts, ap_prompts);
|
krb5_prompter_posix(NULL, NULL, NULL, NULL, num_prompts, ap_prompts);
|
||||||
|
|
||||||
if (match && (strcmp(pw0, pw1) != 0)) {
|
if (match && (strcmp(pw0, pw1))) {
|
||||||
fprintf(stderr, "Passwords do not match!\n");
|
fprintf(stderr, "Passwords do not match!\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,11 +49,6 @@ static void ipadb_context_free(krb5_context kcontext,
|
|||||||
size_t c;
|
size_t c;
|
||||||
|
|
||||||
if (*ctx != NULL) {
|
if (*ctx != NULL) {
|
||||||
if ((*ctx)->magic != IPA_CONTEXT_MAGIC) {
|
|
||||||
krb5_klog_syslog(LOG_ERR, "IPA context is corrupted");
|
|
||||||
*ctx = NULL;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
free((*ctx)->uri);
|
free((*ctx)->uri);
|
||||||
free((*ctx)->base);
|
free((*ctx)->base);
|
||||||
free((*ctx)->realm_base);
|
free((*ctx)->realm_base);
|
||||||
@@ -204,8 +199,6 @@ static const struct {
|
|||||||
{ "otp", IPADB_USER_AUTH_OTP },
|
{ "otp", IPADB_USER_AUTH_OTP },
|
||||||
{ "pkinit", IPADB_USER_AUTH_PKINIT },
|
{ "pkinit", IPADB_USER_AUTH_PKINIT },
|
||||||
{ "hardened", IPADB_USER_AUTH_HARDENED },
|
{ "hardened", IPADB_USER_AUTH_HARDENED },
|
||||||
{ "idp", IPADB_USER_AUTH_IDP },
|
|
||||||
{ "passkey", IPADB_USER_AUTH_PASSKEY },
|
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -228,10 +221,6 @@ void ipadb_parse_user_auth(LDAP *lcontext, LDAPMessage *le,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* If password auth is enabled, enable hardened policy too. */
|
|
||||||
if (*userauth & IPADB_USER_AUTH_PASSWORD) {
|
|
||||||
*userauth |= IPADB_USER_AUTH_HARDENED;
|
|
||||||
}
|
|
||||||
|
|
||||||
ldap_value_free_len(vals);
|
ldap_value_free_len(vals);
|
||||||
}
|
}
|
||||||
@@ -621,8 +610,6 @@ static krb5_error_code ipadb_init_module(krb5_context kcontext,
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
ipactx->optional_pac_tkt_chksum = IPADB_TRISTATE_UNDEFINED;
|
|
||||||
|
|
||||||
ret = ipadb_get_connection(ipactx);
|
ret = ipadb_get_connection(ipactx);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
/* Not a fatal failure, as the LDAP server may be temporarily down. */
|
/* Not a fatal failure, as the LDAP server may be temporarily down. */
|
||||||
@@ -636,7 +623,6 @@ static krb5_error_code ipadb_init_module(krb5_context kcontext,
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
@@ -806,56 +792,8 @@ kdb_vftabl kdb_function_table = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (KRB5_KDB_DAL_MAJOR_VERSION == 9)
|
|
||||||
/* Version 9 removes sign_authdata and adds issue_pac method. It is a complete
|
|
||||||
* revamp of how PAC is issued, so we need to implement it differently to previous
|
|
||||||
* versions. */
|
|
||||||
|
|
||||||
krb5_error_code
|
|
||||||
ipadb_v9_issue_pac(krb5_context context, unsigned int flags,
|
|
||||||
krb5_db_entry *client,
|
|
||||||
krb5_keyblock *replaced_reply_key,
|
|
||||||
krb5_db_entry *server,
|
|
||||||
krb5_db_entry *signing_krbtgt,
|
|
||||||
krb5_timestamp authtime, krb5_pac old_pac,
|
|
||||||
krb5_pac new_pac,
|
|
||||||
krb5_data ***auth_indicators);
|
|
||||||
|
|
||||||
kdb_vftabl kdb_function_table = {
|
|
||||||
.maj_ver = KRB5_KDB_DAL_MAJOR_VERSION,
|
|
||||||
.min_ver = 0,
|
|
||||||
.init_library = ipadb_init_library,
|
|
||||||
.fini_library = ipadb_fini_library,
|
|
||||||
.init_module = ipadb_init_module,
|
|
||||||
.fini_module = ipadb_fini_module,
|
|
||||||
.create = ipadb_create,
|
|
||||||
.get_age = ipadb_get_age,
|
|
||||||
.get_principal = ipadb_get_principal,
|
|
||||||
.put_principal = ipadb_put_principal,
|
|
||||||
.delete_principal = ipadb_delete_principal,
|
|
||||||
.iterate = ipadb_iterate,
|
|
||||||
.create_policy = ipadb_create_pwd_policy,
|
|
||||||
.get_policy = ipadb_get_pwd_policy,
|
|
||||||
.put_policy = ipadb_put_pwd_policy,
|
|
||||||
.iter_policy = ipadb_iterate_pwd_policy,
|
|
||||||
.delete_policy = ipadb_delete_pwd_policy,
|
|
||||||
.fetch_master_key = ipadb_fetch_master_key,
|
|
||||||
.store_master_key_list = ipadb_store_master_key_list,
|
|
||||||
.change_pwd = ipadb_change_pwd,
|
|
||||||
.check_transited_realms = ipadb_check_transited_realms,
|
|
||||||
.check_policy_as = ipadb_check_policy_as,
|
|
||||||
.audit_as_req = ipadb_audit_as_req,
|
|
||||||
.check_allowed_to_delegate = ipadb_check_allowed_to_delegate,
|
|
||||||
.free_principal_e_data = ipadb_free_principal_e_data,
|
|
||||||
.get_s4u_x509_principal = NULL,
|
|
||||||
.allowed_to_delegate_from = ipadb_allowed_to_delegate_from,
|
|
||||||
.issue_pac = ipadb_v9_issue_pac,
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (KRB5_KDB_DAL_MAJOR_VERSION != 6) && \
|
#if (KRB5_KDB_DAL_MAJOR_VERSION != 6) && \
|
||||||
(KRB5_KDB_DAL_MAJOR_VERSION != 7) && \
|
(KRB5_KDB_DAL_MAJOR_VERSION != 7) && \
|
||||||
(KRB5_KDB_DAL_MAJOR_VERSION != 8) && \
|
(KRB5_KDB_DAL_MAJOR_VERSION != 8)
|
||||||
(KRB5_KDB_DAL_MAJOR_VERSION != 9)
|
|
||||||
#error unsupported DAL major version
|
#error unsupported DAL major version
|
||||||
#endif
|
#endif
|
||||||
@@ -49,22 +49,6 @@
|
|||||||
#include "ipa_krb5.h"
|
#include "ipa_krb5.h"
|
||||||
#include "ipa_pwd.h"
|
#include "ipa_pwd.h"
|
||||||
|
|
||||||
/* Difference between krb5 1.20 and previous versions. From
|
|
||||||
* krb5 commit a441fbe329ebbd7775eb5d4ccc4a05eef370f08b:
|
|
||||||
* Combine the KRB5_KDB_FLAG_ISSUE_PAC and
|
|
||||||
* KRB5_FLAG_CLIENT_REFERRALS_ONLY flags into KRB5_KDB_FLAG_CLIENT.
|
|
||||||
*
|
|
||||||
* Rename the KRB5_KDB_FLAG_CANONICALIZE flag to
|
|
||||||
* KRB5_KDB_FLAG_REFERRAL_OK, and only pass it to get_principal() for
|
|
||||||
* lookup operations that can use a realm referral.
|
|
||||||
* */
|
|
||||||
#if defined(KRB5_KDB_FLAG_CLIENT)
|
|
||||||
#define CLIENT_REFERRALS_FLAGS (KRB5_KDB_FLAG_REFERRAL_OK)
|
|
||||||
#else
|
|
||||||
#define CLIENT_REFERRALS_FLAGS (KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* easier to copy the defines here than to mess with kadm5/admin.h
|
/* easier to copy the defines here than to mess with kadm5/admin.h
|
||||||
* for now */
|
* for now */
|
||||||
#define KMASK_PRINCIPAL 0x000001
|
#define KMASK_PRINCIPAL 0x000001
|
||||||
@@ -105,8 +89,6 @@ enum ipadb_user_auth {
|
|||||||
IPADB_USER_AUTH_OTP = 1 << 3,
|
IPADB_USER_AUTH_OTP = 1 << 3,
|
||||||
IPADB_USER_AUTH_PKINIT = 1 << 4,
|
IPADB_USER_AUTH_PKINIT = 1 << 4,
|
||||||
IPADB_USER_AUTH_HARDENED = 1 << 5,
|
IPADB_USER_AUTH_HARDENED = 1 << 5,
|
||||||
IPADB_USER_AUTH_IDP = 1 << 6,
|
|
||||||
IPADB_USER_AUTH_PASSKEY = 1 << 7,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ipadb_user_auth_idx {
|
enum ipadb_user_auth_idx {
|
||||||
@@ -114,8 +96,6 @@ enum ipadb_user_auth_idx {
|
|||||||
IPADB_USER_AUTH_IDX_RADIUS,
|
IPADB_USER_AUTH_IDX_RADIUS,
|
||||||
IPADB_USER_AUTH_IDX_PKINIT,
|
IPADB_USER_AUTH_IDX_PKINIT,
|
||||||
IPADB_USER_AUTH_IDX_HARDENED,
|
IPADB_USER_AUTH_IDX_HARDENED,
|
||||||
IPADB_USER_AUTH_IDX_IDP,
|
|
||||||
IPADB_USER_AUTH_IDX_PASSKEY,
|
|
||||||
IPADB_USER_AUTH_IDX_MAX,
|
IPADB_USER_AUTH_IDX_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -128,12 +108,6 @@ struct ipadb_global_config {
|
|||||||
bool disable_preauth_for_spns;
|
bool disable_preauth_for_spns;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ipadb_tristate_option {
|
|
||||||
IPADB_TRISTATE_FALSE = FALSE,
|
|
||||||
IPADB_TRISTATE_TRUE = TRUE,
|
|
||||||
IPADB_TRISTATE_UNDEFINED,
|
|
||||||
};
|
|
||||||
|
|
||||||
#define IPA_CONTEXT_MAGIC 0x0c027ea7
|
#define IPA_CONTEXT_MAGIC 0x0c027ea7
|
||||||
struct ipadb_context {
|
struct ipadb_context {
|
||||||
int magic;
|
int magic;
|
||||||
@@ -151,7 +125,6 @@ struct ipadb_context {
|
|||||||
krb5_key_salt_tuple *def_encs;
|
krb5_key_salt_tuple *def_encs;
|
||||||
int n_def_encs;
|
int n_def_encs;
|
||||||
struct ipadb_mspac *mspac;
|
struct ipadb_mspac *mspac;
|
||||||
enum ipadb_tristate_option optional_pac_tkt_chksum;
|
|
||||||
#ifdef HAVE_KRB5_CERTAUTH_PLUGIN
|
#ifdef HAVE_KRB5_CERTAUTH_PLUGIN
|
||||||
krb5_certauth_moddata certauth_moddata;
|
krb5_certauth_moddata certauth_moddata;
|
||||||
#endif
|
#endif
|
||||||
@@ -231,16 +204,6 @@ int ipadb_ldap_attr_has_value(LDAP *lcontext, LDAPMessage *le,
|
|||||||
int ipadb_ldap_deref_results(LDAP *lcontext, LDAPMessage *le,
|
int ipadb_ldap_deref_results(LDAP *lcontext, LDAPMessage *le,
|
||||||
LDAPDerefRes **results);
|
LDAPDerefRes **results);
|
||||||
|
|
||||||
krb5_error_code ipadb_get_tl_data(krb5_db_entry *entry,
|
|
||||||
krb5_int16 type,
|
|
||||||
krb5_ui_2 length,
|
|
||||||
krb5_octet *data);
|
|
||||||
|
|
||||||
krb5_error_code ipadb_set_tl_data(krb5_db_entry *entry,
|
|
||||||
krb5_int16 type,
|
|
||||||
krb5_ui_2 length,
|
|
||||||
const krb5_octet *data);
|
|
||||||
|
|
||||||
struct ipadb_multires;
|
struct ipadb_multires;
|
||||||
krb5_error_code ipadb_multires_init(LDAP *lcontext, struct ipadb_multires **r);
|
krb5_error_code ipadb_multires_init(LDAP *lcontext, struct ipadb_multires **r);
|
||||||
void ipadb_multires_free(struct ipadb_multires *r);
|
void ipadb_multires_free(struct ipadb_multires *r);
|
||||||
@@ -344,7 +307,6 @@ krb5_error_code ipadb_get_pwd_expiration(krb5_context context,
|
|||||||
|
|
||||||
/* MS-PAC FUNCTIONS */
|
/* MS-PAC FUNCTIONS */
|
||||||
|
|
||||||
#if (KRB5_KDB_DAL_MAJOR_VERSION < 9)
|
|
||||||
krb5_error_code ipadb_sign_authdata(krb5_context context,
|
krb5_error_code ipadb_sign_authdata(krb5_context context,
|
||||||
unsigned int flags,
|
unsigned int flags,
|
||||||
krb5_const_principal client_princ,
|
krb5_const_principal client_princ,
|
||||||
@@ -359,18 +321,6 @@ krb5_error_code ipadb_sign_authdata(krb5_context context,
|
|||||||
krb5_authdata **tgt_auth_data,
|
krb5_authdata **tgt_auth_data,
|
||||||
krb5_authdata ***signed_auth_data);
|
krb5_authdata ***signed_auth_data);
|
||||||
|
|
||||||
#else
|
|
||||||
/* DAL 9 or later uses issue_pac */
|
|
||||||
krb5_error_code ipadb_v9_issue_pac(krb5_context context, unsigned int flags,
|
|
||||||
krb5_db_entry *client,
|
|
||||||
krb5_keyblock *replaced_reply_key,
|
|
||||||
krb5_db_entry *server,
|
|
||||||
krb5_db_entry *signing_krbtgt,
|
|
||||||
krb5_timestamp authtime, krb5_pac old_pac,
|
|
||||||
krb5_pac new_pac,
|
|
||||||
krb5_data ***auth_indicators);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
krb5_error_code ipadb_reinit_mspac(struct ipadb_context *ipactx, bool force_reinit);
|
krb5_error_code ipadb_reinit_mspac(struct ipadb_context *ipactx, bool force_reinit);
|
||||||
|
|
||||||
void ipadb_mspac_struct_free(struct ipadb_mspac **mspac);
|
void ipadb_mspac_struct_free(struct ipadb_mspac **mspac);
|
||||||
@@ -393,12 +343,6 @@ krb5_error_code ipadb_check_allowed_to_delegate(krb5_context kcontext,
|
|||||||
const krb5_db_entry *server,
|
const krb5_db_entry *server,
|
||||||
krb5_const_principal proxy);
|
krb5_const_principal proxy);
|
||||||
|
|
||||||
krb5_error_code ipadb_allowed_to_delegate_from(krb5_context context,
|
|
||||||
krb5_const_principal client,
|
|
||||||
krb5_const_principal server,
|
|
||||||
krb5_pac server_pac,
|
|
||||||
const krb5_db_entry *proxy);
|
|
||||||
|
|
||||||
/* AS AUDIT */
|
/* AS AUDIT */
|
||||||
|
|
||||||
void ipadb_audit_as_req(krb5_context kcontext,
|
void ipadb_audit_as_req(krb5_context kcontext,
|
||||||
|
|||||||
@@ -120,7 +120,6 @@ static krb5_error_code ipa_get_init_data(krb5_context kcontext,
|
|||||||
char *map_rule = NULL;
|
char *map_rule = NULL;
|
||||||
char *match_rule = NULL;
|
char *match_rule = NULL;
|
||||||
char **domains = NULL;
|
char **domains = NULL;
|
||||||
bool rule_added = false;
|
|
||||||
|
|
||||||
const char *certmap_attrs[] = { OBJECTCLASS,
|
const char *certmap_attrs[] = { OBJECTCLASS,
|
||||||
IPA_CERTMAP_PRIORITY,
|
IPA_CERTMAP_PRIORITY,
|
||||||
@@ -172,7 +171,13 @@ static krb5_error_code ipa_get_init_data(krb5_context kcontext,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kerr != KRB5_KDB_NOENTRY) {
|
if (kerr == KRB5_KDB_NOENTRY) {
|
||||||
|
ret = sss_certmap_add_rule(ctx, SSS_CERTMAP_MIN_PRIO,
|
||||||
|
NULL, NULL, NULL);
|
||||||
|
if (ret != 0) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
lc = ipactx->lcontext;
|
lc = ipactx->lcontext;
|
||||||
|
|
||||||
for (le = ldap_first_entry(lc, result); le;
|
for (le = ldap_first_entry(lc, result); le;
|
||||||
@@ -216,33 +221,8 @@ static krb5_error_code ipa_get_init_data(krb5_context kcontext,
|
|||||||
ret = sss_certmap_add_rule(ctx, prio, match_rule, map_rule,
|
ret = sss_certmap_add_rule(ctx, prio, match_rule, map_rule,
|
||||||
(const char **) domains);
|
(const char **) domains);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
krb5_klog_syslog(LOG_ERR,
|
goto done;
|
||||||
"Failed to add certificate mapping [%s] and "
|
|
||||||
"matching [%s] rule with error [%d][%s], "
|
|
||||||
"skipping. Please check for typos and if rule "
|
|
||||||
"syntax is supported.", map_rule, match_rule,
|
|
||||||
ret, strerror(ret));
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rule_added = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!rule_added) {
|
|
||||||
if (kerr == KRB5_KDB_NOENTRY) {
|
|
||||||
krb5_klog_syslog(LOG_INFO,
|
|
||||||
"No certificate mapping and matching rule "
|
|
||||||
"defined, trying to use the default rule.");
|
|
||||||
} else {
|
|
||||||
krb5_klog_syslog(LOG_INFO,
|
|
||||||
"No valid certificate mapping and matching rule "
|
|
||||||
"found, trying to use the default rule.");
|
|
||||||
}
|
|
||||||
ret = sss_certmap_add_rule(ctx, SSS_CERTMAP_MIN_PRIO,
|
|
||||||
NULL, NULL, NULL);
|
|
||||||
if (ret != 0) {
|
|
||||||
goto done;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -158,75 +158,12 @@ static bool ipadb_need_retry(struct ipadb_context *ipactx, int error)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *no_attrs[] = {
|
|
||||||
LDAP_NO_ATTRS,
|
|
||||||
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
static int
|
|
||||||
should_support_pac_tkt_sign(struct ipadb_context *ipactx, bool *result)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
LDAPMessage *res = NULL;
|
|
||||||
char *masters_dn = NULL;
|
|
||||||
int count;
|
|
||||||
|
|
||||||
char *kdc_filter = "(&(cn=KDC)(objectClass=ipaConfigObject)"
|
|
||||||
"(!(ipaConfigString=pacTktSignSupported)))";
|
|
||||||
|
|
||||||
if (!ipactx) {
|
|
||||||
ret = KRB5_KDB_DBNOTINITED;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
count = asprintf(&masters_dn, "cn=masters,cn=ipa,cn=etc,%s", ipactx->base);
|
|
||||||
if (count < 0) {
|
|
||||||
ret = ENOMEM;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = ipadb_simple_search(ipactx, masters_dn, LDAP_SCOPE_SUBTREE,
|
|
||||||
kdc_filter, no_attrs, &res);
|
|
||||||
if (ret)
|
|
||||||
goto done;
|
|
||||||
|
|
||||||
count = ldap_count_entries(ipactx->lcontext, res);
|
|
||||||
|
|
||||||
if (result)
|
|
||||||
*result = (count == 0);
|
|
||||||
|
|
||||||
done:
|
|
||||||
free(masters_dn);
|
|
||||||
ldap_msgfree(res);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ipadb_check_connection(struct ipadb_context *ipactx)
|
static int ipadb_check_connection(struct ipadb_context *ipactx)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
if (ipactx->lcontext == NULL) {
|
if (ipactx->lcontext == NULL) {
|
||||||
ret = ipadb_get_connection(ipactx);
|
return ipadb_get_connection(ipactx);
|
||||||
}
|
}
|
||||||
if ((ret == 0) && (ipactx->optional_pac_tkt_chksum == IPADB_TRISTATE_UNDEFINED)) {
|
return 0;
|
||||||
bool pac_tkt_sign_supported;
|
|
||||||
|
|
||||||
/* Enforce PAC ticket signature verification if supported by all KDCs
|
|
||||||
* To avoid loops as all search functions call into
|
|
||||||
* ipadb_check_connection(), mark that the init is complete at this
|
|
||||||
* point. Default to not issuing PAC to be safe.
|
|
||||||
*/
|
|
||||||
ipactx->optional_pac_tkt_chksum = IPADB_TRISTATE_FALSE;
|
|
||||||
ret = should_support_pac_tkt_sign(ipactx,
|
|
||||||
&pac_tkt_sign_supported);
|
|
||||||
if (ret == 0) {
|
|
||||||
ipactx->optional_pac_tkt_chksum = !pac_tkt_sign_supported;
|
|
||||||
} else {
|
|
||||||
ipactx->optional_pac_tkt_chksum = IPADB_TRISTATE_UNDEFINED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
krb5_error_code ipadb_simple_search(struct ipadb_context *ipactx,
|
krb5_error_code ipadb_simple_search(struct ipadb_context *ipactx,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ static krb5_error_code ipadb_get_delegation_acl(krb5_context kcontext,
|
|||||||
{
|
{
|
||||||
struct ipadb_context *ipactx;
|
struct ipadb_context *ipactx;
|
||||||
krb5_error_code kerr;
|
krb5_error_code kerr;
|
||||||
char *filter = NULL, *basedn = NULL;
|
char *filter = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ipactx = ipadb_get_context(kcontext);
|
ipactx = ipadb_get_context(kcontext);
|
||||||
@@ -58,20 +58,12 @@ static krb5_error_code ipadb_get_delegation_acl(krb5_context kcontext,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = asprintf(&basedn,
|
|
||||||
"cn=s4u2proxy,cn=etc,%s", ipactx->base);
|
|
||||||
if (ret == -1) {
|
|
||||||
kerr = ENOMEM;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* == Search ACL info == */
|
/* == Search ACL info == */
|
||||||
kerr = ipadb_deref_search(ipactx, basedn,
|
kerr = ipadb_deref_search(ipactx, ipactx->base,
|
||||||
LDAP_SCOPE_SUBTREE, filter, acl_attrs,
|
LDAP_SCOPE_SUBTREE, filter, acl_attrs,
|
||||||
search_attrs, acl_attrs, results);
|
search_attrs, acl_attrs, results);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
free(basedn);
|
|
||||||
free(filter);
|
free(filter);
|
||||||
return kerr;
|
return kerr;
|
||||||
}
|
}
|
||||||
@@ -114,8 +106,6 @@ static krb5_error_code ipadb_match_acl(krb5_context kcontext,
|
|||||||
bool client_missing;
|
bool client_missing;
|
||||||
bool client_found;
|
bool client_found;
|
||||||
bool target_found;
|
bool target_found;
|
||||||
bool is_constraint_delegation = false;
|
|
||||||
size_t nrules = 0;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ipactx = ipadb_get_context(kcontext);
|
ipactx = ipadb_get_context(kcontext);
|
||||||
@@ -123,17 +113,13 @@ static krb5_error_code ipadb_match_acl(krb5_context kcontext,
|
|||||||
return KRB5_KDB_DBNOTINITED;
|
return KRB5_KDB_DBNOTINITED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((client != NULL) && (target != NULL)) {
|
kerr = krb5_unparse_name(kcontext, client, &client_princ);
|
||||||
kerr = krb5_unparse_name(kcontext, client, &client_princ);
|
if (kerr != 0) {
|
||||||
if (kerr != 0) {
|
goto done;
|
||||||
goto done;
|
}
|
||||||
}
|
kerr = krb5_unparse_name(kcontext, target, &target_princ);
|
||||||
kerr = krb5_unparse_name(kcontext, target, &target_princ);
|
if (kerr != 0) {
|
||||||
if (kerr != 0) {
|
goto done;
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
is_constraint_delegation = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lentry = ldap_first_entry(ipactx->lcontext, results);
|
lentry = ldap_first_entry(ipactx->lcontext, results);
|
||||||
@@ -156,25 +142,6 @@ static krb5_error_code ipadb_match_acl(krb5_context kcontext,
|
|||||||
switch (ret) {
|
switch (ret) {
|
||||||
case 0:
|
case 0:
|
||||||
for (dres = deref_results; dres; dres = dres->next) {
|
for (dres = deref_results; dres; dres = dres->next) {
|
||||||
nrules++;
|
|
||||||
if (is_constraint_delegation) {
|
|
||||||
/*
|
|
||||||
Microsoft revised the S4U2Proxy rules for forwardable
|
|
||||||
tickets. All S4U2Proxy operations require forwardable
|
|
||||||
evidence tickets, but S4U2Self should issue a
|
|
||||||
forwardable ticket if the requesting service has no
|
|
||||||
ok-to-auth-as-delegate bit but also no constrained
|
|
||||||
delegation privileges for traditional S4U2Proxy.
|
|
||||||
Implement these rules, extending the
|
|
||||||
check_allowed_to_delegate() DAL method so that the KDC
|
|
||||||
can ask if a principal has any delegation privileges.
|
|
||||||
|
|
||||||
Since target principal is NULL and client principal is
|
|
||||||
NULL in this case, we simply calculate number of rules associated
|
|
||||||
with the server principal to decide whether to deny forwardable bit
|
|
||||||
*/
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (client_found == false &&
|
if (client_found == false &&
|
||||||
strcasecmp(dres->derefAttr, "ipaAllowToImpersonate") == 0) {
|
strcasecmp(dres->derefAttr, "ipaAllowToImpersonate") == 0) {
|
||||||
/* NOTE: client_missing is used to signal that the
|
/* NOTE: client_missing is used to signal that the
|
||||||
@@ -208,10 +175,6 @@ static krb5_error_code ipadb_match_acl(krb5_context kcontext,
|
|||||||
lentry = ldap_next_entry(ipactx->lcontext, lentry);
|
lentry = ldap_next_entry(ipactx->lcontext, lentry);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nrules > 0) {
|
|
||||||
kerr = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
done:
|
||||||
krb5_free_unparsed_name(kcontext, client_princ);
|
krb5_free_unparsed_name(kcontext, client_princ);
|
||||||
krb5_free_unparsed_name(kcontext, target_princ);
|
krb5_free_unparsed_name(kcontext, target_princ);
|
||||||
@@ -233,35 +196,33 @@ krb5_error_code ipadb_check_allowed_to_delegate(krb5_context kcontext,
|
|||||||
struct ipadb_e_data *ied_server, *ied_proxy;
|
struct ipadb_e_data *ied_server, *ied_proxy;
|
||||||
LDAPMessage *res = NULL;
|
LDAPMessage *res = NULL;
|
||||||
|
|
||||||
if (proxy != NULL) {
|
/* Handle the case where server == proxy, this is allowed in S4U*/
|
||||||
/* Handle the case where server == proxy, this is allowed in S4U */
|
kerr = ipadb_get_principal(kcontext, proxy,
|
||||||
kerr = ipadb_get_principal(kcontext, proxy,
|
KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY,
|
||||||
CLIENT_REFERRALS_FLAGS,
|
&proxy_entry);
|
||||||
&proxy_entry);
|
if (kerr) {
|
||||||
if (kerr) {
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
ied_server = (struct ipadb_e_data *) server->e_data;
|
||||||
|
ied_proxy = (struct ipadb_e_data *) proxy_entry->e_data;
|
||||||
|
|
||||||
|
/* If we have SIDs for both entries, compare SIDs */
|
||||||
|
if ((ied_server->has_sid && ied_server->sid != NULL) &&
|
||||||
|
(ied_proxy->has_sid && ied_proxy->sid != NULL)) {
|
||||||
|
|
||||||
|
if (dom_sid_check(ied_server->sid, ied_proxy->sid, true)) {
|
||||||
|
kerr = 0;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ied_server = (struct ipadb_e_data *) server->e_data;
|
/* Otherwise, compare entry DNs */
|
||||||
ied_proxy = (struct ipadb_e_data *) proxy_entry->e_data;
|
kerr = ulc_casecmp(ied_server->entry_dn, strlen(ied_server->entry_dn),
|
||||||
|
ied_proxy->entry_dn, strlen(ied_proxy->entry_dn),
|
||||||
/* If we have SIDs for both entries, compare SIDs */
|
NULL, NULL, &result);
|
||||||
if ((ied_server->has_sid && ied_server->sid != NULL) &&
|
if (kerr == 0 && result == 0) {
|
||||||
(ied_proxy->has_sid && ied_proxy->sid != NULL)) {
|
goto done;
|
||||||
|
|
||||||
if (dom_sid_check(ied_server->sid, ied_proxy->sid, true)) {
|
|
||||||
kerr = 0;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Otherwise, compare entry DNs */
|
|
||||||
kerr = ulc_casecmp(ied_server->entry_dn, strlen(ied_server->entry_dn),
|
|
||||||
ied_proxy->entry_dn, strlen(ied_proxy->entry_dn),
|
|
||||||
NULL, NULL, &result);
|
|
||||||
if (kerr == 0 && result == 0) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
kerr = krb5_unparse_name(kcontext, server->princ, &srv_principal);
|
kerr = krb5_unparse_name(kcontext, server->princ, &srv_principal);
|
||||||
@@ -280,56 +241,8 @@ krb5_error_code ipadb_check_allowed_to_delegate(krb5_context kcontext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (kerr) {
|
|
||||||
#if KRB5_KDB_DAL_MAJOR_VERSION < 9
|
|
||||||
kerr = KRB5KDC_ERR_POLICY;
|
|
||||||
#else
|
|
||||||
kerr = KRB5KDC_ERR_BADOPTION;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
ipadb_free_principal(kcontext, proxy_entry);
|
ipadb_free_principal(kcontext, proxy_entry);
|
||||||
krb5_free_unparsed_name(kcontext, srv_principal);
|
krb5_free_unparsed_name(kcontext, srv_principal);
|
||||||
ldap_msgfree(res);
|
ldap_msgfree(res);
|
||||||
return kerr;
|
return kerr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
krb5_error_code ipadb_allowed_to_delegate_from(krb5_context context,
|
|
||||||
krb5_const_principal client,
|
|
||||||
krb5_const_principal server,
|
|
||||||
krb5_pac server_pac,
|
|
||||||
const krb5_db_entry *proxy)
|
|
||||||
{
|
|
||||||
char **acl_list = NULL;
|
|
||||||
krb5_error_code kerr;
|
|
||||||
size_t i;
|
|
||||||
|
|
||||||
kerr = ipadb_get_tl_data((krb5_db_entry *) proxy, KRB5_TL_CONSTRAINED_DELEGATION_ACL,
|
|
||||||
sizeof(acl_list), (krb5_octet *)&acl_list);
|
|
||||||
|
|
||||||
if (kerr != 0 && kerr != ENOENT) {
|
|
||||||
return KRB5KDC_ERR_BADOPTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (kerr == ENOENT) {
|
|
||||||
return KRB5_PLUGIN_OP_NOTSUPP;
|
|
||||||
}
|
|
||||||
|
|
||||||
kerr = KRB5KDC_ERR_BADOPTION;
|
|
||||||
if (acl_list != NULL) {
|
|
||||||
krb5_principal acl;
|
|
||||||
for (i = 0; acl_list[i] != NULL; i++) {
|
|
||||||
if (krb5_parse_name(context, acl_list[i], &acl) != 0)
|
|
||||||
continue;
|
|
||||||
if ((server == NULL) ||
|
|
||||||
(krb5_principal_compare(context, server, acl) == TRUE)) {
|
|
||||||
kerr = 0;
|
|
||||||
krb5_free_principal(context, acl);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
krb5_free_principal(context, acl);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return kerr;
|
|
||||||
}
|
|
||||||
@@ -40,7 +40,7 @@ jitter(krb5_deltat baseline, krb5_deltat *lifetime_out)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
*lifetime_out = baseline - abs(offset) % JITTER_WINDOW_SECONDS;
|
*lifetime_out = baseline - offset % JITTER_WINDOW_SECONDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static krb5_error_code
|
static krb5_error_code
|
||||||
@@ -89,9 +89,8 @@ ipa_kdcpolicy_check_as(krb5_context context, krb5_kdcpolicy_moddata moddata,
|
|||||||
|
|
||||||
ua = ied->user_auth;
|
ua = ied->user_auth;
|
||||||
|
|
||||||
/* If no mechanisms are set, or it is anonymous PKINIT, allow every auth method */
|
/* If no mechanisms are set, allow every auth method */
|
||||||
if ((ua == IPADB_USER_AUTH_NONE) ||
|
if (ua == IPADB_USER_AUTH_NONE) {
|
||||||
(request->kdc_options & KDC_OPT_REQUEST_ANONYMOUS)) {
|
|
||||||
jitter(ONE_DAY_SECONDS, lifetime_out);
|
jitter(ONE_DAY_SECONDS, lifetime_out);
|
||||||
kerr = 0;
|
kerr = 0;
|
||||||
goto done;
|
goto done;
|
||||||
@@ -134,24 +133,6 @@ ipa_kdcpolicy_check_as(krb5_context context, krb5_kdcpolicy_moddata moddata,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
pol_limits = &(ied->pol_limits[IPADB_USER_AUTH_IDX_HARDENED]);
|
pol_limits = &(ied->pol_limits[IPADB_USER_AUTH_IDX_HARDENED]);
|
||||||
} else if (strcmp(auth_indicator, "idp") == 0) {
|
|
||||||
valid_auth_indicators++;
|
|
||||||
/* Allow hardened even if only password pre-auth is allowed */
|
|
||||||
if (!(ua & IPADB_USER_AUTH_IDP)) {
|
|
||||||
*status = "IdP pre-authentication not allowed for this user.";
|
|
||||||
kerr = KRB5KDC_ERR_POLICY;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
pol_limits = &(ied->pol_limits[IPADB_USER_AUTH_IDX_IDP]);
|
|
||||||
} else if (strcmp(auth_indicator, "passkey") == 0) {
|
|
||||||
valid_auth_indicators++;
|
|
||||||
/* Allow hardened even if only password pre-auth is allowed */
|
|
||||||
if (!(ua & IPADB_USER_AUTH_PASSKEY)) {
|
|
||||||
*status = "Passkey pre-authentication not allowed for this user.";
|
|
||||||
kerr = KRB5KDC_ERR_POLICY;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
pol_limits = &(ied->pol_limits[IPADB_USER_AUTH_IDX_PASSKEY]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,7 +152,7 @@ ipa_kdcpolicy_check_as(krb5_context context, krb5_kdcpolicy_moddata moddata,
|
|||||||
if (pol_limits->max_life != 0) {
|
if (pol_limits->max_life != 0) {
|
||||||
jitter(pol_limits->max_life, lifetime_out);
|
jitter(pol_limits->max_life, lifetime_out);
|
||||||
} else {
|
} else {
|
||||||
jitter(client->max_life, lifetime_out);
|
jitter(ONE_DAY_SECONDS, lifetime_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pol_limits->max_renewable_life != 0) {
|
if (pol_limits->max_renewable_life != 0) {
|
||||||
|
|||||||
+428
-224
@@ -401,34 +401,31 @@ static krb5_error_code ipadb_add_asserted_identity(struct ipadb_context *ipactx,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static krb5_error_code
|
static bool is_master_host(struct ipadb_context *ipactx, const char *fqdn)
|
||||||
is_master_host(struct ipadb_context *ipactx, const char *fqdn, bool *result)
|
|
||||||
{
|
{
|
||||||
int err;
|
int ret;
|
||||||
char *master_host_base = NULL;
|
char *master_host_base = NULL;
|
||||||
LDAPMessage *ldap_res = NULL;
|
LDAPMessage *result = NULL;
|
||||||
|
krb5_error_code err;
|
||||||
|
|
||||||
err = asprintf(&master_host_base, "cn=%s,cn=masters,cn=ipa,cn=etc,%s",
|
ret = asprintf(&master_host_base, "cn=%s,cn=masters,cn=ipa,cn=etc,%s",
|
||||||
fqdn, ipactx->base);
|
fqdn, ipactx->base);
|
||||||
if (err == -1)
|
if (ret == -1) {
|
||||||
return ENOMEM;
|
return false;
|
||||||
|
}
|
||||||
err = ipadb_simple_search(ipactx, master_host_base, LDAP_SCOPE_BASE,
|
err = ipadb_simple_search(ipactx, master_host_base, LDAP_SCOPE_BASE,
|
||||||
NULL, NULL, &ldap_res);
|
NULL, NULL, &result);
|
||||||
free(master_host_base);
|
free(master_host_base);
|
||||||
ldap_msgfree(ldap_res);
|
ldap_msgfree(result);
|
||||||
if (err != KRB5_KDB_NOENTRY && err != 0)
|
if (err == 0) {
|
||||||
return err;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (result)
|
return false;
|
||||||
*result = err != KRB5_KDB_NOENTRY;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static krb5_error_code ipadb_fill_info3(struct ipadb_context *ipactx,
|
static krb5_error_code ipadb_fill_info3(struct ipadb_context *ipactx,
|
||||||
LDAPMessage *lentry,
|
LDAPMessage *lentry,
|
||||||
LDAPMessage *sentry,
|
|
||||||
unsigned int flags,
|
unsigned int flags,
|
||||||
TALLOC_CTX *memctx,
|
TALLOC_CTX *memctx,
|
||||||
krb5_timestamp authtime,
|
krb5_timestamp authtime,
|
||||||
@@ -568,20 +565,7 @@ static krb5_error_code ipadb_fill_info3(struct ipadb_context *ipactx,
|
|||||||
unix_to_nt_time(&info3->base.last_password_change, timeres);
|
unix_to_nt_time(&info3->base.last_password_change, timeres);
|
||||||
break;
|
break;
|
||||||
case ENOENT:
|
case ENOENT:
|
||||||
/* If second entry is present, use Kerberos attributes from it */
|
info3->base.last_password_change = 0;
|
||||||
if (sentry != NULL) {
|
|
||||||
ret = ipadb_ldap_attr_to_time_t(ipactx->lcontext, sentry,
|
|
||||||
"krbLastPwdChange", &timeres);
|
|
||||||
switch (ret) {
|
|
||||||
case 0:
|
|
||||||
unix_to_nt_time(&info3->base.last_password_change, timeres);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
info3->base.last_password_change = 0;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return ret;
|
return ret;
|
||||||
@@ -694,14 +678,9 @@ static krb5_error_code ipadb_fill_info3(struct ipadb_context *ipactx,
|
|||||||
if ((is_host || is_service)) {
|
if ((is_host || is_service)) {
|
||||||
/* it is either host or service, so get the hostname first */
|
/* it is either host or service, so get the hostname first */
|
||||||
char *sep = strchr(info3->base.account_name.string, '/');
|
char *sep = strchr(info3->base.account_name.string, '/');
|
||||||
bool is_master;
|
bool is_master = is_master_host(
|
||||||
|
ipactx,
|
||||||
ret = is_master_host(ipactx,
|
sep ? sep + 1 : info3->base.account_name.string);
|
||||||
sep ? sep + 1 : info3->base.account_name.string,
|
|
||||||
&is_master);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
if (is_master) {
|
if (is_master) {
|
||||||
/* Well known RID of domain controllers group */
|
/* Well known RID of domain controllers group */
|
||||||
if (info3->base.rid == 0) {
|
if (info3->base.rid == 0) {
|
||||||
@@ -1003,19 +982,17 @@ static krb5_error_code ipadb_get_pac_attrs_blob(TALLOC_CTX *mem_ctx,
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
krb5_error_code ipadb_get_pac(krb5_context kcontext,
|
static krb5_error_code ipadb_get_pac(krb5_context kcontext,
|
||||||
unsigned int flags,
|
krb5_db_entry *client,
|
||||||
krb5_db_entry *client,
|
unsigned int flags,
|
||||||
krb5_db_entry *server,
|
krb5_timestamp authtime,
|
||||||
krb5_keyblock *replaced_reply_key,
|
krb5_pac *pac)
|
||||||
krb5_timestamp authtime,
|
|
||||||
krb5_pac *pac)
|
|
||||||
{
|
{
|
||||||
TALLOC_CTX *tmpctx;
|
TALLOC_CTX *tmpctx;
|
||||||
struct ipadb_e_data *ied;
|
struct ipadb_e_data *ied;
|
||||||
struct ipadb_context *ipactx;
|
struct ipadb_context *ipactx;
|
||||||
LDAPMessage *results = NULL, *sresults = NULL;
|
LDAPMessage *results = NULL;
|
||||||
LDAPMessage *lentry = NULL, *sentry = NULL;
|
LDAPMessage *lentry;
|
||||||
DATA_BLOB pac_data;
|
DATA_BLOB pac_data;
|
||||||
krb5_data data;
|
krb5_data data;
|
||||||
union PAC_INFO pac_info;
|
union PAC_INFO pac_info;
|
||||||
@@ -1071,40 +1048,9 @@ krb5_error_code ipadb_get_pac(krb5_context kcontext,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
bool is_trust_krbtgt;
|
|
||||||
|
|
||||||
/* Trusted domain objects are part of cn=ad,cn=trusts,$BASEDN subtree.
|
|
||||||
* Anchor the search string with ',dc=' to prevent matching anything else.
|
|
||||||
* This is to avoid a string allocation with expanded base DN. */
|
|
||||||
is_trust_krbtgt = strstr(ied->entry_dn, ",cn=ad,cn=trusts,dc=") != NULL;
|
|
||||||
|
|
||||||
if (is_trust_krbtgt) {
|
|
||||||
char *sentry_dn = strchr(ied->entry_dn, ',');
|
|
||||||
if (sentry_dn != NULL) {
|
|
||||||
/* skipped "krbprincipalname=krbtgt/SOME-REALM@AT-REALM," */
|
|
||||||
sentry_dn++;
|
|
||||||
kerr = ipadb_deref_search(ipactx, sentry_dn, LDAP_SCOPE_BASE,
|
|
||||||
"(objectclass=*)", user_pac_attrs,
|
|
||||||
deref_search_attrs, memberof_pac_attrs,
|
|
||||||
&sresults);
|
|
||||||
if (kerr) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
sentry = ldap_first_entry(ipactx->lcontext, sresults);
|
|
||||||
if (!sentry) {
|
|
||||||
kerr = ENOENT;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* == Fill Info3 == */
|
/* == Fill Info3 == */
|
||||||
kerr = ipadb_fill_info3(ipactx, sentry ? sentry : lentry, sentry ? lentry : NULL,
|
kerr = ipadb_fill_info3(ipactx, lentry, flags, tmpctx, authtime,
|
||||||
flags, tmpctx, authtime, &pac_info.logon_info.info->info3);
|
&pac_info.logon_info.info->info3);
|
||||||
if (kerr) {
|
if (kerr) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@@ -1118,13 +1064,9 @@ krb5_error_code ipadb_get_pac(krb5_context kcontext,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* krb5 1.20+ passes in a pre-created PAC structure but for previous
|
kerr = krb5_pac_init(kcontext, pac);
|
||||||
* versions we have to create it ourselves */
|
if (kerr) {
|
||||||
if (pac != NULL && *pac == NULL) {
|
goto done;
|
||||||
kerr = krb5_pac_init(kcontext, pac);
|
|
||||||
if (kerr) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data.magic = KV5M_DATA;
|
data.magic = KV5M_DATA;
|
||||||
@@ -1206,8 +1148,7 @@ krb5_error_code ipadb_get_pac(krb5_context kcontext,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_PAC_REQUESTER_SID
|
#ifdef HAVE_PAC_REQUESTER_SID
|
||||||
/* MS-KILE 3.3.5.6.4.8: add PAC_REQUESTER_SID only in TGT case */
|
{
|
||||||
if (flags & CLIENT_REFERRALS_FLAGS) {
|
|
||||||
union PAC_INFO pac_requester_sid;
|
union PAC_INFO pac_requester_sid;
|
||||||
/* == Package PAC_REQUESTER_SID == */
|
/* == Package PAC_REQUESTER_SID == */
|
||||||
memset(&pac_requester_sid, 0, sizeof(pac_requester_sid));
|
memset(&pac_requester_sid, 0, sizeof(pac_requester_sid));
|
||||||
@@ -1235,14 +1176,11 @@ krb5_error_code ipadb_get_pac(krb5_context kcontext,
|
|||||||
|
|
||||||
done:
|
done:
|
||||||
ldap_msgfree(results);
|
ldap_msgfree(results);
|
||||||
if (sresults != NULL) {
|
|
||||||
ldap_msgfree(sresults);
|
|
||||||
}
|
|
||||||
talloc_free(tmpctx);
|
talloc_free(tmpctx);
|
||||||
return kerr;
|
return kerr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ipadb_is_cross_realm_krbtgt(krb5_const_principal princ)
|
static bool is_cross_realm_krbtgt(krb5_const_principal princ)
|
||||||
{
|
{
|
||||||
if ((princ->length != 2) ||
|
if ((princ->length != 2) ||
|
||||||
(princ->data[0].length != 6) ||
|
(princ->data[0].length != 6) ||
|
||||||
@@ -1614,7 +1552,7 @@ static krb5_error_code save_logon_info(krb5_context context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct ipadb_adtrusts *get_domain_from_realm(krb5_context context,
|
static struct ipadb_adtrusts *get_domain_from_realm(krb5_context context,
|
||||||
krb5_data *realm)
|
krb5_data realm)
|
||||||
{
|
{
|
||||||
struct ipadb_context *ipactx;
|
struct ipadb_context *ipactx;
|
||||||
struct ipadb_adtrusts *domain;
|
struct ipadb_adtrusts *domain;
|
||||||
@@ -1631,10 +1569,10 @@ static struct ipadb_adtrusts *get_domain_from_realm(krb5_context context,
|
|||||||
|
|
||||||
for (i = 0; i < ipactx->mspac->num_trusts; i++) {
|
for (i = 0; i < ipactx->mspac->num_trusts; i++) {
|
||||||
domain = &ipactx->mspac->trusts[i];
|
domain = &ipactx->mspac->trusts[i];
|
||||||
if (strlen(domain->domain_name) != realm->length) {
|
if (strlen(domain->domain_name) != realm.length) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (strncasecmp(domain->domain_name, realm->data, realm->length) == 0) {
|
if (strncasecmp(domain->domain_name, realm.data, realm.length) == 0) {
|
||||||
return domain;
|
return domain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1643,7 +1581,7 @@ static struct ipadb_adtrusts *get_domain_from_realm(krb5_context context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct ipadb_adtrusts *get_domain_from_realm_update(krb5_context context,
|
static struct ipadb_adtrusts *get_domain_from_realm_update(krb5_context context,
|
||||||
krb5_data *realm)
|
krb5_data realm)
|
||||||
{
|
{
|
||||||
struct ipadb_context *ipactx;
|
struct ipadb_context *ipactx;
|
||||||
struct ipadb_adtrusts *domain;
|
struct ipadb_adtrusts *domain;
|
||||||
@@ -1698,7 +1636,7 @@ static void filter_logon_info_log_message_rid(struct dom_sid *sid, uint32_t rid)
|
|||||||
|
|
||||||
static krb5_error_code check_logon_info_consistent(krb5_context context,
|
static krb5_error_code check_logon_info_consistent(krb5_context context,
|
||||||
TALLOC_CTX *memctx,
|
TALLOC_CTX *memctx,
|
||||||
krb5_db_entry *client,
|
krb5_const_principal client_princ,
|
||||||
krb5_boolean is_s4u,
|
krb5_boolean is_s4u,
|
||||||
struct PAC_LOGON_INFO_CTR *info)
|
struct PAC_LOGON_INFO_CTR *info)
|
||||||
{
|
{
|
||||||
@@ -1706,6 +1644,7 @@ static krb5_error_code check_logon_info_consistent(krb5_context context,
|
|||||||
struct ipadb_context *ipactx;
|
struct ipadb_context *ipactx;
|
||||||
bool result;
|
bool result;
|
||||||
bool is_from_trusted_domain = false;
|
bool is_from_trusted_domain = false;
|
||||||
|
krb5_db_entry *client_actual = NULL;
|
||||||
struct ipadb_e_data *ied = NULL;
|
struct ipadb_e_data *ied = NULL;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
struct dom_sid client_sid;
|
struct dom_sid client_sid;
|
||||||
@@ -1757,16 +1696,22 @@ static krb5_error_code check_logon_info_consistent(krb5_context context,
|
|||||||
"local [%s], PAC [%s]",
|
"local [%s], PAC [%s]",
|
||||||
dom ? dom : "<failed to display>",
|
dom ? dom : "<failed to display>",
|
||||||
sid ? sid : "<failed to display>");
|
sid ? sid : "<failed to display>");
|
||||||
return KRB5KDC_ERR_TGT_REVOKED;
|
return KRB5KDC_ERR_POLICY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client == NULL || (is_s4u && is_from_trusted_domain)) {
|
if (is_s4u && is_from_trusted_domain) {
|
||||||
/* If the PAC belongs to a user from the trusted domain, we cannot compare SIDs */
|
/* If the PAC belongs to a user from the trusted domain, we cannot compare SIDs */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ied = (struct ipadb_e_data *)client->e_data;
|
kerr = ipadb_get_principal(context, client_princ, flags, &client_actual);
|
||||||
|
if (kerr != 0) {
|
||||||
|
krb5_klog_syslog(LOG_ERR, "PAC issue: ipadb_get_principal failed.");
|
||||||
|
return KRB5KDC_ERR_POLICY;
|
||||||
|
}
|
||||||
|
|
||||||
|
ied = (struct ipadb_e_data *)client_actual->e_data;
|
||||||
if (ied == NULL || ied->magic != IPA_E_DATA_MAGIC) {
|
if (ied == NULL || ied->magic != IPA_E_DATA_MAGIC) {
|
||||||
krb5_klog_syslog(LOG_ERR, "PAC issue: client e_data fetching failed.");
|
krb5_klog_syslog(LOG_ERR, "PAC issue: client e_data fetching failed.");
|
||||||
kerr = EINVAL;
|
kerr = EINVAL;
|
||||||
@@ -1797,17 +1742,19 @@ static krb5_error_code check_logon_info_consistent(krb5_context context,
|
|||||||
"local [%s] vs PAC [%s]",
|
"local [%s] vs PAC [%s]",
|
||||||
local_sid ? local_sid : "<failed to display>",
|
local_sid ? local_sid : "<failed to display>",
|
||||||
pac_sid ? pac_sid : "<failed to display>");
|
pac_sid ? pac_sid : "<failed to display>");
|
||||||
kerr = KRB5KDC_ERR_TGT_REVOKED;
|
kerr = KRB5KDC_ERR_POLICY;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
ipadb_free_principal(context, client_actual);
|
||||||
|
|
||||||
return kerr;
|
return kerr;
|
||||||
}
|
}
|
||||||
|
|
||||||
krb5_error_code filter_logon_info(krb5_context context,
|
krb5_error_code filter_logon_info(krb5_context context,
|
||||||
TALLOC_CTX *memctx,
|
TALLOC_CTX *memctx,
|
||||||
krb5_data *realm,
|
krb5_data realm,
|
||||||
struct PAC_LOGON_INFO_CTR *info)
|
struct PAC_LOGON_INFO_CTR *info)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1834,43 +1781,11 @@ krb5_error_code filter_logon_info(krb5_context context,
|
|||||||
bool result;
|
bool result;
|
||||||
char *domstr = NULL;
|
char *domstr = NULL;
|
||||||
|
|
||||||
ipactx = ipadb_get_context(context);
|
|
||||||
if (!ipactx || !ipactx->mspac) {
|
|
||||||
return KRB5_KDB_DBNOTINITED;
|
|
||||||
}
|
|
||||||
|
|
||||||
domain = get_domain_from_realm_update(context, realm);
|
domain = get_domain_from_realm_update(context, realm);
|
||||||
if (!domain) {
|
if (!domain) {
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check exact sid */
|
|
||||||
result = dom_sid_check(&domain->domsid, info->info->info3.base.domain_sid, true);
|
|
||||||
if (!result) {
|
|
||||||
struct ipadb_mspac *mspac_ctx = ipactx->mspac;
|
|
||||||
result = FALSE;
|
|
||||||
/* Didn't match but perhaps the original PAC was issued by a child domain's DC? */
|
|
||||||
for (k = 0; k < mspac_ctx->num_trusts; k++) {
|
|
||||||
result = dom_sid_check(&mspac_ctx->trusts[k].domsid,
|
|
||||||
info->info->info3.base.domain_sid, true);
|
|
||||||
if (result) {
|
|
||||||
domain = &mspac_ctx->trusts[k];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!result) {
|
|
||||||
domstr = dom_sid_string(NULL, info->info->info3.base.domain_sid);
|
|
||||||
krb5_klog_syslog(LOG_ERR, "PAC Info mismatch: domain = %s, "
|
|
||||||
"expected domain SID = %s, "
|
|
||||||
"found domain SID = %s",
|
|
||||||
domain->domain_name, domain->domain_sid,
|
|
||||||
domstr ? domstr : "<failed to display>");
|
|
||||||
talloc_free(domstr);
|
|
||||||
return EINVAL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* At this point we may have changed the domain we look at, */
|
|
||||||
/* check netbios/flat name */
|
/* check netbios/flat name */
|
||||||
if (strcasecmp(info->info->info3.base.logon_domain.string,
|
if (strcasecmp(info->info->info3.base.logon_domain.string,
|
||||||
domain->flat_name) != 0) {
|
domain->flat_name) != 0) {
|
||||||
@@ -1882,6 +1797,21 @@ krb5_error_code filter_logon_info(krb5_context context,
|
|||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* check exact sid */
|
||||||
|
result = dom_sid_check(&domain->domsid, info->info->info3.base.domain_sid, true);
|
||||||
|
if (!result) {
|
||||||
|
domstr = dom_sid_string(NULL, info->info->info3.base.domain_sid);
|
||||||
|
if (!domstr) {
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
|
krb5_klog_syslog(LOG_ERR, "PAC Info mismatch: domain = %s, "
|
||||||
|
"expected domain SID = %s, "
|
||||||
|
"found domain SID = %s",
|
||||||
|
domain->domain_name, domain->domain_sid, domstr);
|
||||||
|
talloc_free(domstr);
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Check if this domain has been filtered out by the trust itself*/
|
/* Check if this domain has been filtered out by the trust itself*/
|
||||||
if (domain->parent != NULL) {
|
if (domain->parent != NULL) {
|
||||||
for(k = 0; k < domain->parent->len_sid_blocklist_incoming; k++) {
|
for(k = 0; k < domain->parent->len_sid_blocklist_incoming; k++) {
|
||||||
@@ -1968,6 +1898,10 @@ krb5_error_code filter_logon_info(krb5_context context,
|
|||||||
* should include different possibilities into account
|
* should include different possibilities into account
|
||||||
* */
|
* */
|
||||||
if (info->info->info3.sidcount != 0) {
|
if (info->info->info3.sidcount != 0) {
|
||||||
|
ipactx = ipadb_get_context(context);
|
||||||
|
if (!ipactx || !ipactx->mspac) {
|
||||||
|
return KRB5_KDB_DBNOTINITED;
|
||||||
|
}
|
||||||
count = info->info->info3.sidcount;
|
count = info->info->info3.sidcount;
|
||||||
i = 0;
|
i = 0;
|
||||||
j = 0;
|
j = 0;
|
||||||
@@ -2045,8 +1979,7 @@ krb5_error_code filter_logon_info(krb5_context context,
|
|||||||
|
|
||||||
|
|
||||||
static krb5_error_code ipadb_check_logon_info(krb5_context context,
|
static krb5_error_code ipadb_check_logon_info(krb5_context context,
|
||||||
krb5_db_entry *client,
|
krb5_const_principal client_princ,
|
||||||
krb5_db_entry *signing_krbtgt,
|
|
||||||
krb5_boolean is_cross_realm,
|
krb5_boolean is_cross_realm,
|
||||||
krb5_boolean is_s4u,
|
krb5_boolean is_s4u,
|
||||||
krb5_data *pac_blob,
|
krb5_data *pac_blob,
|
||||||
@@ -2055,7 +1988,7 @@ static krb5_error_code ipadb_check_logon_info(krb5_context context,
|
|||||||
struct PAC_LOGON_INFO_CTR info;
|
struct PAC_LOGON_INFO_CTR info;
|
||||||
krb5_error_code kerr;
|
krb5_error_code kerr;
|
||||||
TALLOC_CTX *tmpctx;
|
TALLOC_CTX *tmpctx;
|
||||||
krb5_data origin_realm = {0};
|
krb5_data origin_realm = client_princ->realm;
|
||||||
bool result;
|
bool result;
|
||||||
|
|
||||||
tmpctx = talloc_new(NULL);
|
tmpctx = talloc_new(NULL);
|
||||||
@@ -2071,43 +2004,22 @@ static krb5_error_code ipadb_check_logon_info(krb5_context context,
|
|||||||
/* Check that requester SID is the same as in the PAC entry */
|
/* Check that requester SID is the same as in the PAC entry */
|
||||||
if (requester_sid != NULL) {
|
if (requester_sid != NULL) {
|
||||||
struct dom_sid client_sid;
|
struct dom_sid client_sid;
|
||||||
bool is_from_trusted_domain = false;
|
|
||||||
kerr = ipadb_get_sid_from_pac(tmpctx, info.info, &client_sid);
|
kerr = ipadb_get_sid_from_pac(tmpctx, info.info, &client_sid);
|
||||||
if (kerr) {
|
if (kerr) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
result = dom_sid_check(&client_sid, requester_sid, true);
|
result = dom_sid_check(&client_sid, requester_sid, true);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
struct ipadb_context *ipactx = ipadb_get_context(context);
|
/* memctx is freed by the caller */
|
||||||
if (!ipactx || !ipactx->mspac) {
|
char *pac_sid = dom_sid_string(tmpctx, &client_sid);
|
||||||
return KRB5_KDB_DBNOTINITED;
|
char *req_sid = dom_sid_string(tmpctx, requester_sid);
|
||||||
}
|
krb5_klog_syslog(LOG_ERR, "PAC issue: PAC has a SID "
|
||||||
/* In S4U case we might be dealing with the PAC issued by the trusted domain */
|
"different from what PAC requester claims. "
|
||||||
if ((ipactx->mspac->trusts != NULL)) {
|
"PAC [%s] vs PAC requester [%s]",
|
||||||
/* Iterate through list of trusts and check if this SID belongs to
|
pac_sid ? pac_sid : "<failed to display>",
|
||||||
* one of the domains we trust */
|
req_sid ? req_sid : "<failed to display>");
|
||||||
for(int i = 0 ; i < ipactx->mspac->num_trusts ; i++) {
|
kerr = KRB5KDC_ERR_POLICY;
|
||||||
result = dom_sid_check(&ipactx->mspac->trusts[i].domsid,
|
goto done;
|
||||||
&client_sid, false);
|
|
||||||
if (result) {
|
|
||||||
is_from_trusted_domain = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_from_trusted_domain && !is_s4u) {
|
|
||||||
/* memctx is freed by the caller */
|
|
||||||
char *pac_sid = dom_sid_string(tmpctx, &client_sid);
|
|
||||||
char *req_sid = dom_sid_string(tmpctx, requester_sid);
|
|
||||||
krb5_klog_syslog(LOG_ERR, "PAC issue: PAC has a SID "
|
|
||||||
"different from what PAC requester claims. "
|
|
||||||
"PAC [%s] vs PAC requester [%s]",
|
|
||||||
pac_sid ? pac_sid : "<failed to display>",
|
|
||||||
req_sid ? req_sid : "<failed to display>");
|
|
||||||
kerr = KRB5KDC_ERR_TGT_REVOKED;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2117,17 +2029,11 @@ static krb5_error_code ipadb_check_logon_info(krb5_context context,
|
|||||||
* is ours but operates on behalf of the cross-realm principal, we will
|
* is ours but operates on behalf of the cross-realm principal, we will
|
||||||
* search through the trusted domains but otherwise skip the exact SID check
|
* search through the trusted domains but otherwise skip the exact SID check
|
||||||
* as we are not responsible for the principal from the trusted domain */
|
* as we are not responsible for the principal from the trusted domain */
|
||||||
kerr = check_logon_info_consistent(context, tmpctx, client, is_s4u, &info);
|
kerr = check_logon_info_consistent(context, tmpctx, client_princ, is_s4u, &info);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client != NULL) {
|
kerr = filter_logon_info(context, tmpctx, origin_realm, &info);
|
||||||
origin_realm = client->princ->realm;
|
|
||||||
} else {
|
|
||||||
origin_realm = signing_krbtgt->princ->realm;
|
|
||||||
}
|
|
||||||
|
|
||||||
kerr = filter_logon_info(context, tmpctx, &origin_realm, &info);
|
|
||||||
if (kerr) {
|
if (kerr) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@@ -2296,19 +2202,24 @@ done:
|
|||||||
return kerr;
|
return kerr;
|
||||||
}
|
}
|
||||||
|
|
||||||
krb5_error_code ipadb_common_verify_pac(krb5_context context,
|
static krb5_error_code ipadb_verify_pac(krb5_context context,
|
||||||
unsigned int flags,
|
unsigned int flags,
|
||||||
krb5_db_entry *client,
|
krb5_const_principal client_princ,
|
||||||
|
krb5_db_entry *proxy,
|
||||||
krb5_db_entry *server,
|
krb5_db_entry *server,
|
||||||
krb5_db_entry *signing_krbtgt,
|
krb5_db_entry *krbtgt,
|
||||||
|
krb5_keyblock *server_key,
|
||||||
krb5_keyblock *krbtgt_key,
|
krb5_keyblock *krbtgt_key,
|
||||||
krb5_timestamp authtime,
|
krb5_timestamp authtime,
|
||||||
krb5_pac old_pac,
|
krb5_authdata **authdata,
|
||||||
krb5_pac *pac)
|
krb5_pac *pac)
|
||||||
{
|
{
|
||||||
|
krb5_keyblock *srv_key = NULL;
|
||||||
|
krb5_keyblock *priv_key = NULL;
|
||||||
krb5_error_code kerr;
|
krb5_error_code kerr;
|
||||||
krb5_ui_4 *types = NULL;
|
krb5_ui_4 *types = NULL;
|
||||||
size_t num_buffers;
|
size_t num_buffers;
|
||||||
|
krb5_pac old_pac = NULL;
|
||||||
krb5_pac new_pac = NULL;
|
krb5_pac new_pac = NULL;
|
||||||
krb5_data data;
|
krb5_data data;
|
||||||
krb5_data pac_blob = { 0 , 0, NULL};
|
krb5_data pac_blob = { 0 , 0, NULL};
|
||||||
@@ -2317,15 +2228,42 @@ krb5_error_code ipadb_common_verify_pac(krb5_context context,
|
|||||||
struct dom_sid *requester_sid = NULL;
|
struct dom_sid *requester_sid = NULL;
|
||||||
struct dom_sid req_sid;
|
struct dom_sid req_sid;
|
||||||
|
|
||||||
if (signing_krbtgt != NULL &&
|
kerr = krb5_pac_parse(context,
|
||||||
ipadb_is_cross_realm_krbtgt(signing_krbtgt->princ)) {
|
authdata[0]->contents,
|
||||||
/* krbtgt from a trusted realm */
|
authdata[0]->length,
|
||||||
is_cross_realm = true;
|
&old_pac);
|
||||||
|
if (kerr) {
|
||||||
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* In krb5 1.20+ the PAC signatures are verified prior to call to issue_pac().
|
/* for cross realm trusts cases we need to check the right checksum.
|
||||||
* In krb5 before 1.20, we do verify PAC signatures before ipadb_common_verify_pac().
|
* when the PAC is signed by our realm, we can always just check it
|
||||||
* Now we can do additional checks.
|
* passing our realm krbtgt key as the kdc checksum key (privsvr).
|
||||||
|
* But when a trusted realm passes us a PAC the kdc checksum is
|
||||||
|
* generated with that realm krbtgt key, so we need to use the cross
|
||||||
|
* realm krbtgt to check the 'server' checksum instead. */
|
||||||
|
if (is_cross_realm_krbtgt(krbtgt->princ)) {
|
||||||
|
/* krbtgt from a trusted realm */
|
||||||
|
is_cross_realm = true;
|
||||||
|
|
||||||
|
srv_key = krbtgt_key;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
/* krbtgt from our own realm */
|
||||||
|
priv_key = krbtgt_key;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* only pass with_realm TRUE when it is cross-realm ticket and S4U
|
||||||
|
* extension (S4U2Self or S4U2Proxy (RBCD)) was requested */
|
||||||
|
kerr = krb5_pac_verify_ext(context, old_pac, authtime,
|
||||||
|
client_princ, srv_key, priv_key,
|
||||||
|
(is_cross_realm &&
|
||||||
|
(flags & KRB5_KDB_FLAG_PROTOCOL_TRANSITION)));
|
||||||
|
if (kerr) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Now that the PAC is verified, do additional checks.
|
||||||
* Augment it with additional info if it is coming from a different realm */
|
* Augment it with additional info if it is coming from a different realm */
|
||||||
kerr = krb5_pac_get_buffer(context, old_pac,
|
kerr = krb5_pac_get_buffer(context, old_pac,
|
||||||
KRB5_PAC_LOGON_INFO, &pac_blob);
|
KRB5_PAC_LOGON_INFO, &pac_blob);
|
||||||
@@ -2342,8 +2280,7 @@ krb5_error_code ipadb_common_verify_pac(krb5_context context,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
kerr = ipadb_check_logon_info(context,
|
kerr = ipadb_check_logon_info(context,
|
||||||
client,
|
client_princ,
|
||||||
signing_krbtgt,
|
|
||||||
is_cross_realm,
|
is_cross_realm,
|
||||||
(flags & KRB5_KDB_FLAGS_S4U),
|
(flags & KRB5_KDB_FLAGS_S4U),
|
||||||
&pac_blob,
|
&pac_blob,
|
||||||
@@ -2351,19 +2288,12 @@ krb5_error_code ipadb_common_verify_pac(krb5_context context,
|
|||||||
if (kerr != 0) {
|
if (kerr != 0) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
/* extract buffers and rebuilt pac from scratch so that when re-signing
|
||||||
/* krb5 1.20+ passes in a pre-created PAC structure but for previous
|
* with a different cksum type does not cause issues due to mismatching
|
||||||
* versions we have to create it ourselves */
|
* signature buffer lengths */
|
||||||
if (pac != NULL && *pac == NULL) {
|
kerr = krb5_pac_init(context, &new_pac);
|
||||||
/* extract buffers and rebuilt pac from scratch so that when re-signing
|
if (kerr) {
|
||||||
* with a different cksum type does not cause issues due to mismatching
|
goto done;
|
||||||
* signature buffer lengths */
|
|
||||||
kerr = krb5_pac_init(context, &new_pac);
|
|
||||||
if (kerr) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
new_pac = *pac;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
kerr = krb5_pac_get_types(context, old_pac, &num_buffers, &types);
|
kerr = krb5_pac_get_types(context, old_pac, &num_buffers, &types);
|
||||||
@@ -2374,10 +2304,7 @@ krb5_error_code ipadb_common_verify_pac(krb5_context context,
|
|||||||
for (i = 0; i < num_buffers; i++) {
|
for (i = 0; i < num_buffers; i++) {
|
||||||
if (types[i] == KRB5_PAC_SERVER_CHECKSUM ||
|
if (types[i] == KRB5_PAC_SERVER_CHECKSUM ||
|
||||||
types[i] == KRB5_PAC_PRIVSVR_CHECKSUM ||
|
types[i] == KRB5_PAC_PRIVSVR_CHECKSUM ||
|
||||||
#ifdef KRB5_PAC_FULL_CHECKSUM
|
types[i] == KRB5_PAC_CLIENT_INFO) {
|
||||||
types[i] == KRB5_PAC_FULL_CHECKSUM ||
|
|
||||||
#endif
|
|
||||||
types[i] == KRB5_PAC_CLIENT_INFO) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2385,6 +2312,7 @@ krb5_error_code ipadb_common_verify_pac(krb5_context context,
|
|||||||
pac_blob.length != 0) {
|
pac_blob.length != 0) {
|
||||||
kerr = krb5_pac_add_buffer(context, new_pac, types[i], &pac_blob);
|
kerr = krb5_pac_add_buffer(context, new_pac, types[i], &pac_blob);
|
||||||
if (kerr) {
|
if (kerr) {
|
||||||
|
krb5_pac_free(context, new_pac);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2401,18 +2329,21 @@ krb5_error_code ipadb_common_verify_pac(krb5_context context,
|
|||||||
TALLOC_CTX *tmpctx = talloc_new(NULL);
|
TALLOC_CTX *tmpctx = talloc_new(NULL);
|
||||||
if (tmpctx == NULL) {
|
if (tmpctx == NULL) {
|
||||||
kerr = ENOMEM;
|
kerr = ENOMEM;
|
||||||
|
krb5_pac_free(context, new_pac);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
kerr = ipadb_client_requested_pac(context, old_pac, tmpctx, &pac_requested);
|
kerr = ipadb_client_requested_pac(context, old_pac, tmpctx, &pac_requested);
|
||||||
if (kerr != 0) {
|
if (kerr != 0) {
|
||||||
talloc_free(tmpctx);
|
talloc_free(tmpctx);
|
||||||
|
krb5_pac_free(context, new_pac);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
kerr = ipadb_get_pac_attrs_blob(tmpctx, &pac_requested, &pac_attrs_data);
|
kerr = ipadb_get_pac_attrs_blob(tmpctx, &pac_requested, &pac_attrs_data);
|
||||||
if (kerr) {
|
if (kerr) {
|
||||||
talloc_free(tmpctx);
|
talloc_free(tmpctx);
|
||||||
|
krb5_pac_free(context, new_pac);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
data.magic = KV5M_DATA;
|
data.magic = KV5M_DATA;
|
||||||
@@ -2422,6 +2353,7 @@ krb5_error_code ipadb_common_verify_pac(krb5_context context,
|
|||||||
kerr = krb5_pac_add_buffer(context, new_pac, PAC_TYPE_ATTRIBUTES_INFO, &data);
|
kerr = krb5_pac_add_buffer(context, new_pac, PAC_TYPE_ATTRIBUTES_INFO, &data);
|
||||||
if (kerr) {
|
if (kerr) {
|
||||||
talloc_free(tmpctx);
|
talloc_free(tmpctx);
|
||||||
|
krb5_pac_free(context, new_pac);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2441,40 +2373,134 @@ krb5_error_code ipadb_common_verify_pac(krb5_context context,
|
|||||||
krb5_free_data_contents(context, &data);
|
krb5_free_data_contents(context, &data);
|
||||||
}
|
}
|
||||||
if (kerr) {
|
if (kerr) {
|
||||||
|
krb5_pac_free(context, new_pac);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(KRB5_KDB_FLAG_CLIENT)
|
|
||||||
if (flags & KRB5_KDB_FLAG_CONSTRAINED_DELEGATION) {
|
if (flags & KRB5_KDB_FLAG_CONSTRAINED_DELEGATION) {
|
||||||
if (client == NULL) {
|
if (proxy == NULL) {
|
||||||
if (new_pac != *pac) {
|
|
||||||
krb5_pac_free(context, new_pac);
|
|
||||||
}
|
|
||||||
*pac = NULL;
|
*pac = NULL;
|
||||||
kerr = 0;
|
kerr = 0;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
kerr = ipadb_add_transited_service(context, client, server,
|
kerr = ipadb_add_transited_service(context, proxy, server,
|
||||||
old_pac, new_pac);
|
old_pac, new_pac);
|
||||||
if (kerr) {
|
if (kerr) {
|
||||||
|
krb5_pac_free(context, new_pac);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
*pac = new_pac;
|
*pac = new_pac;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (kerr != 0 && (new_pac != *pac)) {
|
krb5_free_authdata(context, authdata);
|
||||||
krb5_pac_free(context, new_pac);
|
krb5_pac_free(context, old_pac);
|
||||||
}
|
|
||||||
krb5_free_data_contents(context, &pac_blob);
|
krb5_free_data_contents(context, &pac_blob);
|
||||||
free(types);
|
free(types);
|
||||||
return kerr;
|
return kerr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static krb5_error_code ipadb_sign_pac(krb5_context context,
|
||||||
|
unsigned int flags,
|
||||||
|
krb5_const_principal client_princ,
|
||||||
|
krb5_db_entry *server,
|
||||||
|
krb5_db_entry *krbtgt,
|
||||||
|
krb5_keyblock *server_key,
|
||||||
|
krb5_keyblock *krbtgt_key,
|
||||||
|
krb5_timestamp authtime,
|
||||||
|
krb5_pac pac,
|
||||||
|
krb5_data *pac_data)
|
||||||
|
{
|
||||||
|
krb5_keyblock *right_krbtgt_signing_key = NULL;
|
||||||
|
krb5_key_data *right_krbtgt_key;
|
||||||
|
krb5_db_entry *right_krbtgt = NULL;
|
||||||
|
krb5_principal krbtgt_princ = NULL;
|
||||||
|
krb5_error_code kerr;
|
||||||
|
char *princ = NULL;
|
||||||
|
bool is_issuing_referral = false;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* for cross realm trusts cases we need to sign with the right key.
|
||||||
|
* we need to fetch the right key on our own until the DAL is fixed
|
||||||
|
* to pass us separate check tgt keys and sign tgt keys */
|
||||||
|
|
||||||
|
/* We can only ever create the kdc checksum with our realm tgt key.
|
||||||
|
* So, if we get a cross realm tgt we have to fetch our realm tgt
|
||||||
|
* instead. */
|
||||||
|
if (is_cross_realm_krbtgt(krbtgt->princ)) {
|
||||||
|
|
||||||
|
ret = asprintf(&princ, "krbtgt/%.*s@%.*s",
|
||||||
|
server->princ->realm.length,
|
||||||
|
server->princ->realm.data,
|
||||||
|
server->princ->realm.length,
|
||||||
|
server->princ->realm.data);
|
||||||
|
if (ret == -1) {
|
||||||
|
princ = NULL;
|
||||||
|
kerr = ENOMEM;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
kerr = krb5_parse_name(context, princ, &krbtgt_princ);
|
||||||
|
if (kerr) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
kerr = ipadb_get_principal(context, krbtgt_princ, 0, &right_krbtgt);
|
||||||
|
if (kerr) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
kerr = krb5_dbe_find_enctype(context, right_krbtgt,
|
||||||
|
-1, -1, 0, &right_krbtgt_key);
|
||||||
|
if (kerr) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
if (!right_krbtgt_key) {
|
||||||
|
kerr = KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
right_krbtgt_signing_key = malloc(sizeof(krb5_keyblock));
|
||||||
|
if (!right_krbtgt_signing_key) {
|
||||||
|
kerr = ENOMEM;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
kerr = krb5_dbe_decrypt_key_data(context, NULL, right_krbtgt_key,
|
||||||
|
right_krbtgt_signing_key, NULL);
|
||||||
|
if (kerr) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
right_krbtgt_signing_key = krbtgt_key;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef KRB5_KDB_FLAG_ISSUING_REFERRAL
|
||||||
|
is_issuing_referral = (flags & KRB5_KDB_FLAG_ISSUING_REFERRAL) != 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* only pass with_realm TRUE when it is cross-realm ticket and S4U2Self
|
||||||
|
* was requested */
|
||||||
|
kerr = krb5_pac_sign_ext(context, pac, authtime, client_princ, server_key,
|
||||||
|
right_krbtgt_signing_key,
|
||||||
|
(is_issuing_referral &&
|
||||||
|
(flags & KRB5_KDB_FLAG_PROTOCOL_TRANSITION)),
|
||||||
|
pac_data);
|
||||||
|
|
||||||
|
done:
|
||||||
|
free(princ);
|
||||||
|
krb5_free_principal(context, krbtgt_princ);
|
||||||
|
ipadb_free_principal(context, right_krbtgt);
|
||||||
|
if (right_krbtgt_signing_key != krbtgt_key) {
|
||||||
|
krb5_free_keyblock(context, right_krbtgt_signing_key);
|
||||||
|
}
|
||||||
|
return kerr;
|
||||||
|
}
|
||||||
|
|
||||||
void get_authz_data_types(krb5_context context, krb5_db_entry *entry,
|
void get_authz_data_types(krb5_context context, krb5_db_entry *entry,
|
||||||
bool *_with_pac, bool *_with_pad)
|
bool *_with_pac, bool *_with_pad)
|
||||||
{
|
{
|
||||||
@@ -2577,12 +2603,9 @@ void get_authz_data_types(krb5_context context, krb5_db_entry *entry,
|
|||||||
none_found = true;
|
none_found = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* for out-of-realm entries we suppress warnings in our defaults */
|
krb5_klog_syslog(LOG_ERR, "Ignoring unsupported " \
|
||||||
if (entry != NULL) {
|
"authorization data type [%s].",
|
||||||
krb5_klog_syslog(LOG_ERR, "Ignoring unsupported " \
|
authz_data_list[c]);
|
||||||
"authorization data type [%s].",
|
|
||||||
authz_data_list[c]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2607,6 +2630,187 @@ done:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
krb5_error_code ipadb_sign_authdata(krb5_context context,
|
||||||
|
unsigned int flags,
|
||||||
|
krb5_const_principal client_princ,
|
||||||
|
krb5_db_entry *client,
|
||||||
|
krb5_db_entry *server,
|
||||||
|
krb5_db_entry *krbtgt,
|
||||||
|
krb5_keyblock *client_key,
|
||||||
|
krb5_keyblock *server_key,
|
||||||
|
krb5_keyblock *krbtgt_key,
|
||||||
|
krb5_keyblock *session_key,
|
||||||
|
krb5_timestamp authtime,
|
||||||
|
krb5_authdata **tgt_auth_data,
|
||||||
|
krb5_authdata ***signed_auth_data)
|
||||||
|
{
|
||||||
|
krb5_const_principal ks_client_princ;
|
||||||
|
krb5_authdata **pac_auth_data = NULL;
|
||||||
|
krb5_authdata *authdata[2] = { NULL, NULL };
|
||||||
|
krb5_authdata ad;
|
||||||
|
krb5_boolean is_as_req;
|
||||||
|
krb5_error_code kerr;
|
||||||
|
krb5_pac pac = NULL;
|
||||||
|
krb5_data pac_data;
|
||||||
|
struct ipadb_context *ipactx;
|
||||||
|
bool with_pac;
|
||||||
|
bool with_pad;
|
||||||
|
bool make_ad = false;
|
||||||
|
int result;
|
||||||
|
krb5_db_entry *client_entry = NULL;
|
||||||
|
krb5_boolean is_equal;
|
||||||
|
bool force_reinit_mspac = false;
|
||||||
|
|
||||||
|
|
||||||
|
is_as_req = ((flags & KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY) != 0);
|
||||||
|
|
||||||
|
/* When using s4u2proxy client_princ actually refers to the proxied user
|
||||||
|
* while client->princ to the proxy service asking for the TGS on behalf
|
||||||
|
* of the proxied user. So always use client_princ in preference */
|
||||||
|
if (client_princ != NULL) {
|
||||||
|
ks_client_princ = client_princ;
|
||||||
|
if (!is_as_req) {
|
||||||
|
is_equal = false;
|
||||||
|
if ((client != NULL) && (client->princ != NULL)) {
|
||||||
|
is_equal = krb5_principal_compare(context, client_princ, client->princ);
|
||||||
|
}
|
||||||
|
if (!is_equal) {
|
||||||
|
kerr = ipadb_get_principal(context, client_princ, flags, &client_entry);
|
||||||
|
/* If we didn't find client_princ in our database, it might be:
|
||||||
|
* - a principal from another realm, handle it down in ipadb_get/verify_pac()
|
||||||
|
*/
|
||||||
|
if (kerr != 0) {
|
||||||
|
client_entry = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (client == NULL) {
|
||||||
|
*signed_auth_data = NULL;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
ks_client_princ = client->princ;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (client_entry == NULL) client_entry = client;
|
||||||
|
|
||||||
|
if (is_as_req) {
|
||||||
|
get_authz_data_types(context, client_entry, &with_pac, &with_pad);
|
||||||
|
} else {
|
||||||
|
get_authz_data_types(context, server, &with_pac, &with_pad);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (with_pad) {
|
||||||
|
krb5_klog_syslog(LOG_ERR, "PAD authorization data is requested but " \
|
||||||
|
"currently not supported.");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* we need to create a PAC if we are requested one and this is an AS REQ,
|
||||||
|
* or we are doing protocol transition (S4USelf) but not over cross-realm
|
||||||
|
*/
|
||||||
|
if ((is_as_req && (flags & KRB5_KDB_FLAG_INCLUDE_PAC)) ||
|
||||||
|
((flags & KRB5_KDB_FLAG_PROTOCOL_TRANSITION) && (client != NULL))) {
|
||||||
|
make_ad = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (with_pac && make_ad) {
|
||||||
|
|
||||||
|
ipactx = ipadb_get_context(context);
|
||||||
|
if (!ipactx) {
|
||||||
|
kerr = ENOMEM;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Be aggressive here: special case for discovering range type
|
||||||
|
* immediately after establishing the trust by IPA framework. For all
|
||||||
|
* other cases call ipadb_reinit_mspac() with force_reinit_mspac set
|
||||||
|
* to 'false' to make sure the information about trusted domains is
|
||||||
|
* updated on a regular basis for all worker processes. */
|
||||||
|
if ((krb5_princ_size(context, ks_client_princ) == 2) &&
|
||||||
|
(strncmp(krb5_princ_component(context, ks_client_princ, 0)->data, "HTTP",
|
||||||
|
krb5_princ_component(context, ks_client_princ, 0)->length) == 0) &&
|
||||||
|
(ulc_casecmp(krb5_princ_component(context, ks_client_princ, 1)->data,
|
||||||
|
krb5_princ_component(context, ks_client_princ, 1)->length,
|
||||||
|
ipactx->kdc_hostname, strlen(ipactx->kdc_hostname),
|
||||||
|
NULL, NULL, &result) == 0)) {
|
||||||
|
force_reinit_mspac = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
(void)ipadb_reinit_mspac(ipactx, force_reinit_mspac);
|
||||||
|
|
||||||
|
kerr = ipadb_get_pac(context, client, flags, authtime, &pac);
|
||||||
|
if (kerr != 0 && kerr != ENOENT) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
} else if (with_pac && !is_as_req) {
|
||||||
|
/* find the existing PAC, if present */
|
||||||
|
kerr = krb5_find_authdata(context, tgt_auth_data, NULL,
|
||||||
|
KRB5_AUTHDATA_WIN2K_PAC, &pac_auth_data);
|
||||||
|
if (kerr != 0) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
/* check or generate pac data */
|
||||||
|
if ((pac_auth_data == NULL) || (pac_auth_data[0] == NULL)) {
|
||||||
|
if (flags & KRB5_KDB_FLAG_CONSTRAINED_DELEGATION) {
|
||||||
|
kerr = ipadb_get_pac(context, client_entry, flags, authtime, &pac);
|
||||||
|
if (kerr != 0 && kerr != ENOENT) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (pac_auth_data[1] != NULL) {
|
||||||
|
kerr = KRB5KDC_ERR_BADOPTION; /* FIXME: right error ? */
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
kerr = ipadb_verify_pac(context, flags, ks_client_princ, client,
|
||||||
|
server, krbtgt, server_key, krbtgt_key,
|
||||||
|
authtime, pac_auth_data, &pac);
|
||||||
|
if (kerr != 0) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pac == NULL) {
|
||||||
|
/* No PAC to deal with, proceed */
|
||||||
|
*signed_auth_data = NULL;
|
||||||
|
kerr = 0;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
kerr = ipadb_sign_pac(context, flags, ks_client_princ, server, krbtgt,
|
||||||
|
server_key, krbtgt_key, authtime, pac, &pac_data);
|
||||||
|
if (kerr != 0) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* put in signed data */
|
||||||
|
ad.magic = KV5M_AUTHDATA;
|
||||||
|
ad.ad_type = KRB5_AUTHDATA_WIN2K_PAC;
|
||||||
|
ad.contents = (krb5_octet *)pac_data.data;
|
||||||
|
ad.length = pac_data.length;
|
||||||
|
|
||||||
|
authdata[0] = &ad;
|
||||||
|
|
||||||
|
kerr = krb5_encode_authdata_container(context,
|
||||||
|
KRB5_AUTHDATA_IF_RELEVANT,
|
||||||
|
authdata,
|
||||||
|
signed_auth_data);
|
||||||
|
krb5_free_data_contents(context, &pac_data);
|
||||||
|
if (kerr != 0) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
kerr = 0;
|
||||||
|
|
||||||
|
done:
|
||||||
|
if (client_entry != NULL && client_entry != client) {
|
||||||
|
ipadb_free_principal(context, client_entry);
|
||||||
|
}
|
||||||
|
krb5_pac_free(context, pac);
|
||||||
|
return kerr;
|
||||||
|
}
|
||||||
|
|
||||||
static char *get_server_netbios_name(struct ipadb_context *ipactx)
|
static char *get_server_netbios_name(struct ipadb_context *ipactx)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,24 +53,6 @@ struct ipadb_adtrusts {
|
|||||||
|
|
||||||
char *dom_sid_string(TALLOC_CTX *memctx, const struct dom_sid *dom_sid);
|
char *dom_sid_string(TALLOC_CTX *memctx, const struct dom_sid *dom_sid);
|
||||||
krb5_error_code filter_logon_info(krb5_context context, TALLOC_CTX *memctx,
|
krb5_error_code filter_logon_info(krb5_context context, TALLOC_CTX *memctx,
|
||||||
krb5_data *realm, struct PAC_LOGON_INFO_CTR *info);
|
krb5_data realm, struct PAC_LOGON_INFO_CTR *info);
|
||||||
void get_authz_data_types(krb5_context context, krb5_db_entry *entry,
|
void get_authz_data_types(krb5_context context, krb5_db_entry *entry,
|
||||||
bool *_with_pac, bool *_with_pad);
|
bool *_with_pac, bool *_with_pad);
|
||||||
|
|
||||||
bool ipadb_is_cross_realm_krbtgt(krb5_const_principal princ);
|
|
||||||
krb5_error_code ipadb_get_pac(krb5_context kcontext,
|
|
||||||
unsigned int flags,
|
|
||||||
krb5_db_entry *client,
|
|
||||||
krb5_db_entry *server,
|
|
||||||
krb5_keyblock *replaced_reply_key,
|
|
||||||
krb5_timestamp authtime,
|
|
||||||
krb5_pac *pac);
|
|
||||||
krb5_error_code ipadb_common_verify_pac(krb5_context context,
|
|
||||||
unsigned int flags,
|
|
||||||
krb5_db_entry *client,
|
|
||||||
krb5_db_entry *server,
|
|
||||||
krb5_db_entry *signing_krbtgt,
|
|
||||||
krb5_keyblock *krbtgt_key,
|
|
||||||
krb5_timestamp authtime,
|
|
||||||
krb5_pac old_pac,
|
|
||||||
krb5_pac *pac);
|
|
||||||
@@ -1,387 +0,0 @@
|
|||||||
/*
|
|
||||||
* MIT Kerberos KDC database backend for FreeIPA
|
|
||||||
*
|
|
||||||
* Authors: Simo Sorce <ssorce@redhat.com>
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Simo Sorce, Red Hat
|
|
||||||
* see file 'COPYING' for use and warranty information
|
|
||||||
*
|
|
||||||
* 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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "ipa_hostname.h"
|
|
||||||
#include "ipa_kdb.h"
|
|
||||||
#include <talloc.h>
|
|
||||||
#include <unicase.h>
|
|
||||||
#include "util/time.h"
|
|
||||||
#include "gen_ndr/ndr_krb5pac.h"
|
|
||||||
|
|
||||||
#include "ipa_kdb_mspac_private.h"
|
|
||||||
|
|
||||||
static
|
|
||||||
krb5_error_code ipadb_verify_pac(krb5_context context,
|
|
||||||
unsigned int flags,
|
|
||||||
krb5_const_principal client_princ,
|
|
||||||
krb5_db_entry *proxy,
|
|
||||||
krb5_db_entry *server,
|
|
||||||
krb5_db_entry *krbtgt,
|
|
||||||
krb5_keyblock *server_key,
|
|
||||||
krb5_keyblock *krbtgt_key,
|
|
||||||
krb5_timestamp authtime,
|
|
||||||
krb5_authdata **authdata,
|
|
||||||
krb5_pac *pac)
|
|
||||||
{
|
|
||||||
krb5_error_code kerr;
|
|
||||||
krb5_pac old_pac = NULL;
|
|
||||||
kerr = krb5_pac_parse(context,
|
|
||||||
authdata[0]->contents,
|
|
||||||
authdata[0]->length,
|
|
||||||
&old_pac);
|
|
||||||
if (kerr == 0) {
|
|
||||||
krb5_keyblock *srv_key = NULL;
|
|
||||||
krb5_keyblock *priv_key = NULL;
|
|
||||||
bool is_cross_realm = false;
|
|
||||||
|
|
||||||
/* for cross realm trusts cases we need to check the right checksum.
|
|
||||||
* when the PAC is signed by our realm, we can always just check it
|
|
||||||
* passing our realm krbtgt key as the kdc checksum key (privsvr).
|
|
||||||
* But when a trusted realm passes us a PAC the kdc checksum is
|
|
||||||
* generated with that realm krbtgt key, so we need to use the cross
|
|
||||||
* realm krbtgt to check the 'server' checksum instead. */
|
|
||||||
if (ipadb_is_cross_realm_krbtgt(krbtgt->princ)) {
|
|
||||||
/* krbtgt from a trusted realm */
|
|
||||||
is_cross_realm = true;
|
|
||||||
srv_key = krbtgt_key;
|
|
||||||
} else {
|
|
||||||
/* krbtgt from our own realm */
|
|
||||||
priv_key = krbtgt_key;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* only pass with_realm TRUE when it is cross-realm ticket and S4U
|
|
||||||
* extension (S4U2Self or S4U2Proxy (RBCD)) was requested */
|
|
||||||
kerr = krb5_pac_verify_ext(context, old_pac, authtime,
|
|
||||||
NULL, srv_key, priv_key,
|
|
||||||
(is_cross_realm &&
|
|
||||||
(flags & KRB5_KDB_FLAG_PROTOCOL_TRANSITION)));
|
|
||||||
if (kerr) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
kerr = ipadb_common_verify_pac(context, flags,
|
|
||||||
proxy, server, krbtgt,
|
|
||||||
krbtgt_key,
|
|
||||||
authtime, old_pac, pac);
|
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
|
||||||
krb5_free_authdata(context, authdata);
|
|
||||||
krb5_pac_free(context, old_pac);
|
|
||||||
return kerr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static krb5_error_code ipadb_sign_pac(krb5_context context,
|
|
||||||
unsigned int flags,
|
|
||||||
krb5_const_principal client_princ,
|
|
||||||
krb5_db_entry *server,
|
|
||||||
krb5_db_entry *krbtgt,
|
|
||||||
krb5_keyblock *server_key,
|
|
||||||
krb5_keyblock *krbtgt_key,
|
|
||||||
krb5_timestamp authtime,
|
|
||||||
krb5_pac pac,
|
|
||||||
krb5_data *pac_data)
|
|
||||||
{
|
|
||||||
krb5_keyblock *right_krbtgt_signing_key = NULL;
|
|
||||||
krb5_key_data *right_krbtgt_key;
|
|
||||||
krb5_db_entry *right_krbtgt = NULL;
|
|
||||||
krb5_principal krbtgt_princ = NULL;
|
|
||||||
krb5_error_code kerr;
|
|
||||||
char *princ = NULL;
|
|
||||||
bool is_issuing_referral = false;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* for cross realm trusts cases we need to sign with the right key.
|
|
||||||
* we need to fetch the right key on our own until the DAL is fixed
|
|
||||||
* to pass us separate check tgt keys and sign tgt keys */
|
|
||||||
|
|
||||||
/* We can only ever create the kdc checksum with our realm tgt key.
|
|
||||||
* So, if we get a cross realm tgt we have to fetch our realm tgt
|
|
||||||
* instead. */
|
|
||||||
if (ipadb_is_cross_realm_krbtgt(krbtgt->princ)) {
|
|
||||||
|
|
||||||
ret = asprintf(&princ, "krbtgt/%.*s@%.*s",
|
|
||||||
server->princ->realm.length,
|
|
||||||
server->princ->realm.data,
|
|
||||||
server->princ->realm.length,
|
|
||||||
server->princ->realm.data);
|
|
||||||
if (ret == -1) {
|
|
||||||
princ = NULL;
|
|
||||||
kerr = ENOMEM;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
kerr = krb5_parse_name(context, princ, &krbtgt_princ);
|
|
||||||
if (kerr) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
kerr = ipadb_get_principal(context, krbtgt_princ, 0, &right_krbtgt);
|
|
||||||
if (kerr) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
kerr = krb5_dbe_find_enctype(context, right_krbtgt,
|
|
||||||
-1, -1, 0, &right_krbtgt_key);
|
|
||||||
if (kerr) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
if (!right_krbtgt_key) {
|
|
||||||
kerr = KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
right_krbtgt_signing_key = malloc(sizeof(krb5_keyblock));
|
|
||||||
if (!right_krbtgt_signing_key) {
|
|
||||||
kerr = ENOMEM;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
kerr = krb5_dbe_decrypt_key_data(context, NULL, right_krbtgt_key,
|
|
||||||
right_krbtgt_signing_key, NULL);
|
|
||||||
if (kerr) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
right_krbtgt_signing_key = krbtgt_key;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef KRB5_KDB_FLAG_ISSUING_REFERRAL
|
|
||||||
is_issuing_referral = (flags & KRB5_KDB_FLAG_ISSUING_REFERRAL) != 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* only pass with_realm TRUE when it is cross-realm ticket and S4U2Self
|
|
||||||
* was requested */
|
|
||||||
#ifdef HAVE_KRB5_PAC_FULL_SIGN_COMPAT
|
|
||||||
kerr = krb5_pac_full_sign_compat(
|
|
||||||
context, pac, authtime, client_princ, server->princ, server_key,
|
|
||||||
right_krbtgt_signing_key,
|
|
||||||
(is_issuing_referral && (flags & KRB5_KDB_FLAG_PROTOCOL_TRANSITION)),
|
|
||||||
pac_data
|
|
||||||
);
|
|
||||||
#else
|
|
||||||
/* Use standard function, PAC extended KDC signature not supported */
|
|
||||||
kerr = krb5_pac_sign_ext(context, pac, authtime, client_princ, server_key,
|
|
||||||
right_krbtgt_signing_key,
|
|
||||||
(is_issuing_referral &&
|
|
||||||
(flags & KRB5_KDB_FLAG_PROTOCOL_TRANSITION)),
|
|
||||||
pac_data);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
done:
|
|
||||||
free(princ);
|
|
||||||
krb5_free_principal(context, krbtgt_princ);
|
|
||||||
ipadb_free_principal(context, right_krbtgt);
|
|
||||||
if (right_krbtgt_signing_key != krbtgt_key) {
|
|
||||||
krb5_free_keyblock(context, right_krbtgt_signing_key);
|
|
||||||
}
|
|
||||||
return kerr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
krb5_error_code ipadb_sign_authdata(krb5_context context,
|
|
||||||
unsigned int flags,
|
|
||||||
krb5_const_principal client_princ,
|
|
||||||
krb5_db_entry *client,
|
|
||||||
krb5_db_entry *server,
|
|
||||||
krb5_db_entry *krbtgt,
|
|
||||||
krb5_keyblock *client_key,
|
|
||||||
krb5_keyblock *server_key,
|
|
||||||
krb5_keyblock *krbtgt_key,
|
|
||||||
krb5_keyblock *session_key,
|
|
||||||
krb5_timestamp authtime,
|
|
||||||
krb5_authdata **tgt_auth_data,
|
|
||||||
krb5_authdata ***signed_auth_data)
|
|
||||||
{
|
|
||||||
krb5_const_principal ks_client_princ;
|
|
||||||
krb5_authdata **pac_auth_data = NULL;
|
|
||||||
krb5_authdata *authdata[2] = { NULL, NULL };
|
|
||||||
krb5_authdata ad;
|
|
||||||
krb5_boolean is_as_req;
|
|
||||||
krb5_error_code kerr;
|
|
||||||
krb5_pac pac = NULL;
|
|
||||||
krb5_data pac_data;
|
|
||||||
struct ipadb_context *ipactx;
|
|
||||||
bool with_pac;
|
|
||||||
bool with_pad;
|
|
||||||
bool make_ad = false;
|
|
||||||
int result;
|
|
||||||
krb5_db_entry *client_entry = NULL;
|
|
||||||
krb5_boolean is_equal;
|
|
||||||
bool force_reinit_mspac = false;
|
|
||||||
|
|
||||||
|
|
||||||
is_as_req = ((flags & KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY) != 0);
|
|
||||||
|
|
||||||
/* When using s4u2proxy client_princ actually refers to the proxied user
|
|
||||||
* while client->princ to the proxy service asking for the TGS on behalf
|
|
||||||
* of the proxied user. So always use client_princ in preference */
|
|
||||||
if (client_princ != NULL) {
|
|
||||||
ks_client_princ = client_princ;
|
|
||||||
if (!is_as_req) {
|
|
||||||
is_equal = false;
|
|
||||||
if ((client != NULL) && (client->princ != NULL)) {
|
|
||||||
is_equal = krb5_principal_compare(context, client_princ, client->princ);
|
|
||||||
}
|
|
||||||
if (!is_equal) {
|
|
||||||
kerr = ipadb_get_principal(context, client_princ, flags, &client_entry);
|
|
||||||
/* If we didn't find client_princ in our database, it might be:
|
|
||||||
* - a principal from another realm, handle it down in ipadb_get/verify_pac()
|
|
||||||
*/
|
|
||||||
if (kerr != 0) {
|
|
||||||
client_entry = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (client == NULL) {
|
|
||||||
*signed_auth_data = NULL;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
ks_client_princ = client->princ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (client_entry == NULL) client_entry = client;
|
|
||||||
|
|
||||||
if (is_as_req) {
|
|
||||||
get_authz_data_types(context, client_entry, &with_pac, &with_pad);
|
|
||||||
} else {
|
|
||||||
get_authz_data_types(context, server, &with_pac, &with_pad);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (with_pad) {
|
|
||||||
krb5_klog_syslog(LOG_ERR, "PAD authorization data is requested but " \
|
|
||||||
"currently not supported.");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* we need to create a PAC if we are requested one and this is an AS REQ,
|
|
||||||
* or we are doing protocol transition (S4USelf) but not over cross-realm
|
|
||||||
*/
|
|
||||||
if ((is_as_req && (flags & KRB5_KDB_FLAG_INCLUDE_PAC)) ||
|
|
||||||
((flags & KRB5_KDB_FLAG_PROTOCOL_TRANSITION) && (client != NULL))) {
|
|
||||||
make_ad = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (with_pac && make_ad) {
|
|
||||||
|
|
||||||
ipactx = ipadb_get_context(context);
|
|
||||||
if (!ipactx) {
|
|
||||||
kerr = ENOMEM;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Be aggressive here: special case for discovering range type
|
|
||||||
* immediately after establishing the trust by IPA framework. For all
|
|
||||||
* other cases call ipadb_reinit_mspac() with force_reinit_mspac set
|
|
||||||
* to 'false' to make sure the information about trusted domains is
|
|
||||||
* updated on a regular basis for all worker processes. */
|
|
||||||
if ((krb5_princ_size(context, ks_client_princ) == 2) &&
|
|
||||||
(strncmp(krb5_princ_component(context, ks_client_princ, 0)->data, "HTTP",
|
|
||||||
krb5_princ_component(context, ks_client_princ, 0)->length) == 0) &&
|
|
||||||
(ulc_casecmp(krb5_princ_component(context, ks_client_princ, 1)->data,
|
|
||||||
krb5_princ_component(context, ks_client_princ, 1)->length,
|
|
||||||
ipactx->kdc_hostname, strlen(ipactx->kdc_hostname),
|
|
||||||
NULL, NULL, &result) == 0)) {
|
|
||||||
force_reinit_mspac = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
(void)ipadb_reinit_mspac(ipactx, force_reinit_mspac);
|
|
||||||
|
|
||||||
kerr = ipadb_get_pac(context, flags, client, server, NULL, authtime, &pac);
|
|
||||||
if (kerr != 0 && kerr != ENOENT) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
} else if (with_pac && !is_as_req) {
|
|
||||||
/* find the existing PAC, if present */
|
|
||||||
kerr = krb5_find_authdata(context, tgt_auth_data, NULL,
|
|
||||||
KRB5_AUTHDATA_WIN2K_PAC, &pac_auth_data);
|
|
||||||
if (kerr != 0) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
/* check or generate pac data */
|
|
||||||
if ((pac_auth_data == NULL) || (pac_auth_data[0] == NULL)) {
|
|
||||||
if (flags & KRB5_KDB_FLAG_CONSTRAINED_DELEGATION) {
|
|
||||||
kerr = ipadb_get_pac(context, flags, client_entry, server, NULL, authtime, &pac);
|
|
||||||
if (kerr != 0 && kerr != ENOENT) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (pac_auth_data[1] != NULL) {
|
|
||||||
kerr = KRB5KDC_ERR_BADOPTION; /* FIXME: right error ? */
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
kerr = ipadb_verify_pac(context, flags, ks_client_princ, client,
|
|
||||||
server, krbtgt, server_key, krbtgt_key,
|
|
||||||
authtime, pac_auth_data, &pac);
|
|
||||||
if (kerr != 0) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pac == NULL) {
|
|
||||||
/* No PAC to deal with, proceed */
|
|
||||||
*signed_auth_data = NULL;
|
|
||||||
kerr = 0;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
kerr = ipadb_sign_pac(context, flags, ks_client_princ, server, krbtgt,
|
|
||||||
server_key, krbtgt_key, authtime, pac, &pac_data);
|
|
||||||
if (kerr != 0) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* put in signed data */
|
|
||||||
ad.magic = KV5M_AUTHDATA;
|
|
||||||
ad.ad_type = KRB5_AUTHDATA_WIN2K_PAC;
|
|
||||||
ad.contents = (krb5_octet *)pac_data.data;
|
|
||||||
ad.length = pac_data.length;
|
|
||||||
|
|
||||||
authdata[0] = &ad;
|
|
||||||
|
|
||||||
kerr = krb5_encode_authdata_container(context,
|
|
||||||
KRB5_AUTHDATA_IF_RELEVANT,
|
|
||||||
authdata,
|
|
||||||
signed_auth_data);
|
|
||||||
krb5_free_data_contents(context, &pac_data);
|
|
||||||
if (kerr != 0) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
kerr = 0;
|
|
||||||
|
|
||||||
done:
|
|
||||||
if (client_entry != NULL && client_entry != client) {
|
|
||||||
ipadb_free_principal(context, client_entry);
|
|
||||||
}
|
|
||||||
krb5_pac_free(context, pac);
|
|
||||||
return kerr;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,138 +0,0 @@
|
|||||||
/*
|
|
||||||
* MIT Kerberos KDC database backend for FreeIPA
|
|
||||||
*
|
|
||||||
* Authors: Simo Sorce <ssorce@redhat.com>
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Simo Sorce, Red Hat
|
|
||||||
* see file 'COPYING' for use and warranty information
|
|
||||||
*
|
|
||||||
* 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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include "ipa_hostname.h"
|
|
||||||
#include "ipa_kdb.h"
|
|
||||||
#include <talloc.h>
|
|
||||||
#include <unicase.h>
|
|
||||||
#include "util/time.h"
|
|
||||||
#include "gen_ndr/ndr_krb5pac.h"
|
|
||||||
|
|
||||||
#include "ipa_kdb_mspac_private.h"
|
|
||||||
|
|
||||||
krb5_error_code
|
|
||||||
ipadb_v9_issue_pac(krb5_context context, unsigned int flags,
|
|
||||||
krb5_db_entry *client,
|
|
||||||
krb5_keyblock *replaced_reply_key,
|
|
||||||
krb5_db_entry *server,
|
|
||||||
krb5_db_entry *signing_krbtgt,
|
|
||||||
krb5_timestamp authtime,
|
|
||||||
krb5_pac old_pac,
|
|
||||||
krb5_pac new_pac,
|
|
||||||
krb5_data ***auth_indicators)
|
|
||||||
{
|
|
||||||
bool with_pac;
|
|
||||||
bool with_pad;
|
|
||||||
krb5_error_code kerr = 0;
|
|
||||||
bool is_as_req = flags & CLIENT_REFERRALS_FLAGS;
|
|
||||||
|
|
||||||
if (is_as_req) {
|
|
||||||
get_authz_data_types(context, client, &with_pac, &with_pad);
|
|
||||||
} else {
|
|
||||||
get_authz_data_types(context, server, &with_pac, &with_pad);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (with_pad) {
|
|
||||||
krb5_klog_syslog(LOG_ERR, "PAD authorization data is requested but " \
|
|
||||||
"currently not supported.");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get a new PAC for AS-REQ or S4U2Self for our realm.
|
|
||||||
*
|
|
||||||
* For a simple cross-realm S4U2Proxy there will be the following TGS
|
|
||||||
* requests after the client realm is identified:
|
|
||||||
*
|
|
||||||
* 1. server@SREALM to SREALM for krbtgt/CREALM@SREALM -- a regular TGS
|
|
||||||
* request with server's normal TGT and no S4U2Self padata.
|
|
||||||
* 2. server@SREALM to CREALM for server@SREALM (expressed as an
|
|
||||||
* enterprise principal), with the TGT from #1 as header ticket and
|
|
||||||
* S4U2Self padata identifying the client.
|
|
||||||
* 3. server@SREALM to SREALM for server@SREALM with S4U2Self padata,
|
|
||||||
* with the referral TGT from #2 as header ticket
|
|
||||||
*
|
|
||||||
* In request 2 the PROTOCOL_TRANSITION and CROSS_REALM flags are set,
|
|
||||||
* and the request is for a local client (so client != NULL) and we
|
|
||||||
* want to make a new PAC.
|
|
||||||
*
|
|
||||||
* In request 3 the PROTOCOL_TRANSITION and CROSS_REALM flags are also
|
|
||||||
* set, but the request is for a non-local client (so client == NULL)
|
|
||||||
* and we want to copy the subject PAC contained in the referral TGT.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (old_pac == NULL ||
|
|
||||||
(client != NULL && (flags & KRB5_KDB_FLAG_PROTOCOL_TRANSITION))) {
|
|
||||||
/* generate initial PAC */
|
|
||||||
if (with_pac) {
|
|
||||||
krb5_boolean force_reinit_mspac = FALSE;
|
|
||||||
struct ipadb_context *ipactx = ipadb_get_context(context);
|
|
||||||
int result = 0;
|
|
||||||
|
|
||||||
if (!ipactx) {
|
|
||||||
kerr = ENOMEM;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (client != NULL) {
|
|
||||||
/* Be aggressive here: special case for discovering range type
|
|
||||||
* immediately after establishing the trust by IPA framework. For all
|
|
||||||
* other cases call ipadb_reinit_mspac() with force_reinit_mspac set
|
|
||||||
* to 'false' to make sure the information about trusted domains is
|
|
||||||
* updated on a regular basis for all worker processes. */
|
|
||||||
if ((krb5_princ_size(context, client->princ) == 2) &&
|
|
||||||
(strncmp(krb5_princ_component(context, client->princ, 0)->data, "HTTP",
|
|
||||||
krb5_princ_component(context, client->princ, 0)->length) == 0) &&
|
|
||||||
(ulc_casecmp(krb5_princ_component(context, client->princ, 1)->data,
|
|
||||||
krb5_princ_component(context, client->princ, 1)->length,
|
|
||||||
ipactx->kdc_hostname, strlen(ipactx->kdc_hostname),
|
|
||||||
NULL, NULL, &result) == 0)) {
|
|
||||||
force_reinit_mspac = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
(void)ipadb_reinit_mspac(ipactx, force_reinit_mspac);
|
|
||||||
|
|
||||||
/* MS-PAC needs proper configuration and if it is missing, we simply skip issuing one */
|
|
||||||
if (ipactx->mspac->flat_server_name == NULL) {
|
|
||||||
return KRB5_PLUGIN_OP_NOTSUPP;
|
|
||||||
}
|
|
||||||
kerr = ipadb_get_pac(context, flags,
|
|
||||||
client, server, replaced_reply_key,
|
|
||||||
authtime, &new_pac);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
kerr = ipadb_common_verify_pac(context, flags,
|
|
||||||
client, server,
|
|
||||||
signing_krbtgt,
|
|
||||||
NULL,
|
|
||||||
authtime,
|
|
||||||
old_pac, &new_pac);
|
|
||||||
if (kerr == ENOENT) {
|
|
||||||
kerr = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* in krb5 1.20 no need to sign tickets anymore, KDC does it for us */
|
|
||||||
done:
|
|
||||||
return kerr;
|
|
||||||
}
|
|
||||||
@@ -77,13 +77,10 @@ static char *std_principal_attrs[] = {
|
|||||||
IPA_KRB_AUTHZ_DATA_ATTR,
|
IPA_KRB_AUTHZ_DATA_ATTR,
|
||||||
IPA_USER_AUTH_TYPE,
|
IPA_USER_AUTH_TYPE,
|
||||||
"ipatokenRadiusConfigLink",
|
"ipatokenRadiusConfigLink",
|
||||||
"ipaIdpConfigLink",
|
|
||||||
"ipaPassKey",
|
|
||||||
"krbAuthIndMaxTicketLife",
|
"krbAuthIndMaxTicketLife",
|
||||||
"krbAuthIndMaxRenewableAge",
|
"krbAuthIndMaxRenewableAge",
|
||||||
"ipaNTSecurityIdentifier",
|
"ipaNTSecurityIdentifier",
|
||||||
"ipaUniqueID",
|
"ipaUniqueID",
|
||||||
"memberPrincipal",
|
|
||||||
|
|
||||||
"objectClass",
|
"objectClass",
|
||||||
NULL
|
NULL
|
||||||
@@ -115,14 +112,6 @@ static char *std_principal_obj_classes[] = {
|
|||||||
|
|
||||||
#define DEFAULT_TL_DATA_CONTENT "\x00\x00\x00\x00principal@UNINITIALIZED"
|
#define DEFAULT_TL_DATA_CONTENT "\x00\x00\x00\x00principal@UNINITIALIZED"
|
||||||
|
|
||||||
#ifndef KRB5_KDB_SK_OPTIONAL_PAC_TKT_CHKSUM
|
|
||||||
#define KRB5_KDB_SK_OPTIONAL_PAC_TKT_CHKSUM "optional_pac_tkt_chksum"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef KRB5_KDB_SK_PAC_PRIVSVR_ENCTYPE
|
|
||||||
#define KRB5_KDB_SK_PAC_PRIVSVR_ENCTYPE "pac_privsvr_enctype"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int ipadb_ldap_attr_to_tl_data(LDAP *lcontext, LDAPMessage *le,
|
static int ipadb_ldap_attr_to_tl_data(LDAP *lcontext, LDAPMessage *le,
|
||||||
char *attrname,
|
char *attrname,
|
||||||
krb5_tl_data **result, int *num)
|
krb5_tl_data **result, int *num)
|
||||||
@@ -188,56 +177,10 @@ done:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static krb5_error_code ipadb_set_tl_data(krb5_db_entry *entry,
|
||||||
is_tgs_princ(krb5_context kcontext, krb5_const_principal princ)
|
krb5_int16 type,
|
||||||
{
|
krb5_ui_2 length,
|
||||||
krb5_data *primary;
|
const krb5_octet *data)
|
||||||
size_t l_tgs_name;
|
|
||||||
|
|
||||||
if (2 != krb5_princ_size(kcontext, princ))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
primary = krb5_princ_component(kcontext, princ, 0);
|
|
||||||
|
|
||||||
l_tgs_name = strlen(KRB5_TGS_NAME);
|
|
||||||
|
|
||||||
if (l_tgs_name != primary->length)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return 0 == memcmp(primary->data, KRB5_TGS_NAME, l_tgs_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
static krb5_error_code
|
|
||||||
cmp_local_tgs_princ(krb5_context kcontext, const char *local_realm,
|
|
||||||
krb5_const_principal princ, bool *result)
|
|
||||||
{
|
|
||||||
krb5_principal local_tgs_princ;
|
|
||||||
size_t l_local_realm;
|
|
||||||
krb5_error_code kerr;
|
|
||||||
bool res;
|
|
||||||
|
|
||||||
l_local_realm = strlen(local_realm);
|
|
||||||
|
|
||||||
kerr = krb5_build_principal(kcontext, &local_tgs_princ,
|
|
||||||
l_local_realm, local_realm,
|
|
||||||
KRB5_TGS_NAME, local_realm, NULL);
|
|
||||||
if (kerr)
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
res = (bool) krb5_principal_compare(kcontext, local_tgs_princ, princ);
|
|
||||||
|
|
||||||
if (result)
|
|
||||||
*result = res;
|
|
||||||
|
|
||||||
end:
|
|
||||||
krb5_free_principal(kcontext, local_tgs_princ);
|
|
||||||
return kerr;
|
|
||||||
}
|
|
||||||
|
|
||||||
krb5_error_code ipadb_set_tl_data(krb5_db_entry *entry,
|
|
||||||
krb5_int16 type,
|
|
||||||
krb5_ui_2 length,
|
|
||||||
const krb5_octet *data)
|
|
||||||
{
|
{
|
||||||
krb5_error_code kerr;
|
krb5_error_code kerr;
|
||||||
krb5_tl_data *new_td = NULL;
|
krb5_tl_data *new_td = NULL;
|
||||||
@@ -373,50 +316,8 @@ static void ipadb_validate_radius(struct ipadb_context *ipactx,
|
|||||||
"ipatokenRadiusConfigLink");
|
"ipatokenRadiusConfigLink");
|
||||||
if (vals == NULL || vals[0] == NULL)
|
if (vals == NULL || vals[0] == NULL)
|
||||||
*ua &= ~IPADB_USER_AUTH_RADIUS;
|
*ua &= ~IPADB_USER_AUTH_RADIUS;
|
||||||
else {
|
else
|
||||||
/* OTP use implies presence of password in IPA LDAP,
|
*ua = IPADB_USER_AUTH_RADIUS;
|
||||||
* this is incompatible with RADIUS proxy case where
|
|
||||||
* a password in LDAP is not used anymore. */
|
|
||||||
*ua &= ~IPADB_USER_AUTH_OTP;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vals != NULL)
|
|
||||||
ldap_value_free_len(vals);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ipadb_validate_idp(struct ipadb_context *ipactx,
|
|
||||||
LDAPMessage *lentry,
|
|
||||||
enum ipadb_user_auth *ua)
|
|
||||||
{
|
|
||||||
struct berval **vals;
|
|
||||||
|
|
||||||
if (!(*ua & IPADB_USER_AUTH_IDP))
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Ensure that the user has a link to an IdP config. */
|
|
||||||
vals = ldap_get_values_len(ipactx->lcontext, lentry,
|
|
||||||
"ipaIdpConfigLink");
|
|
||||||
if (vals == NULL || vals[0] == NULL)
|
|
||||||
*ua &= ~IPADB_USER_AUTH_IDP;
|
|
||||||
|
|
||||||
if (vals != NULL)
|
|
||||||
ldap_value_free_len(vals);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ipadb_validate_passkey(struct ipadb_context *ipactx,
|
|
||||||
LDAPMessage *lentry,
|
|
||||||
enum ipadb_user_auth *ua)
|
|
||||||
{
|
|
||||||
struct berval **vals;
|
|
||||||
|
|
||||||
if (!(*ua & IPADB_USER_AUTH_PASSKEY))
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Ensure that the user has a link to an IdP config. */
|
|
||||||
vals = ldap_get_values_len(ipactx->lcontext, lentry,
|
|
||||||
"ipaPassKey");
|
|
||||||
if (vals == NULL || vals[0] == NULL)
|
|
||||||
*ua &= ~IPADB_USER_AUTH_PASSKEY;
|
|
||||||
|
|
||||||
if (vals != NULL)
|
if (vals != NULL)
|
||||||
ldap_value_free_len(vals);
|
ldap_value_free_len(vals);
|
||||||
@@ -454,8 +355,6 @@ static enum ipadb_user_auth ipadb_get_user_auth(struct ipadb_context *ipactx,
|
|||||||
/* Perform flag validation. */
|
/* Perform flag validation. */
|
||||||
ipadb_validate_otp(ipactx, lentry, &ua);
|
ipadb_validate_otp(ipactx, lentry, &ua);
|
||||||
ipadb_validate_radius(ipactx, lentry, &ua);
|
ipadb_validate_radius(ipactx, lentry, &ua);
|
||||||
ipadb_validate_idp(ipactx, lentry, &ua);
|
|
||||||
ipadb_validate_passkey(ipactx, lentry, &ua);
|
|
||||||
|
|
||||||
return ua;
|
return ua;
|
||||||
}
|
}
|
||||||
@@ -638,10 +537,6 @@ static void ipadb_parse_authind_policies(krb5_context kcontext,
|
|||||||
IPADB_USER_AUTH_PKINIT, IPADB_USER_AUTH_IDX_PKINIT},
|
IPADB_USER_AUTH_PKINIT, IPADB_USER_AUTH_IDX_PKINIT},
|
||||||
{"krbAuthIndMaxTicketLife;hardened",
|
{"krbAuthIndMaxTicketLife;hardened",
|
||||||
IPADB_USER_AUTH_HARDENED, IPADB_USER_AUTH_IDX_HARDENED},
|
IPADB_USER_AUTH_HARDENED, IPADB_USER_AUTH_IDX_HARDENED},
|
||||||
{"krbAuthIndMaxTicketLife;idp",
|
|
||||||
IPADB_USER_AUTH_IDP, IPADB_USER_AUTH_IDX_IDP},
|
|
||||||
{"krbAuthIndMaxTicketLife;passkey",
|
|
||||||
IPADB_USER_AUTH_PASSKEY, IPADB_USER_AUTH_IDX_PASSKEY},
|
|
||||||
{NULL, IPADB_USER_AUTH_NONE, IPADB_USER_AUTH_IDX_MAX},
|
{NULL, IPADB_USER_AUTH_NONE, IPADB_USER_AUTH_IDX_MAX},
|
||||||
}, age_authind_map[] = {
|
}, age_authind_map[] = {
|
||||||
{"krbAuthIndMaxRenewableAge;otp",
|
{"krbAuthIndMaxRenewableAge;otp",
|
||||||
@@ -652,10 +547,6 @@ static void ipadb_parse_authind_policies(krb5_context kcontext,
|
|||||||
IPADB_USER_AUTH_PKINIT, IPADB_USER_AUTH_IDX_PKINIT},
|
IPADB_USER_AUTH_PKINIT, IPADB_USER_AUTH_IDX_PKINIT},
|
||||||
{"krbAuthIndMaxRenewableAge;hardened",
|
{"krbAuthIndMaxRenewableAge;hardened",
|
||||||
IPADB_USER_AUTH_HARDENED, IPADB_USER_AUTH_IDX_HARDENED},
|
IPADB_USER_AUTH_HARDENED, IPADB_USER_AUTH_IDX_HARDENED},
|
||||||
{"krbAuthIndMaxRenewableAge;idp",
|
|
||||||
IPADB_USER_AUTH_IDP, IPADB_USER_AUTH_IDX_IDP},
|
|
||||||
{"krbAuthIndMaxRenewableAge;passkey",
|
|
||||||
IPADB_USER_AUTH_PASSKEY, IPADB_USER_AUTH_IDX_PASSKEY},
|
|
||||||
{NULL, IPADB_USER_AUTH_NONE, IPADB_USER_AUTH_IDX_MAX},
|
{NULL, IPADB_USER_AUTH_NONE, IPADB_USER_AUTH_IDX_MAX},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -665,13 +556,7 @@ static void ipadb_parse_authind_policies(krb5_context kcontext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; life_authind_map[i].attribute != NULL; i++) {
|
for (size_t i = 0; life_authind_map[i].attribute != NULL; i++) {
|
||||||
/* Only change max_life/max_renewable_life per indicator
|
if (ua & life_authind_map[i].flag) {
|
||||||
* if the value wasn't set yet. This function gets called twice:
|
|
||||||
* - for the principal entry
|
|
||||||
* - for the associated policy lookup */
|
|
||||||
if ((ua & life_authind_map[i].flag) &&
|
|
||||||
(ied->pol_limits[life_authind_map[i].idx].max_life == 0)) {
|
|
||||||
|
|
||||||
ret = ipadb_ldap_attr_to_int(lcontext, lentry,
|
ret = ipadb_ldap_attr_to_int(lcontext, lentry,
|
||||||
life_authind_map[i].attribute,
|
life_authind_map[i].attribute,
|
||||||
&result);
|
&result);
|
||||||
@@ -698,8 +583,6 @@ static krb5_error_code ipadb_parse_ldap_entry(krb5_context kcontext,
|
|||||||
{
|
{
|
||||||
const krb5_octet rad_string[] = "otp\0[{\"indicators\": [\"radius\"]}]";
|
const krb5_octet rad_string[] = "otp\0[{\"indicators\": [\"radius\"]}]";
|
||||||
const krb5_octet otp_string[] = "otp\0[{\"indicators\": [\"otp\"]}]";
|
const krb5_octet otp_string[] = "otp\0[{\"indicators\": [\"otp\"]}]";
|
||||||
const krb5_octet idp_string[] = "idp\0[{\"type\":\"oauth2\",\"indicators\": [\"idp\"]}]";
|
|
||||||
const krb5_octet passkey_string[] = "passkey\0[{\"indicators\": [\"passkey\"]}]";
|
|
||||||
struct ipadb_context *ipactx;
|
struct ipadb_context *ipactx;
|
||||||
enum ipadb_user_auth ua;
|
enum ipadb_user_auth ua;
|
||||||
LDAP *lcontext;
|
LDAP *lcontext;
|
||||||
@@ -714,7 +597,6 @@ static krb5_error_code ipadb_parse_ldap_entry(krb5_context kcontext,
|
|||||||
char *uidstring;
|
char *uidstring;
|
||||||
char **authz_data_list;
|
char **authz_data_list;
|
||||||
char *princ_sid;
|
char *princ_sid;
|
||||||
char **acl_list;
|
|
||||||
krb5_timestamp restime;
|
krb5_timestamp restime;
|
||||||
bool resbool;
|
bool resbool;
|
||||||
int result;
|
int result;
|
||||||
@@ -906,18 +788,17 @@ static krb5_error_code ipadb_parse_ldap_entry(krb5_context kcontext,
|
|||||||
&res_key_data, &result, &mkvno);
|
&res_key_data, &result, &mkvno);
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
case 0:
|
case 0:
|
||||||
/* Only set a principal's key if password or hardened auth can be used.
|
/* Only set a principal's key if password auth can be used. Otherwise
|
||||||
* Otherwise the KDC would add pre-authentication methods to the
|
* the KDC would add pre-authentication methods to the NEEDED_PREAUTH
|
||||||
* NEEDED_PREAUTH reply for AS-REQs which indicate the password
|
* reply for AS-REQs which indicate the password authentication is
|
||||||
* authentication is available. This might confuse applications like
|
* available. This might confuse applications like e.g. SSSD which try
|
||||||
* e.g. SSSD which try to determine suitable authentication methods and
|
* to determine suitable authentication methods and corresponding
|
||||||
* corresponding prompts with the help of MIT Kerberos' responder
|
* prompts with the help of MIT Kerberos' responder interface which
|
||||||
* interface which acts on the returned pre-authentication methods. A
|
* acts on the returned pre-authentication methods. A typical example
|
||||||
* typical example is enforced OTP authentication where of course keys
|
* is enforced OTP authentication where of course keys are available
|
||||||
* are available for the first factor but password authentication
|
* for the first factor but password authentication should not be
|
||||||
* should not be advertised by the KDC. */
|
* advertised by the KDC. */
|
||||||
if (!(ua & (IPADB_USER_AUTH_PASSWORD | IPADB_USER_AUTH_HARDENED)) &&
|
if (!(ua & IPADB_USER_AUTH_PASSWORD) && (ua != IPADB_USER_AUTH_NONE)) {
|
||||||
(ua != IPADB_USER_AUTH_NONE)) {
|
|
||||||
/* This is the same behavior as ENOENT below. */
|
/* This is the same behavior as ENOENT below. */
|
||||||
ipa_krb5_free_key_data(res_key_data, result);
|
ipa_krb5_free_key_data(res_key_data, result);
|
||||||
break;
|
break;
|
||||||
@@ -1079,16 +960,6 @@ static krb5_error_code ipadb_parse_ldap_entry(krb5_context kcontext,
|
|||||||
sizeof(rad_string), rad_string);
|
sizeof(rad_string), rad_string);
|
||||||
if (kerr)
|
if (kerr)
|
||||||
goto done;
|
goto done;
|
||||||
} else if (ua & IPADB_USER_AUTH_IDP) {
|
|
||||||
kerr = ipadb_set_tl_data(entry, KRB5_TL_STRING_ATTRS,
|
|
||||||
sizeof(idp_string), idp_string);
|
|
||||||
if (kerr)
|
|
||||||
goto done;
|
|
||||||
} else if (ua & IPADB_USER_AUTH_PASSKEY) {
|
|
||||||
kerr = ipadb_set_tl_data(entry, KRB5_TL_STRING_ATTRS,
|
|
||||||
sizeof(passkey_string), passkey_string);
|
|
||||||
if (kerr)
|
|
||||||
goto done;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ua & ~IPADB_USER_AUTH_NONE) {
|
if (ua & ~IPADB_USER_AUTH_NONE) {
|
||||||
@@ -1116,30 +987,6 @@ static krb5_error_code ipadb_parse_ldap_entry(krb5_context kcontext,
|
|||||||
ied->has_sid = true;
|
ied->has_sid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if it has the serviceDelegation objectclass */
|
|
||||||
ret = ipadb_ldap_attr_has_value(lcontext, lentry,
|
|
||||||
"objectClass", "resourceDelegation");
|
|
||||||
if (ret != 0 && ret != ENOENT) {
|
|
||||||
kerr = ret;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
if (ret == 0) {
|
|
||||||
ret = ipadb_ldap_attr_to_strlist(lcontext, lentry,
|
|
||||||
"memberPrincipal", &acl_list);
|
|
||||||
if (ret != 0 && ret != ENOENT) {
|
|
||||||
kerr = KRB5_KDB_INTERNAL_ERROR;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
if (ret == 0) {
|
|
||||||
kerr = ipadb_set_tl_data(entry, KRB5_TL_CONSTRAINED_DELEGATION_ACL,
|
|
||||||
sizeof(acl_list),
|
|
||||||
(const krb5_octet *) &acl_list);
|
|
||||||
if (kerr) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
kerr = 0;
|
kerr = 0;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
@@ -1404,8 +1251,6 @@ static krb5_error_code ipadb_fetch_tktpolicy(krb5_context kcontext,
|
|||||||
if (!first) {
|
if (!first) {
|
||||||
kerr = KRB5_KDB_NOENTRY;
|
kerr = KRB5_KDB_NOENTRY;
|
||||||
} else {
|
} else {
|
||||||
struct ipadb_e_data *ied;
|
|
||||||
|
|
||||||
if (polmask & MAXTKTLIFE_BIT) {
|
if (polmask & MAXTKTLIFE_BIT) {
|
||||||
ret = ipadb_ldap_attr_to_int(ipactx->lcontext, first,
|
ret = ipadb_ldap_attr_to_int(ipactx->lcontext, first,
|
||||||
"krbmaxticketlife", &result);
|
"krbmaxticketlife", &result);
|
||||||
@@ -1433,15 +1278,6 @@ static krb5_error_code ipadb_fetch_tktpolicy(krb5_context kcontext,
|
|||||||
entry->attributes |= maybe_require_preauth(ipactx, entry);
|
entry->attributes |= maybe_require_preauth(ipactx, entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ied = (struct ipadb_e_data *)entry->e_data;
|
|
||||||
if (ied && ied->ipa_user == true) {
|
|
||||||
/* Apply default policy to indicators, if any */
|
|
||||||
if (ied->user_auth & ~IPADB_USER_AUTH_NONE) {
|
|
||||||
ipadb_parse_authind_policies(kcontext, ipactx->lcontext,
|
|
||||||
first, entry, ied->user_auth);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1473,9 +1309,6 @@ static krb5_boolean is_request_for_us(krb5_context kcontext,
|
|||||||
{
|
{
|
||||||
krb5_boolean for_us;
|
krb5_boolean for_us;
|
||||||
|
|
||||||
if (search_for == NULL) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
for_us = krb5_realm_compare(kcontext, local_tgs, search_for) ||
|
for_us = krb5_realm_compare(kcontext, local_tgs, search_for) ||
|
||||||
krb5_principal_compare_any_realm(kcontext,
|
krb5_principal_compare_any_realm(kcontext,
|
||||||
local_tgs, search_for);
|
local_tgs, search_for);
|
||||||
@@ -1493,17 +1326,11 @@ static krb5_error_code dbget_princ(krb5_context kcontext,
|
|||||||
LDAPMessage *res = NULL;
|
LDAPMessage *res = NULL;
|
||||||
LDAPMessage *lentry;
|
LDAPMessage *lentry;
|
||||||
uint32_t pol;
|
uint32_t pol;
|
||||||
krb5_boolean check = FALSE;
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(KRB5_KDB_FLAG_CLIENT)
|
if ((flags & KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY) != 0 &&
|
||||||
check = flags & KRB5_KDB_FLAG_CLIENT;
|
(flags & KRB5_KDB_FLAG_CANONICALIZE) != 0) {
|
||||||
#else
|
|
||||||
check = (flags & KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY) &&
|
|
||||||
(flags & KRB5_KDB_FLAG_CANONICALIZE);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (check) {
|
|
||||||
/* AS_REQ with canonicalization*/
|
/* AS_REQ with canonicalization*/
|
||||||
krb5_principal norm_princ = NULL;
|
krb5_principal norm_princ = NULL;
|
||||||
|
|
||||||
@@ -1570,14 +1397,6 @@ done:
|
|||||||
return kerr;
|
return kerr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For krb5 1.19, there is no KRB5_KDB_FLAG_REFERRAL_OK, emulate it
|
|
||||||
* See krb5 commit a441fbe329ebbd7775eb5d4ccc4a05eef370f08b */
|
|
||||||
#ifndef KRB5_KDB_FLAG_REFERRAL_OK
|
|
||||||
#ifdef KRB5_KDB_FLAG_CANONICALIZE
|
|
||||||
#define KRB5_KDB_FLAG_REFERRAL_OK KRB5_KDB_FLAG_CANONICALIZE
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static krb5_error_code dbget_alias(krb5_context kcontext,
|
static krb5_error_code dbget_alias(krb5_context kcontext,
|
||||||
struct ipadb_context *ipactx,
|
struct ipadb_context *ipactx,
|
||||||
krb5_const_principal search_for,
|
krb5_const_principal search_for,
|
||||||
@@ -1590,40 +1409,18 @@ static krb5_error_code dbget_alias(krb5_context kcontext,
|
|||||||
char *trusted_realm = NULL;
|
char *trusted_realm = NULL;
|
||||||
krb5_db_entry *kentry = NULL;
|
krb5_db_entry *kentry = NULL;
|
||||||
krb5_data *realm;
|
krb5_data *realm;
|
||||||
krb5_boolean check = FALSE;
|
|
||||||
/* KRB5_NT_PRINCIPAL must be the last element */
|
|
||||||
krb5_int32 supported_types[] = {
|
|
||||||
[0] = KRB5_NT_ENTERPRISE_PRINCIPAL,
|
|
||||||
[1] = KRB5_NT_PRINCIPAL,
|
|
||||||
-1,
|
|
||||||
};
|
|
||||||
size_t i = 0;
|
|
||||||
|
|
||||||
/* For TGS-REQ server principal lookup, KDC asks with KRB5_KDB_FLAG_REFERRAL_OK
|
/* TODO: also support hostbased aliases */
|
||||||
* and client usually asks for an KRB5_NT_PRINCIPAL type principal. */
|
|
||||||
if ((flags & KRB5_KDB_FLAG_REFERRAL_OK) == 0) {
|
|
||||||
/* this is *not* TGS-REQ server principal search, remove
|
|
||||||
* KRB5_NT_PRINCIPAL from the supported principal types for this lookup */
|
|
||||||
supported_types[(sizeof(supported_types) / sizeof(supported_types[0])) - 2] = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Enterprise principal name type is for potential aliases or principals
|
/* Enterprise principal name type is for potential aliases or principals
|
||||||
* from trusted realms. Except for the TGS-REQ server lookup, we only
|
* from trusted realms. The logic below only applies to this type */
|
||||||
* expect enterprise principals here */
|
if (krb5_princ_type(kcontext, search_for) != KRB5_NT_ENTERPRISE_PRINCIPAL) {
|
||||||
for (i = 0; supported_types[i] != -1; i++) {
|
|
||||||
if (krb5_princ_type(kcontext, search_for) == supported_types[i]) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (supported_types[i] == -1) {
|
|
||||||
return KRB5_KDB_NOENTRY;
|
return KRB5_KDB_NOENTRY;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* enterprise principal can only have single component in the name
|
/* enterprise principal can only have single component in the name
|
||||||
* according to RFC6806 section 5. */
|
* according to RFC6806 section 5. */
|
||||||
if ((krb5_princ_type(kcontext, search_for) == KRB5_NT_ENTERPRISE_PRINCIPAL) &&
|
if (krb5_princ_size(kcontext, search_for) != 1) {
|
||||||
(krb5_princ_size(kcontext, search_for) != 1)) {
|
|
||||||
return KRB5_KDB_NOENTRY;
|
return KRB5_KDB_NOENTRY;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1647,12 +1444,6 @@ static krb5_error_code dbget_alias(krb5_context kcontext,
|
|||||||
if (krb5_realm_compare(kcontext, ipactx->local_tgs, norm_princ)) {
|
if (krb5_realm_compare(kcontext, ipactx->local_tgs, norm_princ)) {
|
||||||
/* In realm alias, try to retrieve it and let the caller handle it. */
|
/* In realm alias, try to retrieve it and let the caller handle it. */
|
||||||
kerr = dbget_princ(kcontext, ipactx, norm_princ, flags, entry);
|
kerr = dbget_princ(kcontext, ipactx, norm_princ, flags, entry);
|
||||||
}
|
|
||||||
|
|
||||||
/* if we haven't found the principal in our realm, it might still
|
|
||||||
* be a referral to a known realm. Otherwise, bail out with the result */
|
|
||||||
if ((kerr != KRB5_KDB_NOENTRY) &&
|
|
||||||
(flags & KRB5_KDB_FLAG_REFERRAL_OK) == 0) {
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1663,14 +1454,8 @@ static krb5_error_code dbget_alias(krb5_context kcontext,
|
|||||||
* both client and server referrals. But it is more useful to ignore it
|
* both client and server referrals. But it is more useful to ignore it
|
||||||
* like Windows KDC does for client referrals.
|
* like Windows KDC does for client referrals.
|
||||||
*/
|
*/
|
||||||
#if defined(KRB5_KDB_FLAG_CLIENT)
|
if (((flags & KRB5_KDB_FLAG_CANONICALIZE) == 0) &&
|
||||||
check = ((flags & KRB5_KDB_FLAG_CLIENT) == 0) &&
|
((flags & KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY) == 0)) {
|
||||||
((flags & KRB5_KDB_FLAG_REFERRAL_OK) == 0);
|
|
||||||
#else
|
|
||||||
check = ((flags & KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY) == 0) &&
|
|
||||||
((flags & KRB5_KDB_FLAG_CANONICALIZE) == 0);
|
|
||||||
#endif
|
|
||||||
if (check) {
|
|
||||||
kerr = KRB5_KDB_NOENTRY;
|
kerr = KRB5_KDB_NOENTRY;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@@ -1696,44 +1481,13 @@ static krb5_error_code dbget_alias(krb5_context kcontext,
|
|||||||
&trusted_realm);
|
&trusted_realm);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kerr == KRB5_KDB_NOENTRY) {
|
|
||||||
krb5_data *hstname = NULL;
|
|
||||||
int ncomponents = krb5_princ_size(kcontext, norm_princ);
|
|
||||||
|
|
||||||
/* We did not find any alias so far for non-server principal lookups */
|
|
||||||
if ((ncomponents < 2) && ((flags & KRB5_KDB_FLAG_REFERRAL_OK) == 0)) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* At this point it is a server principal lookup that might be
|
|
||||||
* referencing a host name in a trusted domain. It might also
|
|
||||||
* have multiple service components so take the last one for the
|
|
||||||
* hostname or the domain name. See MS-ADTS 2.2.21 and MS-DRSR 2.2.4.2.
|
|
||||||
*/
|
|
||||||
hstname = krb5_princ_component(kcontext, norm_princ, ncomponents - 1);
|
|
||||||
|
|
||||||
kerr = ipadb_is_princ_from_trusted_realm(kcontext,
|
|
||||||
hstname->data,
|
|
||||||
hstname->length,
|
|
||||||
&trusted_realm);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (kerr != 0) {
|
if (kerr != 0) {
|
||||||
kerr = KRB5_KDB_NOENTRY;
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is a known trusted realm. Issue a referral depending on whether this
|
/* This is a known trusted realm. Issue a referral depending on whether this
|
||||||
* is client or server referral request */
|
* is client or server referral request */
|
||||||
#if defined(KRB5_KDB_FLAG_CLIENT)
|
if (flags & KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY) {
|
||||||
check = (flags & KRB5_KDB_FLAG_CLIENT) && (flags & KRB5_KDB_FLAG_REFERRAL_OK);
|
|
||||||
#else
|
|
||||||
check = (flags & KRB5_KDB_FLAG_CLIENT_REFERRALS_ONLY) &&
|
|
||||||
((flags & KRB5_KDB_FLAG_CANONICALIZE) ||
|
|
||||||
search_for->type == KRB5_NT_ENTERPRISE_PRINCIPAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (check) {
|
|
||||||
/* client referral out of realm, set next realm. */
|
/* client referral out of realm, set next realm. */
|
||||||
kerr = krb5_set_principal_realm(kcontext, norm_princ, trusted_realm);
|
kerr = krb5_set_principal_realm(kcontext, norm_princ, trusted_realm);
|
||||||
if (kerr != 0) {
|
if (kerr != 0) {
|
||||||
@@ -1752,12 +1506,7 @@ static krb5_error_code dbget_alias(krb5_context kcontext,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(KRB5_KDB_FLAG_CLIENT)
|
if (flags & KRB5_KDB_FLAG_INCLUDE_PAC) {
|
||||||
check = flags & KRB5_KDB_FLAG_CLIENT;
|
|
||||||
#else
|
|
||||||
check = flags & KRB5_KDB_FLAG_INCLUDE_PAC;
|
|
||||||
#endif
|
|
||||||
if (check) {
|
|
||||||
/* TGS request where KDC wants to generate PAC
|
/* TGS request where KDC wants to generate PAC
|
||||||
* but the principal is out of our realm */
|
* but the principal is out of our realm */
|
||||||
kerr = KRB5_KDB_NOENTRY;
|
kerr = KRB5_KDB_NOENTRY;
|
||||||
@@ -1801,8 +1550,6 @@ krb5_error_code ipadb_get_principal(krb5_context kcontext,
|
|||||||
krb5_db_entry **entry)
|
krb5_db_entry **entry)
|
||||||
{
|
{
|
||||||
struct ipadb_context *ipactx;
|
struct ipadb_context *ipactx;
|
||||||
bool is_local_tgs_princ;
|
|
||||||
const char *opt_pac_tkt_chksum_val;
|
|
||||||
krb5_error_code kerr;
|
krb5_error_code kerr;
|
||||||
|
|
||||||
*entry = NULL;
|
*entry = NULL;
|
||||||
@@ -1818,50 +1565,11 @@ krb5_error_code ipadb_get_principal(krb5_context kcontext,
|
|||||||
|
|
||||||
/* Lookup local names and aliases first. */
|
/* Lookup local names and aliases first. */
|
||||||
kerr = dbget_princ(kcontext, ipactx, search_for, flags, entry);
|
kerr = dbget_princ(kcontext, ipactx, search_for, flags, entry);
|
||||||
if (kerr == KRB5_KDB_NOENTRY) {
|
if (kerr != KRB5_KDB_NOENTRY) {
|
||||||
kerr = dbget_alias(kcontext, ipactx, search_for, flags, entry);
|
|
||||||
}
|
|
||||||
if (kerr)
|
|
||||||
return kerr;
|
return kerr;
|
||||||
|
|
||||||
/* If TGS principal, some virtual attributes may be added */
|
|
||||||
if (is_tgs_princ(kcontext, (*entry)->princ)) {
|
|
||||||
kerr = cmp_local_tgs_princ(kcontext, ipactx->realm, (*entry)->princ,
|
|
||||||
&is_local_tgs_princ);
|
|
||||||
if (kerr)
|
|
||||||
return kerr;
|
|
||||||
|
|
||||||
/* for trusted AD forests we currently must use SHA-1-based
|
|
||||||
* encryption types. For details, see
|
|
||||||
* https://github.com/krb5/krb5/commit/5af907156f8f502bbe268f0c62274f88a61261e4
|
|
||||||
*/
|
|
||||||
if (!is_local_tgs_princ) {
|
|
||||||
kerr = krb5_dbe_set_string(kcontext, *entry,
|
|
||||||
KRB5_KDB_SK_PAC_PRIVSVR_ENCTYPE,
|
|
||||||
"aes256-sha1");
|
|
||||||
if (kerr)
|
|
||||||
return kerr;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We should have been initialized at this point already */
|
|
||||||
if (ipactx->optional_pac_tkt_chksum == IPADB_TRISTATE_UNDEFINED) {
|
|
||||||
return KRB5_KDB_SERVER_INTERNAL_ERR;
|
|
||||||
}
|
|
||||||
/* PAC ticket signature should be optional for foreign realms, and local
|
|
||||||
* realm if not supported by all servers
|
|
||||||
*/
|
|
||||||
if (!is_local_tgs_princ || ipactx->optional_pac_tkt_chksum)
|
|
||||||
opt_pac_tkt_chksum_val = "true";
|
|
||||||
else
|
|
||||||
opt_pac_tkt_chksum_val = "false";
|
|
||||||
|
|
||||||
kerr = krb5_dbe_set_string(kcontext, *entry,
|
|
||||||
KRB5_KDB_SK_OPTIONAL_PAC_TKT_CHKSUM,
|
|
||||||
opt_pac_tkt_chksum_val);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return kerr;
|
return dbget_alias(kcontext, ipactx, search_for, flags, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ipadb_free_principal_e_data(krb5_context kcontext, krb5_octet *e_data)
|
void ipadb_free_principal_e_data(krb5_context kcontext, krb5_octet *e_data)
|
||||||
@@ -1892,20 +1600,12 @@ void ipadb_free_principal_e_data(krb5_context kcontext, krb5_octet *e_data)
|
|||||||
void ipadb_free_principal(krb5_context kcontext, krb5_db_entry *entry)
|
void ipadb_free_principal(krb5_context kcontext, krb5_db_entry *entry)
|
||||||
{
|
{
|
||||||
krb5_tl_data *prev, *next;
|
krb5_tl_data *prev, *next;
|
||||||
size_t i;
|
|
||||||
|
|
||||||
if (entry) {
|
if (entry) {
|
||||||
krb5_free_principal(kcontext, entry->princ);
|
krb5_free_principal(kcontext, entry->princ);
|
||||||
prev = entry->tl_data;
|
prev = entry->tl_data;
|
||||||
while(prev) {
|
while(prev) {
|
||||||
next = prev->tl_data_next;
|
next = prev->tl_data_next;
|
||||||
/* Handle RBCD ACL type */
|
|
||||||
if (prev->tl_data_type == KRB5_TL_CONSTRAINED_DELEGATION_ACL) {
|
|
||||||
char **acl_list = (char **) prev->tl_data_contents;
|
|
||||||
for (i = 0; (acl_list != NULL) && (acl_list[i] != NULL); i++) {
|
|
||||||
free(acl_list[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
free(prev->tl_data_contents);
|
free(prev->tl_data_contents);
|
||||||
free(prev);
|
free(prev);
|
||||||
prev = next;
|
prev = next;
|
||||||
@@ -1920,10 +1620,10 @@ void ipadb_free_principal(krb5_context kcontext, krb5_db_entry *entry)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
krb5_error_code ipadb_get_tl_data(krb5_db_entry *entry,
|
static krb5_error_code ipadb_get_tl_data(krb5_db_entry *entry,
|
||||||
krb5_int16 type,
|
krb5_int16 type,
|
||||||
krb5_ui_2 length,
|
krb5_ui_2 length,
|
||||||
krb5_octet *data)
|
krb5_octet *data)
|
||||||
{
|
{
|
||||||
krb5_tl_data *td;
|
krb5_tl_data *td;
|
||||||
|
|
||||||
@@ -2172,21 +1872,6 @@ done:
|
|||||||
return kerr;
|
return kerr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool should_filter_out_attr(krb5_tl_data *data)
|
|
||||||
{
|
|
||||||
switch (data->tl_data_type) {
|
|
||||||
case KRB5_TL_CONSTRAINED_DELEGATION_ACL:
|
|
||||||
case KRB5_TL_DB_ARGS:
|
|
||||||
case KRB5_TL_KADM_DATA:
|
|
||||||
case KRB5_TL_LAST_ADMIN_UNLOCK:
|
|
||||||
case KRB5_TL_LAST_PWD_CHANGE:
|
|
||||||
case KRB5_TL_MKVNO:
|
|
||||||
return true;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static krb5_error_code ipadb_get_ldap_mod_extra_data(struct ipadb_mods *imods,
|
static krb5_error_code ipadb_get_ldap_mod_extra_data(struct ipadb_mods *imods,
|
||||||
krb5_tl_data *tl_data,
|
krb5_tl_data *tl_data,
|
||||||
int mod_op)
|
int mod_op)
|
||||||
@@ -2198,8 +1883,13 @@ static krb5_error_code ipadb_get_ldap_mod_extra_data(struct ipadb_mods *imods,
|
|||||||
int n, i;
|
int n, i;
|
||||||
|
|
||||||
for (n = 0, data = tl_data; data; data = data->tl_data_next) {
|
for (n = 0, data = tl_data; data; data = data->tl_data_next) {
|
||||||
if (should_filter_out_attr(data))
|
if (data->tl_data_type == KRB5_TL_LAST_PWD_CHANGE ||
|
||||||
|
data->tl_data_type == KRB5_TL_KADM_DATA ||
|
||||||
|
data->tl_data_type == KRB5_TL_DB_ARGS ||
|
||||||
|
data->tl_data_type == KRB5_TL_MKVNO ||
|
||||||
|
data->tl_data_type == KRB5_TL_LAST_ADMIN_UNLOCK) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2215,8 +1905,13 @@ static krb5_error_code ipadb_get_ldap_mod_extra_data(struct ipadb_mods *imods,
|
|||||||
|
|
||||||
for (i = 0, data = tl_data; data; data = data->tl_data_next) {
|
for (i = 0, data = tl_data; data; data = data->tl_data_next) {
|
||||||
|
|
||||||
if (should_filter_out_attr(data))
|
if (data->tl_data_type == KRB5_TL_LAST_PWD_CHANGE ||
|
||||||
|
data->tl_data_type == KRB5_TL_KADM_DATA ||
|
||||||
|
data->tl_data_type == KRB5_TL_DB_ARGS ||
|
||||||
|
data->tl_data_type == KRB5_TL_MKVNO ||
|
||||||
|
data->tl_data_type == KRB5_TL_LAST_ADMIN_UNLOCK) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
be_type = htons(data->tl_data_type);
|
be_type = htons(data->tl_data_type);
|
||||||
|
|
||||||
@@ -2968,43 +2663,10 @@ done:
|
|||||||
return kerr;
|
return kerr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static krb5_error_code
|
|
||||||
remove_virtual_str_attrs(krb5_context kcontext, krb5_db_entry *entry)
|
|
||||||
{
|
|
||||||
char *str_attr_val;
|
|
||||||
krb5_error_code kerr;
|
|
||||||
const char *str_attrs[] = {
|
|
||||||
KRB5_KDB_SK_OPTIONAL_PAC_TKT_CHKSUM,
|
|
||||||
KRB5_KDB_SK_PAC_PRIVSVR_ENCTYPE,
|
|
||||||
NULL};
|
|
||||||
|
|
||||||
for(int i = 0; str_attrs[i] != NULL; i++) {
|
|
||||||
kerr = krb5_dbe_get_string(kcontext, entry,
|
|
||||||
str_attrs[i],
|
|
||||||
&str_attr_val);
|
|
||||||
if (kerr)
|
|
||||||
return kerr;
|
|
||||||
|
|
||||||
if (str_attr_val)
|
|
||||||
kerr = krb5_dbe_set_string(kcontext, entry,
|
|
||||||
str_attrs[i],
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
krb5_dbe_free_string(kcontext, str_attr_val);
|
|
||||||
}
|
|
||||||
return kerr;
|
|
||||||
}
|
|
||||||
|
|
||||||
krb5_error_code ipadb_put_principal(krb5_context kcontext,
|
krb5_error_code ipadb_put_principal(krb5_context kcontext,
|
||||||
krb5_db_entry *entry,
|
krb5_db_entry *entry,
|
||||||
char **db_args)
|
char **db_args)
|
||||||
{
|
{
|
||||||
krb5_error_code kerr;
|
|
||||||
|
|
||||||
kerr = remove_virtual_str_attrs(kcontext, entry);
|
|
||||||
if (kerr)
|
|
||||||
return kerr;
|
|
||||||
|
|
||||||
if (entry->mask & KMASK_PRINCIPAL) {
|
if (entry->mask & KMASK_PRINCIPAL) {
|
||||||
return ipadb_add_principal(kcontext, entry);
|
return ipadb_add_principal(kcontext, entry);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ static int teardown(void **state)
|
|||||||
|
|
||||||
extern krb5_error_code filter_logon_info(krb5_context context,
|
extern krb5_error_code filter_logon_info(krb5_context context,
|
||||||
TALLOC_CTX *memctx,
|
TALLOC_CTX *memctx,
|
||||||
krb5_data *realm,
|
krb5_data realm,
|
||||||
struct PAC_LOGON_INFO_CTR *info);
|
struct PAC_LOGON_INFO_CTR *info);
|
||||||
|
|
||||||
static void test_filter_logon_info(void **state)
|
static void test_filter_logon_info(void **state)
|
||||||
@@ -204,7 +204,7 @@ static void test_filter_logon_info(void **state)
|
|||||||
"WRONG");
|
"WRONG");
|
||||||
assert_non_null(info->info->info3.base.logon_domain.string);
|
assert_non_null(info->info->info3.base.logon_domain.string);
|
||||||
|
|
||||||
kerr = filter_logon_info(test_ctx->krb5_ctx, test_ctx, &realm, info);
|
kerr = filter_logon_info(test_ctx->krb5_ctx, test_ctx, realm, info);
|
||||||
assert_int_equal(kerr, EINVAL);
|
assert_int_equal(kerr, EINVAL);
|
||||||
|
|
||||||
info->info->info3.base.logon_domain.string = talloc_strdup(info->info,
|
info->info->info3.base.logon_domain.string = talloc_strdup(info->info,
|
||||||
@@ -212,7 +212,7 @@ static void test_filter_logon_info(void **state)
|
|||||||
assert_non_null(info->info->info3.base.logon_domain.string);
|
assert_non_null(info->info->info3.base.logon_domain.string);
|
||||||
|
|
||||||
/* missing domain SID */
|
/* missing domain SID */
|
||||||
kerr = filter_logon_info(test_ctx->krb5_ctx, test_ctx, &realm, info);
|
kerr = filter_logon_info(test_ctx->krb5_ctx, test_ctx, realm, info);
|
||||||
assert_int_equal(kerr, EINVAL);
|
assert_int_equal(kerr, EINVAL);
|
||||||
|
|
||||||
/* wrong domain SID */
|
/* wrong domain SID */
|
||||||
@@ -220,7 +220,7 @@ static void test_filter_logon_info(void **state)
|
|||||||
assert_int_equal(ret, 0);
|
assert_int_equal(ret, 0);
|
||||||
info->info->info3.base.domain_sid = &dom_sid;
|
info->info->info3.base.domain_sid = &dom_sid;
|
||||||
|
|
||||||
kerr = filter_logon_info(test_ctx->krb5_ctx, test_ctx, &realm, info);
|
kerr = filter_logon_info(test_ctx->krb5_ctx, test_ctx, realm, info);
|
||||||
assert_int_equal(kerr, EINVAL);
|
assert_int_equal(kerr, EINVAL);
|
||||||
|
|
||||||
/* matching domain SID */
|
/* matching domain SID */
|
||||||
@@ -228,7 +228,7 @@ static void test_filter_logon_info(void **state)
|
|||||||
assert_int_equal(ret, 0);
|
assert_int_equal(ret, 0);
|
||||||
info->info->info3.base.domain_sid = &dom_sid;
|
info->info->info3.base.domain_sid = &dom_sid;
|
||||||
|
|
||||||
kerr = filter_logon_info(test_ctx->krb5_ctx, test_ctx, &realm, info);
|
kerr = filter_logon_info(test_ctx->krb5_ctx, test_ctx, realm, info);
|
||||||
assert_int_equal(kerr, 0);
|
assert_int_equal(kerr, 0);
|
||||||
|
|
||||||
/* empty SIDs */
|
/* empty SIDs */
|
||||||
@@ -243,7 +243,7 @@ static void test_filter_logon_info(void **state)
|
|||||||
assert_non_null(info->info->info3.sids[c].sid);
|
assert_non_null(info->info->info3.sids[c].sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
kerr = filter_logon_info(test_ctx->krb5_ctx, NULL, &realm, info);
|
kerr = filter_logon_info(test_ctx->krb5_ctx, NULL, realm, info);
|
||||||
assert_int_equal(kerr, 0);
|
assert_int_equal(kerr, 0);
|
||||||
assert_int_equal(info->info->info3.sidcount, 3);
|
assert_int_equal(info->info->info3.sidcount, 3);
|
||||||
|
|
||||||
@@ -297,7 +297,7 @@ static void test_filter_logon_info(void **state)
|
|||||||
assert_int_equal(ret, 0);
|
assert_int_equal(ret, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
kerr = filter_logon_info(test_ctx->krb5_ctx, NULL, &realm, info);
|
kerr = filter_logon_info(test_ctx->krb5_ctx, NULL, realm, info);
|
||||||
assert_int_equal(kerr, 0);
|
assert_int_equal(kerr, 0);
|
||||||
assert_int_equal(info->info->info3.sidcount, test_data[c].exp_sidcount);
|
assert_int_equal(info->info->info3.sidcount, test_data[c].exp_sidcount);
|
||||||
if (test_data[c].exp_sidcount == 0) {
|
if (test_data[c].exp_sidcount == 0) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
AM_CPPFLAGS := -I$(top_srcdir)/util
|
AM_CPPFLAGS := -I$(top_srcdir)/util
|
||||||
AM_CFLAGS := @LDAP_CFLAGS@ @LIBVERTO_CFLAGS@ @KRB5_CFLAGS@ @NSPR_CFLAGS@
|
AM_CFLAGS := @LDAP_CFLAGS@ @LIBVERTO_CFLAGS@ @KRB5_CFLAGS@ @NSPR_CFLAGS@
|
||||||
AM_LDFLAGS := @LDAP_LIBS@ @LIBVERTO_LIBS@ @KRAD_LIBS@ @KRB5_LIBS@ @JANSSON_LIBS@
|
AM_LDFLAGS := @LDAP_LIBS@ @LIBVERTO_LIBS@ @KRAD_LIBS@ @KRB5_LIBS@
|
||||||
|
|
||||||
noinst_HEADERS = internal.h
|
noinst_HEADERS = internal.h
|
||||||
appdir = $(libexecdir)/ipa/
|
appdir = $(libexecdir)/ipa/
|
||||||
@@ -9,8 +9,7 @@ ipa_otpd_LDADD = $(top_builddir)/util/libutil.la
|
|||||||
dist_noinst_DATA = ipa-otpd.socket.in ipa-otpd@.service.in test.py
|
dist_noinst_DATA = ipa-otpd.socket.in ipa-otpd@.service.in test.py
|
||||||
systemdsystemunit_DATA = ipa-otpd.socket ipa-otpd@.service
|
systemdsystemunit_DATA = ipa-otpd.socket ipa-otpd@.service
|
||||||
|
|
||||||
ipa_otpd_SOURCES = bind.c forward.c main.c parse.c query.c queue.c stdio.c \
|
ipa_otpd_SOURCES = bind.c forward.c main.c parse.c query.c queue.c stdio.c
|
||||||
oauth2.c passkey.c
|
|
||||||
|
|
||||||
%.socket: %.socket.in
|
%.socket: %.socket.in
|
||||||
@sed -e 's|@krb5rundir[@]|$(krb5rundir)|g' \
|
@sed -e 's|@krb5rundir[@]|$(krb5rundir)|g' \
|
||||||
|
|||||||
@@ -24,19 +24,10 @@
|
|||||||
|
|
||||||
#include "krad.h"
|
#include "krad.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#include <ldap.h>
|
#include <ldap.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifndef UCHAR_MAX
|
|
||||||
#define UCHAR_MAX 255
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* RFC 2865 */
|
|
||||||
#define MAX_ATTRSIZE (UCHAR_MAX - 2)
|
|
||||||
|
|
||||||
#define SECRET ""
|
#define SECRET ""
|
||||||
#define otpd_log_req(req, ...) \
|
#define otpd_log_req(req, ...) \
|
||||||
otpd_log_req_(__FILE__, __LINE__, (req), __VA_ARGS__)
|
otpd_log_req_(__FILE__, __LINE__, (req), __VA_ARGS__)
|
||||||
@@ -45,31 +36,11 @@
|
|||||||
|
|
||||||
struct otpd_queue_iter;
|
struct otpd_queue_iter;
|
||||||
|
|
||||||
enum ldap_query {
|
|
||||||
LDAP_QUERY_EMPTY = 0,
|
|
||||||
LDAP_QUERY_USER,
|
|
||||||
LDAP_QUERY_RADIUS,
|
|
||||||
LDAP_QUERY_RADIUS_USERMAP,
|
|
||||||
LDAP_QUERY_IDP,
|
|
||||||
LDAP_QUERY_PASSKEY,
|
|
||||||
LDAP_QUERY_END
|
|
||||||
};
|
|
||||||
|
|
||||||
enum oauth2_state {
|
|
||||||
OAUTH2_NO = 0,
|
|
||||||
OAUTH2_GET_ISSUER,
|
|
||||||
OAUTH2_GET_DEVICE_CODE,
|
|
||||||
OAUTH2_GET_ACCESS_TOKEN
|
|
||||||
};
|
|
||||||
|
|
||||||
struct otpd_queue_item_passkey;
|
|
||||||
|
|
||||||
struct otpd_queue_item {
|
struct otpd_queue_item {
|
||||||
struct otpd_queue_item *next;
|
struct otpd_queue_item *next;
|
||||||
krad_packet *req;
|
krad_packet *req;
|
||||||
krad_packet *rsp;
|
krad_packet *rsp;
|
||||||
size_t sent;
|
size_t sent;
|
||||||
enum ldap_query ldap_query;
|
|
||||||
char *error;
|
char *error;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
@@ -77,10 +48,6 @@ struct otpd_queue_item {
|
|||||||
char *uid;
|
char *uid;
|
||||||
char *ipatokenRadiusUserName;
|
char *ipatokenRadiusUserName;
|
||||||
char *ipatokenRadiusConfigLink;
|
char *ipatokenRadiusConfigLink;
|
||||||
char *ipaidpSub;
|
|
||||||
char *ipaidpConfigLink;
|
|
||||||
char **ipaPassKey;
|
|
||||||
char **ipauserauthtypes;
|
|
||||||
char *other;
|
char *other;
|
||||||
} user;
|
} user;
|
||||||
|
|
||||||
@@ -91,31 +58,6 @@ struct otpd_queue_item {
|
|||||||
time_t ipatokenRadiusTimeout;
|
time_t ipatokenRadiusTimeout;
|
||||||
size_t ipatokenRadiusRetries;
|
size_t ipatokenRadiusRetries;
|
||||||
} radius;
|
} radius;
|
||||||
|
|
||||||
struct {
|
|
||||||
char *name;
|
|
||||||
char *ipaidpIssuerURL;
|
|
||||||
char *ipaidpDevAuthEndpoint;
|
|
||||||
char *ipaidpTokenEndpoint;
|
|
||||||
char *ipaidpUserInfoEndpoint;
|
|
||||||
char *ipaidpKeysEndpoint;
|
|
||||||
char *ipaidpClientID;
|
|
||||||
char *ipaidpClientSecret;
|
|
||||||
char *ipaidpScope;
|
|
||||||
char *ipaidpSub;
|
|
||||||
krb5_boolean valid;
|
|
||||||
char* ipaidpDebugLevelStr;
|
|
||||||
krb5_boolean ipaidpDebugCurl;
|
|
||||||
} idp;
|
|
||||||
|
|
||||||
struct {
|
|
||||||
char *device_code_reply;
|
|
||||||
krb5_data state;
|
|
||||||
} oauth2;
|
|
||||||
|
|
||||||
bool get_passkey_config;
|
|
||||||
struct otpd_queue_item_passkey *passkey;
|
|
||||||
|
|
||||||
int msgid;
|
int msgid;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -156,10 +98,6 @@ struct otpd_context {
|
|||||||
struct otpd_queue requests;
|
struct otpd_queue requests;
|
||||||
struct otpd_queue responses;
|
struct otpd_queue responses;
|
||||||
} bind;
|
} bind;
|
||||||
|
|
||||||
struct {
|
|
||||||
struct otpd_queue states;
|
|
||||||
} oauth2_state;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct otpd_context ctx;
|
extern struct otpd_context ctx;
|
||||||
@@ -170,25 +108,9 @@ void otpd_log_req_(const char * const file, int line, krad_packet *req,
|
|||||||
void otpd_log_err_(const char * const file, int line, krb5_error_code code,
|
void otpd_log_err_(const char * const file, int line, krb5_error_code code,
|
||||||
const char * const tmpl, ...);
|
const char * const tmpl, ...);
|
||||||
|
|
||||||
int add_krad_attr_to_set(krad_packet *req, krad_attrset *attrset,
|
|
||||||
krb5_data *datap, krad_attr attr, const char *message);
|
|
||||||
|
|
||||||
int get_krad_attr_from_packet(const krad_packet *rres,
|
|
||||||
krad_attr attr, krb5_data *_data);
|
|
||||||
|
|
||||||
int get_string(LDAP *ldp, LDAPMessage *entry, const char *name,
|
|
||||||
char **out);
|
|
||||||
|
|
||||||
int get_string_array(LDAP *ldp, LDAPMessage *entry, const char *name,
|
|
||||||
char ***out);
|
|
||||||
|
|
||||||
bool auth_type_is(char **auth_types, const char *check);
|
|
||||||
|
|
||||||
krb5_error_code otpd_queue_item_new(krad_packet *req,
|
krb5_error_code otpd_queue_item_new(krad_packet *req,
|
||||||
struct otpd_queue_item **item);
|
struct otpd_queue_item **item);
|
||||||
|
|
||||||
void free_otpd_queue_item_passkey(struct otpd_queue_item *item);
|
|
||||||
|
|
||||||
void otpd_queue_item_free(struct otpd_queue_item *item);
|
void otpd_queue_item_free(struct otpd_queue_item *item);
|
||||||
|
|
||||||
krb5_error_code otpd_queue_iter_new(const struct otpd_queue * const *queues,
|
krb5_error_code otpd_queue_iter_new(const struct otpd_queue * const *queues,
|
||||||
@@ -221,20 +143,8 @@ krb5_error_code otpd_forward(struct otpd_queue_item **i);
|
|||||||
const char *otpd_parse_user(LDAP *ldp, LDAPMessage *entry,
|
const char *otpd_parse_user(LDAP *ldp, LDAPMessage *entry,
|
||||||
struct otpd_queue_item *item);
|
struct otpd_queue_item *item);
|
||||||
|
|
||||||
const char *otpd_parse_idp(LDAP *ldp, LDAPMessage *entry,
|
|
||||||
struct otpd_queue_item *item);
|
|
||||||
|
|
||||||
const char *otpd_parse_radius(LDAP *ldp, LDAPMessage *entry,
|
const char *otpd_parse_radius(LDAP *ldp, LDAPMessage *entry,
|
||||||
struct otpd_queue_item *item);
|
struct otpd_queue_item *item);
|
||||||
|
|
||||||
const char *otpd_parse_radius_username(LDAP *ldp, LDAPMessage *entry,
|
const char *otpd_parse_radius_username(LDAP *ldp, LDAPMessage *entry,
|
||||||
struct otpd_queue_item *item);
|
struct otpd_queue_item *item);
|
||||||
|
|
||||||
int oauth2(struct otpd_queue_item **item, enum oauth2_state);
|
|
||||||
|
|
||||||
const char *otpd_parse_passkey(LDAP *ldp, LDAPMessage *entry,
|
|
||||||
struct otpd_queue_item *item);
|
|
||||||
|
|
||||||
bool is_passkey(struct otpd_queue_item *item);
|
|
||||||
|
|
||||||
int do_passkey(struct otpd_queue_item *item);
|
|
||||||
@@ -7,4 +7,4 @@ EnvironmentFile=@sysconfdir@/ipa/default.conf
|
|||||||
ExecStart=@libexecdir@/ipa/ipa-otpd $ldap_uri
|
ExecStart=@libexecdir@/ipa/ipa-otpd $ldap_uri
|
||||||
StandardInput=socket
|
StandardInput=socket
|
||||||
StandardOutput=socket
|
StandardOutput=socket
|
||||||
StandardError=journal
|
StandardError=syslog
|
||||||
@@ -59,12 +59,6 @@ static void free_elts(struct otpd_queue *q)
|
|||||||
#define otpd_queue_item_free free_elt
|
#define otpd_queue_item_free free_elt
|
||||||
#define otpd_queue_free_items free_elts
|
#define otpd_queue_free_items free_elts
|
||||||
|
|
||||||
void free_otpd_queue_item_passkey(struct otpd_queue_item *item)
|
|
||||||
{
|
|
||||||
(void)item; /* Unused */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void assert_elt_equal(struct otpd_queue_item *e1,
|
static void assert_elt_equal(struct otpd_queue_item *e1,
|
||||||
struct otpd_queue_item *e2)
|
struct otpd_queue_item *e2)
|
||||||
{
|
{
|
||||||
@@ -75,7 +69,7 @@ static void assert_elt_equal(struct otpd_queue_item *e1,
|
|||||||
assert_int_equal(e1->msgid, e2->msgid);
|
assert_int_equal(e1->msgid, e2->msgid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_single_insert(void **state)
|
static void test_single_insert()
|
||||||
{
|
{
|
||||||
struct otpd_queue q = { NULL };
|
struct otpd_queue q = { NULL };
|
||||||
struct otpd_queue_item *ein, *eout;
|
struct otpd_queue_item *ein, *eout;
|
||||||
@@ -96,7 +90,7 @@ static void test_single_insert(void **state)
|
|||||||
free_elts(&q);
|
free_elts(&q);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_jump_insert(void **state)
|
static void test_jump_insert()
|
||||||
{
|
{
|
||||||
struct otpd_queue q = { NULL };
|
struct otpd_queue q = { NULL };
|
||||||
struct otpd_queue_item *echeck;
|
struct otpd_queue_item *echeck;
|
||||||
@@ -112,7 +106,7 @@ static void test_jump_insert(void **state)
|
|||||||
free_elts(&q);
|
free_elts(&q);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_garbage_insert(void **state)
|
static void test_garbage_insert()
|
||||||
{
|
{
|
||||||
struct otpd_queue q = { NULL };
|
struct otpd_queue q = { NULL };
|
||||||
struct otpd_queue_item *e, *g;
|
struct otpd_queue_item *e, *g;
|
||||||
@@ -127,7 +121,7 @@ static void test_garbage_insert(void **state)
|
|||||||
free_elts(&q);
|
free_elts(&q);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_removal(void **state)
|
static void test_removal()
|
||||||
{
|
{
|
||||||
struct otpd_queue q = { NULL };
|
struct otpd_queue q = { NULL };
|
||||||
|
|
||||||
@@ -155,7 +149,7 @@ static void pick_id(struct otpd_queue *q, int msgid)
|
|||||||
e = otpd_queue_pop_msgid(q, msgid);
|
e = otpd_queue_pop_msgid(q, msgid);
|
||||||
assert_ptr_equal(e, NULL);
|
assert_ptr_equal(e, NULL);
|
||||||
}
|
}
|
||||||
static void test_pick_removal(void **state)
|
static void test_pick_removal()
|
||||||
{
|
{
|
||||||
struct otpd_queue q = { NULL };
|
struct otpd_queue q = { NULL };
|
||||||
|
|
||||||
@@ -172,7 +166,7 @@ static void test_pick_removal(void **state)
|
|||||||
free_elts(&q);
|
free_elts(&q);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_iter(void **state)
|
static void test_iter()
|
||||||
{
|
{
|
||||||
krb5_error_code ret;
|
krb5_error_code ret;
|
||||||
struct otpd_queue q = { NULL };
|
struct otpd_queue q = { NULL };
|
||||||
|
|||||||
+2
-76
@@ -88,80 +88,6 @@ void otpd_log_err_(const char * const file, int line, krb5_error_code code,
|
|||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#define min(a,b) ((a) > (b) ? (b) : (a))
|
|
||||||
int add_krad_attr_to_set(krad_packet *req, krad_attrset *attrset,
|
|
||||||
krb5_data *datap, krad_attr attr, const char *message)
|
|
||||||
{
|
|
||||||
krb5_data state = {0};
|
|
||||||
char *p = datap->data;
|
|
||||||
unsigned int len = datap->length;
|
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
do {
|
|
||||||
state.data = p;
|
|
||||||
state.length = min(MAX_ATTRSIZE - 5, len);
|
|
||||||
p += state.length;
|
|
||||||
|
|
||||||
ret = krad_attrset_add(attrset, attr, &(state));
|
|
||||||
if (ret != 0) {
|
|
||||||
otpd_log_req(req, message);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
len -= state.length;
|
|
||||||
} while (len > 0);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Most attributes have limited length (MAX_ATTRSIZE). In order to accept longer
|
|
||||||
* values, we will concatenate all the attribute values to single krb5_data. */
|
|
||||||
int get_krad_attr_from_packet(const krad_packet *rres,
|
|
||||||
krad_attr attr, krb5_data *_data)
|
|
||||||
{
|
|
||||||
const krb5_data *rmsg;
|
|
||||||
krb5_data data = {0};
|
|
||||||
unsigned int memindex;
|
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
i = 0;
|
|
||||||
do {
|
|
||||||
rmsg = krad_packet_get_attr(rres, attr, i);
|
|
||||||
if (rmsg != NULL) {
|
|
||||||
data.length += rmsg->length;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
} while (rmsg != NULL);
|
|
||||||
|
|
||||||
if (data.length == 0) {
|
|
||||||
return ENOENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
data.data = malloc(data.length);
|
|
||||||
if (data.data == NULL) {
|
|
||||||
return ENOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = 0;
|
|
||||||
memindex = 0;
|
|
||||||
do {
|
|
||||||
rmsg = krad_packet_get_attr(rres, attr, i);
|
|
||||||
if (rmsg != NULL) {
|
|
||||||
memcpy(&data.data[memindex], rmsg->data, rmsg->length);
|
|
||||||
memindex += rmsg->length;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
} while (rmsg != NULL);
|
|
||||||
|
|
||||||
if (memindex != data.length) {
|
|
||||||
free(data.data);
|
|
||||||
return ERANGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
*_data = data;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void on_ldap_free(verto_ctx *vctx, verto_ev *ev)
|
static void on_ldap_free(verto_ctx *vctx, verto_ev *ev)
|
||||||
{
|
{
|
||||||
(void)vctx; /* Unused */
|
(void)vctx; /* Unused */
|
||||||
@@ -316,8 +242,7 @@ int main(int argc, char **argv)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.vctx = verto_default(NULL, VERTO_EV_TYPE_IO | VERTO_EV_TYPE_SIGNAL
|
ctx.vctx = verto_new(NULL, VERTO_EV_TYPE_IO | VERTO_EV_TYPE_SIGNAL);
|
||||||
| VERTO_EV_TYPE_CHILD);
|
|
||||||
if (ctx.vctx == NULL) {
|
if (ctx.vctx == NULL) {
|
||||||
otpd_log_err(ENOMEM, "Unable to initialize event loop");
|
otpd_log_err(ENOMEM, "Unable to initialize event loop");
|
||||||
goto error;
|
goto error;
|
||||||
@@ -417,3 +342,4 @@ error:
|
|||||||
krb5_free_context(ctx.kctx);
|
krb5_free_context(ctx.kctx);
|
||||||
return ctx.exitstatus;
|
return ctx.exitstatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,541 +0,0 @@
|
|||||||
/*
|
|
||||||
* FreeIPA 2FA companion daemon
|
|
||||||
*
|
|
||||||
* Authors: Sumit Bose <sbose@redhat.com>
|
|
||||||
*
|
|
||||||
* Copyright (C) 2021 Red Hat
|
|
||||||
* see file 'COPYING' for use and warranty information
|
|
||||||
*
|
|
||||||
* 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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file reaches out to a third-party IdP to handle an OAuth2
|
|
||||||
* authentication request (stdio.c/query.c) if the user is configured
|
|
||||||
* accordingly. The result is placed in the stdout queue (stdio.c).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <krb5/krb5.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <sys/random.h>
|
|
||||||
|
|
||||||
#include "internal.h"
|
|
||||||
|
|
||||||
#define OIDC_CHILD_PATH "/usr/libexec/sssd/oidc_child"
|
|
||||||
|
|
||||||
struct child_ctx {
|
|
||||||
int read_from_child;
|
|
||||||
int write_to_child;
|
|
||||||
verto_ev *read_ev;
|
|
||||||
verto_ev *write_ev;
|
|
||||||
verto_ev *child_ev;
|
|
||||||
struct otpd_queue_item *item;
|
|
||||||
struct otpd_queue_item *saved_item;
|
|
||||||
enum oauth2_state oauth2_state;
|
|
||||||
};
|
|
||||||
|
|
||||||
static int set_fd_nonblocking(int fd)
|
|
||||||
{
|
|
||||||
int flags;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
flags = fcntl(fd, F_GETFL, 0);
|
|
||||||
if (flags == -1) {
|
|
||||||
ret = errno;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1) {
|
|
||||||
ret = errno;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void free_child_ctx(verto_ctx *vctx, verto_ev *ev)
|
|
||||||
{
|
|
||||||
(void)vctx; /* Unused */
|
|
||||||
struct child_ctx *child_ctx;
|
|
||||||
|
|
||||||
child_ctx = verto_get_private(ev);
|
|
||||||
|
|
||||||
free(child_ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void oauth2_on_child_exit(verto_ctx *vctx, verto_ev *ev)
|
|
||||||
{
|
|
||||||
(void)vctx; /* Unused */
|
|
||||||
verto_proc_status st;
|
|
||||||
|
|
||||||
st = verto_get_proc_status(ev);
|
|
||||||
|
|
||||||
/* The krad req might not be available at this stage anymore, so
|
|
||||||
* otpd_log_err() is used. */
|
|
||||||
otpd_log_err(0, "Child finished with status [%d].", WEXITSTATUS(st));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void oauth2_on_child_writable(verto_ctx *vctx, verto_ev *ev)
|
|
||||||
{
|
|
||||||
(void)vctx; /* Unused */
|
|
||||||
ssize_t io;
|
|
||||||
struct child_ctx *child_ctx;
|
|
||||||
|
|
||||||
child_ctx = verto_get_private(ev);
|
|
||||||
if (child_ctx == NULL) {
|
|
||||||
otpd_log_err(EINVAL, "Lost child context");
|
|
||||||
verto_del(ev);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (child_ctx->oauth2_state == OAUTH2_GET_DEVICE_CODE) {
|
|
||||||
/* no input needed */
|
|
||||||
verto_del(ev);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
io = write(verto_get_fd(ev),
|
|
||||||
child_ctx->saved_item->oauth2.device_code_reply,
|
|
||||||
strlen(child_ctx->saved_item->oauth2.device_code_reply));
|
|
||||||
otpd_queue_item_free(child_ctx->saved_item);
|
|
||||||
|
|
||||||
if (io < 0) {
|
|
||||||
switch (errno) {
|
|
||||||
#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || EAGAIN - EWOULDBLOCK != 0)
|
|
||||||
case EWOULDBLOCK:
|
|
||||||
#endif
|
|
||||||
#if defined(EAGAIN)
|
|
||||||
case EAGAIN:
|
|
||||||
#endif
|
|
||||||
case ENOBUFS:
|
|
||||||
case EINTR:
|
|
||||||
/* In this case, we just need to try again. */
|
|
||||||
return;
|
|
||||||
default:
|
|
||||||
/* Unrecoverable. */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
otpd_log_err(errno, "Failed to send to child");
|
|
||||||
}
|
|
||||||
|
|
||||||
verto_del(ev);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* oidc_child will return two lines.
|
|
||||||
* The first is a JSON formatted string containing the device code and other
|
|
||||||
* data needed to get the access token in the second round. This will be
|
|
||||||
* returned to the caller as Radius Proxy-State so that the caller will send
|
|
||||||
* it back in the next round.
|
|
||||||
* The second line is the string expected by the krb5 oauth2 pre-auth plugin
|
|
||||||
* and will be send to the caller as Radius Reply-Message.
|
|
||||||
*/
|
|
||||||
static int handle_device_code_reply(struct child_ctx *child_ctx,
|
|
||||||
const char *dc_reply, char *rad_reply)
|
|
||||||
{
|
|
||||||
krad_attrset *attrset = NULL;
|
|
||||||
int ret;
|
|
||||||
krb5_data data = { 0 };
|
|
||||||
struct otpd_queue_item *state_item = NULL;
|
|
||||||
|
|
||||||
ret = otpd_queue_item_new(NULL, &state_item);
|
|
||||||
if (ret != 0) {
|
|
||||||
otpd_log_req(child_ctx->item->req, "Failed to allocate state item");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
state_item->oauth2.device_code_reply = strdup(dc_reply);
|
|
||||||
if (state_item->oauth2.device_code_reply == NULL) {
|
|
||||||
otpd_log_req(child_ctx->item->req, "Failed to copy device code reply.");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = krad_attrset_new(ctx.kctx, &attrset);
|
|
||||||
if (ret != 0) {
|
|
||||||
otpd_log_req(child_ctx->item->req,
|
|
||||||
"Failed to create radius attribute set");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
state_item->oauth2.state.magic = 0;
|
|
||||||
|
|
||||||
state_item->oauth2.state.data = strdup(dc_reply);
|
|
||||||
if (state_item->oauth2.state.data == NULL) {
|
|
||||||
otpd_log_req(child_ctx->item->req,
|
|
||||||
"Failed to copy device code reply to krad.");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
state_item->oauth2.state.length = strlen(dc_reply);
|
|
||||||
|
|
||||||
ret = add_krad_attr_to_set(child_ctx->item->req,
|
|
||||||
attrset, &(state_item->oauth2.state),
|
|
||||||
krad_attr_name2num("Proxy-State"),
|
|
||||||
"Failed to serialize state to attribute set");
|
|
||||||
if (ret != 0) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
data.magic = 0;
|
|
||||||
data.data = rad_reply;
|
|
||||||
data.length = strlen(rad_reply);
|
|
||||||
ret = add_krad_attr_to_set(child_ctx->item->req, attrset, &data,
|
|
||||||
krad_attr_name2num("Reply-Message"),
|
|
||||||
"Failed to serialize reply to attribute set");
|
|
||||||
if (ret != 0) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = krad_packet_new_response(ctx.kctx, SECRET,
|
|
||||||
krad_code_name2num("Access-Challenge"),
|
|
||||||
attrset,
|
|
||||||
child_ctx->item->req, &child_ctx->item->rsp);
|
|
||||||
if (ret != 0) {
|
|
||||||
otpd_log_err(ret, "Failed to create radius response");
|
|
||||||
child_ctx->item->rsp = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
otpd_queue_push(&ctx.oauth2_state.states, state_item);
|
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
done:
|
|
||||||
krad_attrset_free(attrset);
|
|
||||||
if (ret != 0) {
|
|
||||||
if (state_item != NULL) {
|
|
||||||
free(state_item->oauth2.state.data);
|
|
||||||
free(state_item->oauth2.device_code_reply);
|
|
||||||
free(state_item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int check_access_token_reply(struct child_ctx *child_ctx,
|
|
||||||
const char *buf, size_t len)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (strlen(child_ctx->item->user.ipaidpSub) != len
|
|
||||||
|| memcmp(child_ctx->item->user.ipaidpSub, buf, len) != 0) {
|
|
||||||
return EPERM;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = krad_packet_new_response(ctx.kctx, SECRET,
|
|
||||||
krad_code_name2num("Access-Accept"), NULL,
|
|
||||||
child_ctx->item->req, &child_ctx->item->rsp);
|
|
||||||
if (ret != 0) {
|
|
||||||
otpd_log_err(ret, "Failed to create radius response");
|
|
||||||
child_ctx->item->rsp = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void oauth2_on_child_readable(verto_ctx *vctx, verto_ev *ev)
|
|
||||||
{
|
|
||||||
static char buf[10240];
|
|
||||||
ssize_t io = 0;
|
|
||||||
struct child_ctx *child_ctx = NULL;
|
|
||||||
int ret;
|
|
||||||
char *rad_reply;
|
|
||||||
char *end;
|
|
||||||
|
|
||||||
(void) vctx; /* Unused */
|
|
||||||
|
|
||||||
child_ctx = (struct child_ctx *) verto_get_private(ev);
|
|
||||||
if (child_ctx == NULL) {
|
|
||||||
otpd_log_err(EINVAL, "Lost child context");
|
|
||||||
verto_del(ev);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/* Make sure ctx.stdio.responses will at least return an error */
|
|
||||||
child_ctx->item->rsp = NULL;
|
|
||||||
child_ctx->item->sent = 0;
|
|
||||||
|
|
||||||
io = read(verto_get_fd(ev), buf, 10240);
|
|
||||||
if (io < 0) {
|
|
||||||
otpd_log_err(errno, "Failed to read from child");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (io >= 0) {
|
|
||||||
buf[io] = '\0';
|
|
||||||
otpd_log_req(child_ctx->item->req, "Received: [%s]", buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
verto_del(ev);
|
|
||||||
|
|
||||||
if (child_ctx->oauth2_state == OAUTH2_GET_DEVICE_CODE) {
|
|
||||||
/* expect 2 lines of output. First the orginal JSON string return by
|
|
||||||
* the IdP from the devicecode request which will be used as input to
|
|
||||||
* the child process in the second run. Second the JSON string returned
|
|
||||||
* in the radius reply. */
|
|
||||||
|
|
||||||
rad_reply = memchr(buf, '\n', io);
|
|
||||||
if (rad_reply != NULL) {
|
|
||||||
*rad_reply = '\0';
|
|
||||||
rad_reply++;
|
|
||||||
end = memchr(rad_reply, '\n', io - (rad_reply - 1 - buf));
|
|
||||||
if (end == NULL) {
|
|
||||||
otpd_log_req(child_ctx->item->req, "Missing second new-line.");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
*end = '\0';
|
|
||||||
|
|
||||||
ret = handle_device_code_reply(child_ctx, buf, rad_reply);
|
|
||||||
if (ret != 0) {
|
|
||||||
otpd_log_req(child_ctx->item->req,
|
|
||||||
"Failed to handle device code reply.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (child_ctx->oauth2_state == OAUTH2_GET_ACCESS_TOKEN) {
|
|
||||||
ret = check_access_token_reply(child_ctx, buf, (size_t) io);
|
|
||||||
if (ret != 0) {
|
|
||||||
otpd_log_req(child_ctx->item->req,
|
|
||||||
"Failed to check access token reply.");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/* error */
|
|
||||||
otpd_log_req(child_ctx->item->req, "Unexpected state [%d].",
|
|
||||||
child_ctx->oauth2_state);
|
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
|
||||||
otpd_queue_push(&ctx.stdio.responses, child_ctx->item);
|
|
||||||
verto_set_flags(ctx.stdio.writer, VERTO_EV_FLAG_PERSIST |
|
|
||||||
VERTO_EV_FLAG_IO_ERROR |
|
|
||||||
VERTO_EV_FLAG_IO_READ |
|
|
||||||
VERTO_EV_FLAG_IO_WRITE);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char *oauth2_state_to_str(enum oauth2_state oauth2_state)
|
|
||||||
{
|
|
||||||
switch (oauth2_state) {
|
|
||||||
case OAUTH2_NO:
|
|
||||||
return "OAuth2 not available";
|
|
||||||
break;
|
|
||||||
case OAUTH2_GET_ISSUER:
|
|
||||||
return "Get issuer from LDAP";
|
|
||||||
break;
|
|
||||||
case OAUTH2_GET_DEVICE_CODE:
|
|
||||||
return "Get device code";
|
|
||||||
break;
|
|
||||||
case OAUTH2_GET_ACCESS_TOKEN:
|
|
||||||
return "Get access token";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return "Unknown OAuth2 state";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int oauth2(struct otpd_queue_item **item, enum oauth2_state oauth2_state)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
pid_t child_pid;
|
|
||||||
int pipefd_to_child[2] = { -1, -1};
|
|
||||||
int pipefd_from_child[2] = { -1, -1};
|
|
||||||
struct child_ctx *child_ctx;
|
|
||||||
/* Up to 50 arguments to the helper supported. The amount of arguments
|
|
||||||
* is controlled inside this function. Right now max used is below 20 */
|
|
||||||
char *args[50] = {NULL};
|
|
||||||
size_t args_idx = 0;
|
|
||||||
krb5_data data_state = {0};
|
|
||||||
struct otpd_queue_item *saved_item = NULL;
|
|
||||||
|
|
||||||
if (oauth2_state != OAUTH2_GET_DEVICE_CODE
|
|
||||||
&& oauth2_state != OAUTH2_GET_ACCESS_TOKEN) {
|
|
||||||
otpd_log_req((*item)->req, "Unexpected OAuth2 state [%d][%s]",
|
|
||||||
oauth2_state, oauth2_state_to_str(oauth2_state));
|
|
||||||
return EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (oauth2_state == OAUTH2_GET_ACCESS_TOKEN) {
|
|
||||||
ret = get_krad_attr_from_packet((*item)->req,
|
|
||||||
krad_attr_name2num("Proxy-State"),
|
|
||||||
&data_state);
|
|
||||||
if ((ret != 0) || (data_state.length == 0)) {
|
|
||||||
otpd_log_req((*item)->req, "Missing Radius Proxy-State attribute");
|
|
||||||
return EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
saved_item = calloc(sizeof(struct otpd_queue_item), 1);
|
|
||||||
if (saved_item == NULL) {
|
|
||||||
otpd_log_req((*item)->req, "No matching saved state found");
|
|
||||||
return EINVAL;
|
|
||||||
}
|
|
||||||
saved_item->oauth2.device_code_reply = strndup(data_state.data,
|
|
||||||
data_state.length);
|
|
||||||
if (saved_item->oauth2.device_code_reply == NULL) {
|
|
||||||
otpd_log_req((*item)->req, "Failed to copy device code reply");
|
|
||||||
return EINVAL;
|
|
||||||
}
|
|
||||||
krb5_free_data_contents(NULL, &data_state);
|
|
||||||
}
|
|
||||||
|
|
||||||
child_ctx = calloc(sizeof(struct child_ctx), 1);
|
|
||||||
if (child_ctx == NULL) {
|
|
||||||
ret = ENOMEM;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
child_ctx->item = (*item);
|
|
||||||
child_ctx->saved_item = saved_item;
|
|
||||||
child_ctx->oauth2_state = oauth2_state;
|
|
||||||
|
|
||||||
otpd_log_req((*item)->req, "oauth2 start: %s",
|
|
||||||
oauth2_state_to_str(oauth2_state));
|
|
||||||
|
|
||||||
args[args_idx++] = OIDC_CHILD_PATH;
|
|
||||||
|
|
||||||
if (oauth2_state == OAUTH2_GET_DEVICE_CODE) {
|
|
||||||
args[args_idx++] = "--get-device-code";
|
|
||||||
} else {
|
|
||||||
args[args_idx++] = "--get-access-token";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((*item)->idp.ipaidpIssuerURL != NULL) {
|
|
||||||
args[args_idx++] = "--issuer-url";
|
|
||||||
args[args_idx++] = (*item)->idp.ipaidpIssuerURL;
|
|
||||||
} else {
|
|
||||||
args[args_idx++] = "--device-auth-endpoint";
|
|
||||||
args[args_idx++] = (*item)->idp.ipaidpDevAuthEndpoint;
|
|
||||||
|
|
||||||
args[args_idx++] = "--token-endpoint";
|
|
||||||
args[args_idx++] = (*item)->idp.ipaidpTokenEndpoint;
|
|
||||||
|
|
||||||
args[args_idx++] = "--userinfo-endpoint";
|
|
||||||
args[args_idx++] = (*item)->idp.ipaidpUserInfoEndpoint;
|
|
||||||
|
|
||||||
if ((*item)->idp.ipaidpKeysEndpoint) {
|
|
||||||
args[args_idx++] = "--jwks-uri";
|
|
||||||
args[args_idx++] = (*item)->idp.ipaidpKeysEndpoint;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
args[args_idx++] = "--client-id";
|
|
||||||
args[args_idx++] = (*item)->idp.ipaidpClientID;
|
|
||||||
|
|
||||||
if ((*item)->idp.ipaidpClientSecret) {
|
|
||||||
args[args_idx++] = "--client-secret";
|
|
||||||
args[args_idx++] = (*item)->idp.ipaidpClientSecret;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((*item)->idp.ipaidpScope) {
|
|
||||||
args[args_idx++] = "--scope";
|
|
||||||
args[args_idx++] = (*item)->idp.ipaidpScope;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((*item)->idp.ipaidpSub) {
|
|
||||||
args[args_idx++] = "--user-identifier-attribute";
|
|
||||||
args[args_idx++] = (*item)->idp.ipaidpSub;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((*item)->idp.ipaidpDebugLevelStr != NULL) {
|
|
||||||
args[args_idx++] = "--debug-level";
|
|
||||||
args[args_idx++] = (*item)->idp.ipaidpDebugLevelStr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((*item)->idp.ipaidpDebugCurl) {
|
|
||||||
args[args_idx++] = "--libcurl-debug";
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
for (int i; args[i]; i++) {
|
|
||||||
otpd_log_req((*item)->req, "oidc_child exec: %s", args[i]);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ret = pipe(pipefd_from_child);
|
|
||||||
if (ret == -1) {
|
|
||||||
ret = errno;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
ret = pipe(pipefd_to_child);
|
|
||||||
if (ret == -1) {
|
|
||||||
ret = errno;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
child_pid = fork();
|
|
||||||
|
|
||||||
if (child_pid == 0) { /* child */
|
|
||||||
close(pipefd_to_child[1]);
|
|
||||||
ret = dup2(pipefd_to_child[0], STDIN_FILENO);
|
|
||||||
if (ret == -1) {
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
close(pipefd_from_child[0]);
|
|
||||||
ret = dup2(pipefd_from_child[1], STDOUT_FILENO);
|
|
||||||
if (ret == -1) {
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
execv(OIDC_CHILD_PATH, args);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
} else if (child_pid > 0) { /* parent */
|
|
||||||
close(pipefd_to_child[0]);
|
|
||||||
set_fd_nonblocking(pipefd_to_child[1]);
|
|
||||||
child_ctx->write_to_child = pipefd_to_child[1];
|
|
||||||
|
|
||||||
close(pipefd_from_child[1]);
|
|
||||||
set_fd_nonblocking(pipefd_from_child[0]);
|
|
||||||
child_ctx->read_from_child = pipefd_from_child[0];
|
|
||||||
|
|
||||||
child_ctx->write_ev = verto_add_io(ctx.vctx, VERTO_EV_FLAG_PERSIST |
|
|
||||||
VERTO_EV_FLAG_IO_CLOSE_FD |
|
|
||||||
VERTO_EV_FLAG_IO_ERROR |
|
|
||||||
VERTO_EV_FLAG_IO_WRITE,
|
|
||||||
oauth2_on_child_writable,
|
|
||||||
child_ctx->write_to_child);
|
|
||||||
if (child_ctx->write_ev == NULL) {
|
|
||||||
ret = ENOMEM;
|
|
||||||
otpd_log_err(ret, "Unable to initialize oauth2 writer event");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
verto_set_private(child_ctx->write_ev, child_ctx, NULL);
|
|
||||||
|
|
||||||
child_ctx->read_ev = verto_add_io(ctx.vctx, VERTO_EV_FLAG_PERSIST |
|
|
||||||
VERTO_EV_FLAG_IO_CLOSE_FD |
|
|
||||||
VERTO_EV_FLAG_IO_ERROR |
|
|
||||||
VERTO_EV_FLAG_IO_READ,
|
|
||||||
oauth2_on_child_readable,
|
|
||||||
child_ctx->read_from_child);
|
|
||||||
if (child_ctx->read_ev == NULL) {
|
|
||||||
ret = ENOMEM;
|
|
||||||
otpd_log_err(ret, "Unable to initialize oauth2 writer event");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
verto_set_private(child_ctx->read_ev, child_ctx, NULL);
|
|
||||||
|
|
||||||
child_ctx->child_ev = verto_add_child(ctx.vctx, VERTO_EV_FLAG_NONE,
|
|
||||||
oauth2_on_child_exit, child_pid);
|
|
||||||
verto_set_private(child_ctx->child_ev, child_ctx, free_child_ctx);
|
|
||||||
|
|
||||||
} else { /* error */
|
|
||||||
ret = errno;
|
|
||||||
otpd_log_err(ret, "Failed to fork oidc_child");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
done:
|
|
||||||
if (ret == 0) {
|
|
||||||
*item = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
+2
-183
@@ -24,18 +24,15 @@
|
|||||||
* This file parses the user's configuration received from LDAP (see query.c).
|
* This file parses the user's configuration received from LDAP (see query.c).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _GNU_SOURCE /* for asprintf() */
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include <asm-generic/errno-base.h>
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <krb5/krb5.h>
|
|
||||||
|
|
||||||
#define DEFAULT_TIMEOUT 15
|
#define DEFAULT_TIMEOUT 15
|
||||||
#define DEFAULT_RETRIES 3
|
#define DEFAULT_RETRIES 3
|
||||||
|
|
||||||
/* Convert an LDAP entry into an allocated string. */
|
/* Convert an LDAP entry into an allocated string. */
|
||||||
int get_string(LDAP *ldp, LDAPMessage *entry, const char *name,
|
static int get_string(LDAP *ldp, LDAPMessage *entry, const char *name,
|
||||||
char **out)
|
char **out)
|
||||||
{
|
{
|
||||||
struct berval **vals;
|
struct berval **vals;
|
||||||
ber_len_t i;
|
ber_len_t i;
|
||||||
@@ -68,69 +65,6 @@ int get_string(LDAP *ldp, LDAPMessage *entry, const char *name,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Convert an LDAP entry into an allocated string array. */
|
|
||||||
int get_string_array(LDAP *ldp, LDAPMessage *entry, const char *name,
|
|
||||||
char ***out)
|
|
||||||
{
|
|
||||||
struct berval **vals;
|
|
||||||
ber_len_t i;
|
|
||||||
char **buf = NULL;
|
|
||||||
int tmp;
|
|
||||||
size_t count;
|
|
||||||
size_t c;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
vals = ldap_get_values_len(ldp, entry, name);
|
|
||||||
if (vals == NULL)
|
|
||||||
return ENOENT;
|
|
||||||
|
|
||||||
tmp = ldap_count_values_len(vals);
|
|
||||||
if (tmp < 0) {
|
|
||||||
ret = ENOENT;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
count = (size_t) tmp;
|
|
||||||
|
|
||||||
buf = calloc(count + 1, sizeof(char *));
|
|
||||||
if (buf == NULL) {
|
|
||||||
ret = ENOMEM;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (c = 0; c < count; c++) {
|
|
||||||
buf[c] = calloc(vals[c]->bv_len + 1, sizeof(char));
|
|
||||||
if (buf[c] == NULL) {
|
|
||||||
ret = ENOMEM;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < vals[c]->bv_len; i++) {
|
|
||||||
if (!isprint(vals[c]->bv_val[i])) {
|
|
||||||
ret = EINVAL;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf[c][i] = vals[c]->bv_val[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*out != NULL)
|
|
||||||
free(*out);
|
|
||||||
*out = buf;
|
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
|
|
||||||
done:
|
|
||||||
if (ret != 0 && buf != NULL) {
|
|
||||||
for (c = 0; buf[c] != NULL; c++) {
|
|
||||||
free(buf[c]);
|
|
||||||
}
|
|
||||||
free(buf);
|
|
||||||
}
|
|
||||||
ldap_value_free_len(vals);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Convert an LDAP entry into an unsigned long. */
|
/* Convert an LDAP entry into an unsigned long. */
|
||||||
static int get_ulong(LDAP *ldp, LDAPMessage *entry, const char *name,
|
static int get_ulong(LDAP *ldp, LDAPMessage *entry, const char *name,
|
||||||
unsigned long *out)
|
unsigned long *out)
|
||||||
@@ -178,26 +112,6 @@ const char *otpd_parse_user(LDAP *ldp, LDAPMessage *entry,
|
|||||||
if (i != 0 && i != ENOENT)
|
if (i != 0 && i != ENOENT)
|
||||||
return strerror(i);
|
return strerror(i);
|
||||||
|
|
||||||
i = get_string(ldp, entry, "ipaidpSub",
|
|
||||||
&item->user.ipaidpSub);
|
|
||||||
if (i != 0 && i != ENOENT)
|
|
||||||
return strerror(i);
|
|
||||||
|
|
||||||
i = get_string(ldp, entry, "ipaidpConfigLink",
|
|
||||||
&item->user.ipaidpConfigLink);
|
|
||||||
if (i != 0 && i != ENOENT)
|
|
||||||
return strerror(i);
|
|
||||||
|
|
||||||
i = get_string_array(ldp, entry, "ipaPassKey",
|
|
||||||
&item->user.ipaPassKey);
|
|
||||||
if (i != 0 && i != ENOENT)
|
|
||||||
return strerror(i);
|
|
||||||
|
|
||||||
i = get_string_array(ldp, entry, "ipauserauthtype",
|
|
||||||
&item->user.ipauserauthtypes);
|
|
||||||
if (i != 0 && i != ENOENT)
|
|
||||||
return strerror(i);
|
|
||||||
|
|
||||||
/* Get the DN. */
|
/* Get the DN. */
|
||||||
item->user.dn = ldap_get_dn(ldp, entry);
|
item->user.dn = ldap_get_dn(ldp, entry);
|
||||||
if (item->user.dn == NULL) {
|
if (item->user.dn == NULL) {
|
||||||
@@ -208,101 +122,6 @@ const char *otpd_parse_user(LDAP *ldp, LDAPMessage *entry,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ENV_OIDC_CHILD_DEBUG_LEVEL "oidc_child_debug_level"
|
|
||||||
/* Parse the IdP configuration */
|
|
||||||
const char *otpd_parse_idp(LDAP *ldp, LDAPMessage *entry,
|
|
||||||
struct otpd_queue_item *item)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
long dbg_lvl = 0;
|
|
||||||
const char *dbg_env = NULL;
|
|
||||||
char *endptr = NULL;
|
|
||||||
|
|
||||||
item->idp.valid = FALSE;
|
|
||||||
i = get_string(ldp, entry, "cn", &item->idp.name);
|
|
||||||
if (i != 0) {
|
|
||||||
return strerror(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
i = get_string(ldp, entry, "ipaidpIssuerURL", &item->idp.ipaidpIssuerURL);
|
|
||||||
if ((i != 0) && (i != ENOENT)) {
|
|
||||||
return strerror(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We support either passing issuer URL or individual end-points */
|
|
||||||
if (i == ENOENT) {
|
|
||||||
i = get_string(ldp, entry, "ipaidpDevAuthEndpoint", &item->idp.ipaidpDevAuthEndpoint);
|
|
||||||
if (i != 0) {
|
|
||||||
return strerror(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
i = get_string(ldp, entry, "ipaidpTokenEndpoint", &item->idp.ipaidpTokenEndpoint);
|
|
||||||
if (i != 0) {
|
|
||||||
return strerror(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
i = get_string(ldp, entry, "ipaidpUserInfoEndpoint", &item->idp.ipaidpUserInfoEndpoint);
|
|
||||||
if (i != 0) {
|
|
||||||
return strerror(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* JWKS end-point may be optional */
|
|
||||||
i = get_string(ldp, entry, "ipaidpKeysEndpoint", &item->idp.ipaidpKeysEndpoint);
|
|
||||||
if ((i != 0) && (i != ENOENT)) {
|
|
||||||
return strerror(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
i = get_string(ldp, entry, "ipaidpClientID", &item->idp.ipaidpClientID);
|
|
||||||
if (i != 0) {
|
|
||||||
return strerror(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
i = get_string(ldp, entry, "ipaidpClientSecret", &item->idp.ipaidpClientSecret);
|
|
||||||
if ((i != 0) && (i != ENOENT)) {
|
|
||||||
return strerror(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
i = get_string(ldp, entry, "ipaidpScope", &item->idp.ipaidpScope);
|
|
||||||
if ((i != 0) && (i != ENOENT)) {
|
|
||||||
return strerror(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
i = get_string(ldp, entry, "ipaidpSub", &item->idp.ipaidpSub);
|
|
||||||
if ((i != 0) && (i != ENOENT)) {
|
|
||||||
return strerror(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
item->idp.ipaidpDebugLevelStr = NULL;
|
|
||||||
item->idp.ipaidpDebugCurl = FALSE;
|
|
||||||
dbg_env = getenv(ENV_OIDC_CHILD_DEBUG_LEVEL);
|
|
||||||
if (dbg_env != NULL && *dbg_env != '\0') {
|
|
||||||
errno = 0;
|
|
||||||
dbg_lvl = strtoul(dbg_env, &endptr, 10);
|
|
||||||
if (errno == 0 && *endptr == '\0') {
|
|
||||||
if (dbg_lvl < 0) {
|
|
||||||
dbg_lvl = 0;
|
|
||||||
} else if (dbg_lvl > 10) {
|
|
||||||
dbg_lvl = 10;
|
|
||||||
}
|
|
||||||
if (asprintf(&item->idp.ipaidpDebugLevelStr, "%ld", dbg_lvl) != -1) {
|
|
||||||
if (dbg_lvl > 5) {
|
|
||||||
item->idp.ipaidpDebugCurl = TRUE;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
otpd_log_req(item->req, "Failed to copy debug level");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
otpd_log_req(item->req,
|
|
||||||
"Cannot parse value [%s] from environment variable [%s]",
|
|
||||||
dbg_env, ENV_OIDC_CHILD_DEBUG_LEVEL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
item->idp.valid = TRUE;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Parse the user's RADIUS configuration. */
|
/* Parse the user's RADIUS configuration. */
|
||||||
const char *otpd_parse_radius(LDAP *ldp, LDAPMessage *entry,
|
const char *otpd_parse_radius(LDAP *ldp, LDAPMessage *entry,
|
||||||
struct otpd_queue_item *item)
|
struct otpd_queue_item *item)
|
||||||
|
|||||||
@@ -1,824 +0,0 @@
|
|||||||
/*
|
|
||||||
* FreeIPA 2FA companion daemon
|
|
||||||
*
|
|
||||||
* Authors: Sumit Bose <sbose@redhat.com>
|
|
||||||
*
|
|
||||||
* Copyright (C) 2022 Sumit Bose, Red Hat
|
|
||||||
* see file 'COPYING' for use and warranty information
|
|
||||||
*
|
|
||||||
* 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 <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file contains various helper functions for the passkey feature.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define _GNU_SOURCE /* for asprintf() */
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <jansson.h>
|
|
||||||
#include <openssl/rand.h>
|
|
||||||
#include <openssl/evp.h>
|
|
||||||
|
|
||||||
#include "internal.h"
|
|
||||||
|
|
||||||
struct passkey_data {
|
|
||||||
int phase;
|
|
||||||
char *state;
|
|
||||||
union {
|
|
||||||
struct passkey_challenge {
|
|
||||||
char *domain;
|
|
||||||
json_t *credential_id_list;
|
|
||||||
int user_verification;
|
|
||||||
unsigned char *cryptographic_challenge;
|
|
||||||
} challenge;
|
|
||||||
|
|
||||||
struct sss_passkey_reply {
|
|
||||||
char *credential_id;
|
|
||||||
char *cryptographic_challenge;
|
|
||||||
char *authenticator_data;
|
|
||||||
char *assertion_signature;
|
|
||||||
char *user_id;
|
|
||||||
} response;
|
|
||||||
} data;
|
|
||||||
json_t *jdata;
|
|
||||||
json_t *jroot;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct otpd_queue_item_passkey {
|
|
||||||
char *domain;
|
|
||||||
char *ipaRequireUserVerification;
|
|
||||||
struct passkey_data *data_in;
|
|
||||||
struct passkey_data *data_out;
|
|
||||||
krb5_data state;
|
|
||||||
char* ipapasskeyDebugLevelStr;
|
|
||||||
krb5_boolean ipapasskeyDebugFido2;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void free_passkey_data(struct passkey_data *p)
|
|
||||||
{
|
|
||||||
if (p == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p->phase == 1) {
|
|
||||||
free(p->data.challenge.domain);
|
|
||||||
free(p->data.challenge.cryptographic_challenge);
|
|
||||||
}
|
|
||||||
|
|
||||||
json_decref(p->jdata);
|
|
||||||
json_decref(p->jroot);
|
|
||||||
free(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
void free_otpd_queue_item_passkey(struct otpd_queue_item *item)
|
|
||||||
{
|
|
||||||
if (item == NULL || item->passkey == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
free(item->passkey->domain);
|
|
||||||
free(item->passkey->ipaRequireUserVerification);
|
|
||||||
|
|
||||||
free_passkey_data(item->passkey->data_in);
|
|
||||||
free_passkey_data(item->passkey->data_out);
|
|
||||||
|
|
||||||
free(item->passkey);
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct otpd_queue_item_passkey *get_otpd_queue_item_passkey(void)
|
|
||||||
{
|
|
||||||
struct otpd_queue_item_passkey *p;
|
|
||||||
|
|
||||||
p = calloc(1, sizeof(struct otpd_queue_item_passkey));
|
|
||||||
if (p == NULL) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
p->data_in = calloc(1, sizeof(struct passkey_data));
|
|
||||||
if (p->data_in == NULL) {
|
|
||||||
free(p);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
p->data_out = calloc(1, sizeof(struct passkey_data));
|
|
||||||
if (p->data_out == NULL) {
|
|
||||||
free(p->data_in);
|
|
||||||
free(p);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
p->data_in->phase = -1;
|
|
||||||
p->data_out->phase = -1;
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define PASSKEY_PREFIX "passkey "
|
|
||||||
#define ENV_PASSKEY_CHILD_DEBUG_LEVEL "passkey_child_debug_level"
|
|
||||||
|
|
||||||
/* Parse the passkey configuration */
|
|
||||||
const char *otpd_parse_passkey(LDAP *ldp, LDAPMessage *entry,
|
|
||||||
struct otpd_queue_item *item)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
char **objectclasses = NULL;
|
|
||||||
long dbg_lvl = 0;
|
|
||||||
const char *dbg_env = NULL;
|
|
||||||
char *endptr = NULL;
|
|
||||||
|
|
||||||
if (item->passkey == NULL) {
|
|
||||||
otpd_log_req(item->req,
|
|
||||||
"Missing passkey struct to store passkey configuration");
|
|
||||||
return strerror(EINVAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
while (entry != NULL) {
|
|
||||||
i = get_string_array(ldp, entry, "objectclass", &objectclasses);
|
|
||||||
if (i != 0) {
|
|
||||||
return strerror(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (auth_type_is(objectclasses, "ipapasskeyconfigobject")) {
|
|
||||||
free(objectclasses);
|
|
||||||
|
|
||||||
i = get_string(ldp, entry, "ipaRequireUserVerification",
|
|
||||||
&item->passkey->ipaRequireUserVerification);
|
|
||||||
if ((i != 0) && (i != ENOENT)) {
|
|
||||||
return strerror(i);
|
|
||||||
}
|
|
||||||
} else if (auth_type_is(objectclasses, "domainRelatedObject")) {
|
|
||||||
free(objectclasses);
|
|
||||||
|
|
||||||
i = get_string(ldp, entry, "associatedDomain",
|
|
||||||
&item->passkey->domain);
|
|
||||||
if ((i != 0) && (i != ENOENT)) {
|
|
||||||
return strerror(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
entry = ldap_next_entry(ldp, entry);
|
|
||||||
};
|
|
||||||
|
|
||||||
item->passkey->ipapasskeyDebugLevelStr = NULL;
|
|
||||||
item->passkey->ipapasskeyDebugFido2 = FALSE;
|
|
||||||
dbg_env = getenv(ENV_PASSKEY_CHILD_DEBUG_LEVEL);
|
|
||||||
if (dbg_env != NULL && *dbg_env != '\0') {
|
|
||||||
errno = 0;
|
|
||||||
dbg_lvl = strtoul(dbg_env, &endptr, 10);
|
|
||||||
if (errno == 0 && *endptr == '\0') {
|
|
||||||
if (dbg_lvl < 0) {
|
|
||||||
dbg_lvl = 0;
|
|
||||||
} else if (dbg_lvl > 10) {
|
|
||||||
dbg_lvl = 10;
|
|
||||||
}
|
|
||||||
if (asprintf(&item->passkey->ipapasskeyDebugLevelStr, "%ld",
|
|
||||||
dbg_lvl) != -1) {
|
|
||||||
if (dbg_lvl > 5) {
|
|
||||||
item->passkey->ipapasskeyDebugFido2 = TRUE;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
otpd_log_req(item->req, "Failed to copy debug level");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
otpd_log_req(item->req,
|
|
||||||
"Cannot parse value [%s] from environment variable [%s]",
|
|
||||||
dbg_env, ENV_PASSKEY_CHILD_DEBUG_LEVEL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int decode_json(const char *inp, size_t size, struct passkey_data *data)
|
|
||||||
{
|
|
||||||
json_error_t jret;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
data->jroot = json_loadb(inp, size, 0, &jret);
|
|
||||||
if (data->jroot == NULL) {
|
|
||||||
return EINVAL;
|
|
||||||
}
|
|
||||||
data->jdata = NULL;
|
|
||||||
data->phase = -1;
|
|
||||||
|
|
||||||
ret = json_unpack(data->jroot, "{s:i, s?:s, s?:o}",
|
|
||||||
"phase", &data->phase,
|
|
||||||
"state", &data->state,
|
|
||||||
"data", &data->jdata);
|
|
||||||
if (ret != 0) {
|
|
||||||
ret = EINVAL;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (data->phase) {
|
|
||||||
case 0: /* SSS_PASSKEY_PHASE_INIT */
|
|
||||||
/* no data */
|
|
||||||
if (data->jdata != NULL) {
|
|
||||||
ret = EINVAL;
|
|
||||||
} else {
|
|
||||||
ret = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 2: /* SSS_PASSKEY_PHASE_REPLY */
|
|
||||||
ret = json_unpack(data->jdata, "{s:s, s:s, s:s, s:s}",
|
|
||||||
"credential_id", &data->data.response.credential_id,
|
|
||||||
"cryptographic_challenge", &data->data.response.cryptographic_challenge,
|
|
||||||
"authenticator_data", &data->data.response.authenticator_data,
|
|
||||||
"assertion_signature", &data->data.response.assertion_signature,
|
|
||||||
"user_id", &data->data.response.user_id);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ret = EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
|
||||||
if (ret != 0) {
|
|
||||||
json_decref(data->jdata);
|
|
||||||
data->jdata = NULL;
|
|
||||||
json_decref(data->jroot);
|
|
||||||
data->jroot = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int passkey_parse_data(const char *data, size_t size, struct otpd_queue_item *item)
|
|
||||||
{
|
|
||||||
item->passkey = get_otpd_queue_item_passkey();
|
|
||||||
if (item->passkey == NULL) {
|
|
||||||
return ENOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
return decode_json(data, size, item->passkey->data_in);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool is_passkey(struct otpd_queue_item *item)
|
|
||||||
{
|
|
||||||
const krb5_data *data_pwd;
|
|
||||||
krb5_data data_state = { 0 };
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (item->passkey != NULL) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
data_pwd = krad_packet_get_attr(item->req,
|
|
||||||
krad_attr_name2num("User-Password"), 0);
|
|
||||||
ret = get_krad_attr_from_packet(item->req,
|
|
||||||
krad_attr_name2num("Proxy-State"),
|
|
||||||
&data_state);
|
|
||||||
|
|
||||||
if (data_pwd == NULL && ret == 0
|
|
||||||
&& data_state.length > strlen(PASSKEY_PREFIX)
|
|
||||||
&& strncmp(data_state.data, PASSKEY_PREFIX,
|
|
||||||
strlen(PASSKEY_PREFIX)) == 0
|
|
||||||
&& (item->user.ipauserauthtypes == NULL
|
|
||||||
|| item->user.ipauserauthtypes[0] == NULL
|
|
||||||
|| *(item->user.ipauserauthtypes[0]) == '\0'
|
|
||||||
|| auth_type_is(item->user.ipauserauthtypes, "passkey"))) {
|
|
||||||
|
|
||||||
ret = passkey_parse_data(data_state.data + strlen(PASSKEY_PREFIX),
|
|
||||||
data_state.length - strlen(PASSKEY_PREFIX) - 1,
|
|
||||||
item);
|
|
||||||
krb5_free_data_contents(NULL, &data_state);
|
|
||||||
if (ret != 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define PK_PREF "passkey:"
|
|
||||||
|
|
||||||
static json_t *ipa_passkey_to_json_array(char **ipa_passkey)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
const char *sep;
|
|
||||||
char *start;
|
|
||||||
size_t c;
|
|
||||||
json_t *ja = NULL;
|
|
||||||
json_t *js;
|
|
||||||
|
|
||||||
if (ipa_passkey == NULL || *ipa_passkey == NULL) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ja = json_array();
|
|
||||||
if (ja == NULL) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (c = 0; ipa_passkey[c] != NULL; c++) {
|
|
||||||
if (strncmp(ipa_passkey[c], PK_PREF, strlen(PK_PREF)) != 0) {
|
|
||||||
otpd_log_err(ret, "Missing prefix in [%s]", ipa_passkey[c]);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
start = ipa_passkey[c] + strlen(PK_PREF);
|
|
||||||
sep = strchr(start, ',');
|
|
||||||
if (sep == NULL || sep == start) {
|
|
||||||
otpd_log_err(ret, "Missing seperator in [%s]", ipa_passkey[c]);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
js = json_stringn(start, sep - start);
|
|
||||||
if (js == NULL) {
|
|
||||||
ret = ENOMEM;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = json_array_append_new(ja, js);
|
|
||||||
if (ret != 0) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
|
||||||
if (ret != 0) {
|
|
||||||
json_decref(ja);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ja;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* passkey string:
|
|
||||||
* key_handle,public_key(,optional_user_id)
|
|
||||||
*/
|
|
||||||
static char *ipa_passkey_get_public_key(char **ipa_passkey, const char *key_id)
|
|
||||||
{
|
|
||||||
char *sep;
|
|
||||||
char *sep2;
|
|
||||||
size_t c;
|
|
||||||
char *start;
|
|
||||||
|
|
||||||
if (ipa_passkey == NULL || *ipa_passkey == NULL
|
|
||||||
|| key_id == NULL || *key_id == '\0') {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (c = 0; ipa_passkey[c] != NULL; c++) {
|
|
||||||
if (strncmp(ipa_passkey[c], PK_PREF, strlen(PK_PREF)) != 0) {
|
|
||||||
otpd_log_err(EINVAL, "Missing prefix in [%s]", ipa_passkey[c]);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
start = ipa_passkey[c] + strlen(PK_PREF);
|
|
||||||
|
|
||||||
sep = strchr(start, ',');
|
|
||||||
if (sep == NULL || sep == start) {
|
|
||||||
otpd_log_err(EINVAL, "Missing seperator in [%s]", ipa_passkey[c]);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strncmp(start, key_id, sep - start) == 0) {
|
|
||||||
sep2 = strchrnul(sep + 1, ',');
|
|
||||||
if (sep2 == sep + 1) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
*sep2 = '\0';
|
|
||||||
return (sep + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define CHALLENGE_LENGTH 32
|
|
||||||
static unsigned char *get_b64_challenge(void)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
unsigned char buf[CHALLENGE_LENGTH];
|
|
||||||
unsigned char *b64;
|
|
||||||
|
|
||||||
ret = RAND_bytes(buf, CHALLENGE_LENGTH);
|
|
||||||
if (ret != 1) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
b64 = calloc(1, 2 * CHALLENGE_LENGTH);
|
|
||||||
if (b64 == NULL) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = EVP_EncodeBlock(b64, buf, CHALLENGE_LENGTH);
|
|
||||||
if (ret == 0) {
|
|
||||||
free(b64);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return b64;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int prepare_rad_reply(struct otpd_queue_item *item)
|
|
||||||
{
|
|
||||||
krad_attrset *attrset = NULL;
|
|
||||||
int ret;
|
|
||||||
json_t *jtmp = NULL;
|
|
||||||
char *stmp = NULL;
|
|
||||||
krb5_data data = { 0 };
|
|
||||||
|
|
||||||
ret = krad_attrset_new(ctx.kctx, &attrset);
|
|
||||||
if (ret != 0) {
|
|
||||||
otpd_log_err(ret, "Failed to create radius attribute set");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
jtmp = json_pack("{s:i, s:s, s:o}", "phase", item->passkey->data_out->phase,
|
|
||||||
"state", item->passkey->data_out->state,
|
|
||||||
"data", item->passkey->data_out->jdata);
|
|
||||||
if (jtmp == NULL) {
|
|
||||||
ret = EIO;
|
|
||||||
otpd_log_err(ret, "Failed to pack JSON reply");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
stmp = json_dumps(jtmp, JSON_COMPACT);
|
|
||||||
if (stmp == NULL) {
|
|
||||||
ret = EIO;
|
|
||||||
otpd_log_err(ret, "Failed to dump JSON string");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = asprintf(&(data.data), "passkey %s", stmp);
|
|
||||||
if (ret < 0) {
|
|
||||||
ret = ENOMEM;
|
|
||||||
otpd_log_err(ret, "Failed to generate reply string");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
data.length = strlen(data.data);
|
|
||||||
data.magic = 0;
|
|
||||||
|
|
||||||
|
|
||||||
ret = add_krad_attr_to_set(item->req, attrset, &data,
|
|
||||||
krad_attr_name2num("Proxy-State"),
|
|
||||||
"Failed to serialize state to attribute set");
|
|
||||||
if (ret != 0) {
|
|
||||||
otpd_log_err(ret, "Failed to add Proxy-State");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = krad_packet_new_response(ctx.kctx, SECRET,
|
|
||||||
krad_code_name2num("Access-Challenge"),
|
|
||||||
attrset,
|
|
||||||
item->req, &item->rsp);
|
|
||||||
if (ret != 0) {
|
|
||||||
otpd_log_err(ret, "Failed to create radius response");
|
|
||||||
item->rsp = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
|
|
||||||
done:
|
|
||||||
krad_attrset_free(attrset);
|
|
||||||
free(stmp);
|
|
||||||
json_decref(jtmp);
|
|
||||||
|
|
||||||
if (ret != 0) {
|
|
||||||
free(data.data);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int do_passkey_challenge(struct otpd_queue_item *item)
|
|
||||||
{
|
|
||||||
unsigned char *challenge = NULL;
|
|
||||||
int ret;
|
|
||||||
struct passkey_data *d;
|
|
||||||
|
|
||||||
d = item->passkey->data_out;
|
|
||||||
|
|
||||||
d->data.challenge.credential_id_list = ipa_passkey_to_json_array(
|
|
||||||
item->user.ipaPassKey);
|
|
||||||
if (d->data.challenge.credential_id_list == NULL) {
|
|
||||||
return EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Secure by default, assume user verification is enabled and disable it
|
|
||||||
* only if the option is set to 'false'. */
|
|
||||||
d->data.challenge.user_verification = 1;
|
|
||||||
if (item->passkey->ipaRequireUserVerification != NULL
|
|
||||||
&& strcasecmp(item->passkey->ipaRequireUserVerification,
|
|
||||||
"false") == 0) {
|
|
||||||
d->data.challenge.user_verification = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
d->data.challenge.cryptographic_challenge = get_b64_challenge();
|
|
||||||
if (d->data.challenge.cryptographic_challenge == NULL) {
|
|
||||||
ret = ENOMEM;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
d->jdata = json_pack("{s:s, s:o, s:i, s:s}",
|
|
||||||
"domain", item->passkey->domain,
|
|
||||||
"credential_id_list",
|
|
||||||
d->data.challenge.credential_id_list,
|
|
||||||
"user_verification",
|
|
||||||
d->data.challenge.user_verification,
|
|
||||||
"cryptographic_challenge",
|
|
||||||
d->data.challenge.cryptographic_challenge);
|
|
||||||
if (d->jdata == NULL) {
|
|
||||||
ret = EIO;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
d->phase = 1; /* SSS_PASSKEY_PHASE_CHALLENGE */
|
|
||||||
d->state = strdup("ipa_otpd state");
|
|
||||||
|
|
||||||
ret = prepare_rad_reply(item);
|
|
||||||
if (ret != 0) {
|
|
||||||
otpd_log_err(ret, "prepare_rad_reply() failed.");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
done:
|
|
||||||
free(challenge);
|
|
||||||
|
|
||||||
otpd_queue_push(&ctx.stdio.responses, item);
|
|
||||||
verto_set_flags(ctx.stdio.writer, VERTO_EV_FLAG_PERSIST |
|
|
||||||
VERTO_EV_FLAG_IO_ERROR |
|
|
||||||
VERTO_EV_FLAG_IO_READ |
|
|
||||||
VERTO_EV_FLAG_IO_WRITE);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct child_ctx {
|
|
||||||
int read_from_child;
|
|
||||||
int write_to_child;
|
|
||||||
verto_ev *read_ev;
|
|
||||||
verto_ev *write_ev;
|
|
||||||
verto_ev *child_ev;
|
|
||||||
struct otpd_queue_item *item;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void passkey_on_child_writable(verto_ctx *vctx, verto_ev *ev)
|
|
||||||
{
|
|
||||||
(void)vctx; /* Unused */
|
|
||||||
|
|
||||||
/* no input needed */
|
|
||||||
verto_del(ev);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void passkey_on_child_readable(verto_ctx *vctx, verto_ev *ev)
|
|
||||||
{
|
|
||||||
(void)vctx; /* Unused */
|
|
||||||
|
|
||||||
/* no output expected */
|
|
||||||
verto_del(ev);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void passkey_on_child_exit(verto_ctx *vctx, verto_ev *ev)
|
|
||||||
{
|
|
||||||
(void)vctx; /* Unused */
|
|
||||||
int ret;
|
|
||||||
verto_proc_status st;
|
|
||||||
struct child_ctx *child_ctx = NULL;
|
|
||||||
|
|
||||||
child_ctx = (struct child_ctx *) verto_get_private(ev);
|
|
||||||
if (child_ctx == NULL) {
|
|
||||||
otpd_log_err(EINVAL, "Lost child context");
|
|
||||||
verto_del(ev);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Make sure ctx.stdio.responses will at least return an error */
|
|
||||||
child_ctx->item->rsp = NULL;
|
|
||||||
child_ctx->item->sent = 0;
|
|
||||||
|
|
||||||
st = verto_get_proc_status(ev);
|
|
||||||
|
|
||||||
if (!WIFEXITED(st)) {
|
|
||||||
otpd_log_err(0, "Child didn't exit normally.");
|
|
||||||
verto_del(ev);
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The krad req might not be available at this stage anymore, so
|
|
||||||
* otpd_log_err() is used. */
|
|
||||||
otpd_log_err(0, "Child finished with status [%d].", WEXITSTATUS(st));
|
|
||||||
|
|
||||||
verto_del(ev);
|
|
||||||
|
|
||||||
if (WEXITSTATUS(st) != 0) {
|
|
||||||
/* verification failed */
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = krad_packet_new_response(ctx.kctx, SECRET,
|
|
||||||
krad_code_name2num("Access-Accept"), NULL,
|
|
||||||
child_ctx->item->req, &child_ctx->item->rsp);
|
|
||||||
if (ret != 0) {
|
|
||||||
otpd_log_err(ret, "Failed to create radius response");
|
|
||||||
child_ctx->item->rsp = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
|
||||||
otpd_queue_push(&ctx.stdio.responses, child_ctx->item);
|
|
||||||
verto_set_flags(ctx.stdio.writer, VERTO_EV_FLAG_PERSIST |
|
|
||||||
VERTO_EV_FLAG_IO_ERROR |
|
|
||||||
VERTO_EV_FLAG_IO_READ |
|
|
||||||
VERTO_EV_FLAG_IO_WRITE);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void free_child_ctx(verto_ctx *vctx, verto_ev *ev)
|
|
||||||
{
|
|
||||||
(void)vctx; /* Unused */
|
|
||||||
struct child_ctx *child_ctx;
|
|
||||||
|
|
||||||
child_ctx = verto_get_private(ev);
|
|
||||||
|
|
||||||
free(child_ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int set_fd_nonblocking(int fd)
|
|
||||||
{
|
|
||||||
int flags;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
flags = fcntl(fd, F_GETFL, 0);
|
|
||||||
if (flags == -1) {
|
|
||||||
ret = errno;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1) {
|
|
||||||
ret = errno;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef PASSKEY_CHILD_PATH
|
|
||||||
#define PASSKEY_CHILD_PATH "/usr/libexec/sssd/passkey_child"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int do_passkey_response(struct otpd_queue_item *item)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
pid_t child_pid;
|
|
||||||
int pipefd_to_child[2] = { -1, -1};
|
|
||||||
int pipefd_from_child[2] = { -1, -1};
|
|
||||||
/* Up to 50 arguments to the helper supported. The amount of arguments
|
|
||||||
* is controlled inside this function. Right now max used is below 20 */
|
|
||||||
char *args[50] = {NULL};
|
|
||||||
size_t args_idx = 0;
|
|
||||||
struct child_ctx *child_ctx;
|
|
||||||
char *pk = NULL;
|
|
||||||
|
|
||||||
child_ctx = calloc(sizeof(struct child_ctx), 1);
|
|
||||||
if (child_ctx == NULL) {
|
|
||||||
ret = ENOMEM;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
child_ctx->item = item;
|
|
||||||
|
|
||||||
pk = ipa_passkey_get_public_key(item->user.ipaPassKey,
|
|
||||||
item->passkey->data_in->data.response.credential_id);
|
|
||||||
if (pk == NULL) {
|
|
||||||
ret = EINVAL;
|
|
||||||
otpd_log_err(ret, "No matching public key found for [%s]",
|
|
||||||
item->passkey->data_in->data.response.credential_id);
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
args[args_idx++] = PASSKEY_CHILD_PATH;
|
|
||||||
args[args_idx++] = "--verify-assert";
|
|
||||||
args[args_idx++] = "--domain";
|
|
||||||
args[args_idx++] = item->passkey->domain;
|
|
||||||
args[args_idx++] = "--key-handle";
|
|
||||||
args[args_idx++] = item->passkey->data_in->data.response.credential_id;
|
|
||||||
args[args_idx++] = "--public-key";
|
|
||||||
args[args_idx++] = pk;
|
|
||||||
args[args_idx++] = "--cryptographic-challenge";
|
|
||||||
args[args_idx++] = item->passkey->data_in->data.response.cryptographic_challenge;
|
|
||||||
args[args_idx++] = "--auth-data";
|
|
||||||
args[args_idx++] = item->passkey->data_in->data.response.authenticator_data;
|
|
||||||
args[args_idx++] = "--signature";
|
|
||||||
args[args_idx++] = item->passkey->data_in->data.response.assertion_signature;
|
|
||||||
if (item->passkey->ipapasskeyDebugLevelStr != NULL) {
|
|
||||||
args[args_idx++] = "--debug-level";
|
|
||||||
args[args_idx++] = item->passkey->ipapasskeyDebugLevelStr;
|
|
||||||
}
|
|
||||||
if (item->passkey->ipapasskeyDebugFido2) {
|
|
||||||
args[args_idx++] = "--debug-libfido2";
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = pipe(pipefd_from_child);
|
|
||||||
if (ret == -1) {
|
|
||||||
ret = errno;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
ret = pipe(pipefd_to_child);
|
|
||||||
if (ret == -1) {
|
|
||||||
ret = errno;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
child_pid = fork();
|
|
||||||
|
|
||||||
if (child_pid == 0) { /* child */
|
|
||||||
close(pipefd_to_child[1]);
|
|
||||||
ret = dup2(pipefd_to_child[0], STDIN_FILENO);
|
|
||||||
if (ret == -1) {
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
close(pipefd_from_child[0]);
|
|
||||||
ret = dup2(pipefd_from_child[1], STDOUT_FILENO);
|
|
||||||
if (ret == -1) {
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
|
|
||||||
execv(args[0], args);
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
} else if (child_pid > 0) { /* parent */
|
|
||||||
close(pipefd_to_child[0]);
|
|
||||||
set_fd_nonblocking(pipefd_to_child[1]);
|
|
||||||
child_ctx->write_to_child = pipefd_to_child[1];
|
|
||||||
|
|
||||||
close(pipefd_from_child[1]);
|
|
||||||
set_fd_nonblocking(pipefd_from_child[0]);
|
|
||||||
child_ctx->read_from_child = pipefd_from_child[0];
|
|
||||||
|
|
||||||
child_ctx->write_ev = verto_add_io(ctx.vctx, VERTO_EV_FLAG_PERSIST |
|
|
||||||
VERTO_EV_FLAG_IO_CLOSE_FD |
|
|
||||||
VERTO_EV_FLAG_IO_ERROR |
|
|
||||||
VERTO_EV_FLAG_IO_WRITE,
|
|
||||||
passkey_on_child_writable,
|
|
||||||
child_ctx->write_to_child);
|
|
||||||
if (child_ctx->write_ev == NULL) {
|
|
||||||
ret = ENOMEM;
|
|
||||||
otpd_log_err(ret, "Unable to initialize passkey writer event");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
verto_set_private(child_ctx->write_ev, child_ctx, NULL);
|
|
||||||
|
|
||||||
child_ctx->read_ev = verto_add_io(ctx.vctx, VERTO_EV_FLAG_PERSIST |
|
|
||||||
VERTO_EV_FLAG_IO_CLOSE_FD |
|
|
||||||
VERTO_EV_FLAG_IO_ERROR |
|
|
||||||
VERTO_EV_FLAG_IO_READ,
|
|
||||||
passkey_on_child_readable,
|
|
||||||
child_ctx->read_from_child);
|
|
||||||
if (child_ctx->read_ev == NULL) {
|
|
||||||
ret = ENOMEM;
|
|
||||||
otpd_log_err(ret, "Unable to initialize passkey reader event");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
verto_set_private(child_ctx->read_ev, child_ctx, NULL);
|
|
||||||
|
|
||||||
child_ctx->child_ev = verto_add_child(ctx.vctx, VERTO_EV_FLAG_NONE,
|
|
||||||
passkey_on_child_exit, child_pid);
|
|
||||||
verto_set_private(child_ctx->child_ev, child_ctx, free_child_ctx);
|
|
||||||
|
|
||||||
} else { /* error */
|
|
||||||
ret = errno;
|
|
||||||
otpd_log_err(ret, "Failed to fork passkey_child");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
|
|
||||||
done:
|
|
||||||
if (ret != 0) {
|
|
||||||
free(child_ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
int do_passkey(struct otpd_queue_item *item)
|
|
||||||
{
|
|
||||||
if (item == NULL || item->passkey == NULL
|
|
||||||
|| item->passkey->data_in == NULL) {
|
|
||||||
return EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (item->passkey->data_in->phase) {
|
|
||||||
case 0: /* SSS_PASSKEY_PHASE_INIT */
|
|
||||||
return do_passkey_challenge(item);
|
|
||||||
case 2: /* SSS_PASSKEY_PHASE_REPLY */
|
|
||||||
return do_passkey_response(item);
|
|
||||||
default:
|
|
||||||
return EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
+11
-206
@@ -31,29 +31,14 @@
|
|||||||
#define _GNU_SOURCE 1 /* for asprintf() */
|
#define _GNU_SOURCE 1 /* for asprintf() */
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
#define DEFAULT_TIMEOUT 15
|
#define DEFAULT_TIMEOUT 15
|
||||||
#define DEFAULT_RETRIES 3
|
#define DEFAULT_RETRIES 3
|
||||||
|
|
||||||
/* To read passkey configuration and attributes from a different server than
|
|
||||||
* FreeIPA you might have to the following two defines of the search filter
|
|
||||||
* for the global configuration data and the attribute name where if passkey
|
|
||||||
* information is stored in the user entry. Additionally otpd_parse_passkey()
|
|
||||||
* might need some updates depending on how the global configuration is stored
|
|
||||||
* in the configuration objects.
|
|
||||||
*/
|
|
||||||
#define PASSKEY_CONFIG_FILTER "(|(objectclass=ipapasskeyconfigobject)(&(objectclass=domain)(objectclass=domainRelatedObject)))"
|
|
||||||
#define PASSKEY_USER_ATTR "ipapasskey"
|
|
||||||
|
|
||||||
static char *user[] = {
|
static char *user[] = {
|
||||||
"uid",
|
"uid",
|
||||||
"ipatokenRadiusUserName",
|
"ipatokenRadiusUserName",
|
||||||
"ipatokenRadiusConfigLink",
|
"ipatokenRadiusConfigLink",
|
||||||
"ipaidpSub",
|
|
||||||
"ipaidpConfigLink",
|
|
||||||
"ipauserauthtype",
|
|
||||||
PASSKEY_USER_ATTR,
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -66,37 +51,6 @@ static char *radius[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *idp[] = {
|
|
||||||
"ipaidpClientID",
|
|
||||||
"ipaidpClientSecret",
|
|
||||||
"ipaidpIssuerURL",
|
|
||||||
"ipaidpDevAuthEndpoint",
|
|
||||||
"ipaidpTokenEndpoint",
|
|
||||||
"ipaidpUserInfoEndpoint",
|
|
||||||
"ipaidpKeysEndpoint",
|
|
||||||
"ipaidpScope",
|
|
||||||
"ipaidpSub",
|
|
||||||
"cn",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
bool auth_type_is(char **auth_types, const char *check)
|
|
||||||
{
|
|
||||||
size_t c;
|
|
||||||
|
|
||||||
if (auth_types == NULL || check == NULL) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(c = 0; auth_types[c] != NULL; c++) {
|
|
||||||
if (strcasecmp(auth_types[c], check) == 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Send queued LDAP requests to the server. */
|
/* Send queued LDAP requests to the server. */
|
||||||
static void on_query_writable(verto_ctx *vctx, verto_ev *ev)
|
static void on_query_writable(verto_ctx *vctx, verto_ev *ev)
|
||||||
{
|
{
|
||||||
@@ -122,7 +76,6 @@ static void on_query_writable(verto_ctx *vctx, verto_ev *ev)
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
otpd_log_req(item->req, "user query start");
|
otpd_log_req(item->req, "user query start");
|
||||||
item->ldap_query = LDAP_QUERY_USER;
|
|
||||||
|
|
||||||
if (asprintf(&filter, "(&(objectClass=Person)(krbPrincipalName=%*s))",
|
if (asprintf(&filter, "(&(objectClass=Person)(krbPrincipalName=%*s))",
|
||||||
princ->length, princ->data) < 0)
|
princ->length, princ->data) < 0)
|
||||||
@@ -133,28 +86,9 @@ static void on_query_writable(verto_ctx *vctx, verto_ev *ev)
|
|||||||
NULL, NULL, 1, &item->msgid);
|
NULL, NULL, 1, &item->msgid);
|
||||||
free(filter);
|
free(filter);
|
||||||
|
|
||||||
} else if (item->get_passkey_config) {
|
|
||||||
otpd_log_req(item->req, "passkey config query start:");
|
|
||||||
item->ldap_query = LDAP_QUERY_PASSKEY;
|
|
||||||
|
|
||||||
i = ldap_search_ext(verto_get_private(ev), ctx.query.base,
|
|
||||||
LDAP_SCOPE_SUBTREE, PASSKEY_CONFIG_FILTER, NULL, 0, NULL,
|
|
||||||
NULL, NULL, 0, &item->msgid);
|
|
||||||
|
|
||||||
} else if (auth_type_is(item->user.ipauserauthtypes, "idp")) {
|
|
||||||
otpd_log_req(item->req, "idp query start: %s",
|
|
||||||
item->user.ipaidpConfigLink);
|
|
||||||
item->ldap_query = LDAP_QUERY_IDP;
|
|
||||||
|
|
||||||
i = ldap_search_ext(verto_get_private(ev),
|
|
||||||
item->user.ipaidpConfigLink,
|
|
||||||
LDAP_SCOPE_BASE, NULL, idp, 0, NULL,
|
|
||||||
NULL, NULL, 1, &item->msgid);
|
|
||||||
|
|
||||||
} else if (item->radius.ipatokenRadiusSecret == NULL) {
|
} else if (item->radius.ipatokenRadiusSecret == NULL) {
|
||||||
otpd_log_req(item->req, "radius query start: %s",
|
otpd_log_req(item->req, "radius query start: %s",
|
||||||
item->user.ipatokenRadiusConfigLink);
|
item->user.ipatokenRadiusConfigLink);
|
||||||
item->ldap_query = LDAP_QUERY_RADIUS;
|
|
||||||
|
|
||||||
i = ldap_search_ext(verto_get_private(ev),
|
i = ldap_search_ext(verto_get_private(ev),
|
||||||
item->user.ipatokenRadiusConfigLink,
|
item->user.ipatokenRadiusConfigLink,
|
||||||
@@ -164,7 +98,6 @@ static void on_query_writable(verto_ctx *vctx, verto_ev *ev)
|
|||||||
} else if (item->radius.ipatokenUserMapAttribute != NULL) {
|
} else if (item->radius.ipatokenUserMapAttribute != NULL) {
|
||||||
otpd_log_req(item->req, "username query start: %s",
|
otpd_log_req(item->req, "username query start: %s",
|
||||||
item->radius.ipatokenUserMapAttribute);
|
item->radius.ipatokenUserMapAttribute);
|
||||||
item->ldap_query = LDAP_QUERY_RADIUS_USERMAP;
|
|
||||||
|
|
||||||
attrs[0] = item->radius.ipatokenUserMapAttribute;
|
attrs[0] = item->radius.ipatokenUserMapAttribute;
|
||||||
attrs[1] = NULL;
|
attrs[1] = NULL;
|
||||||
@@ -174,6 +107,7 @@ static void on_query_writable(verto_ctx *vctx, verto_ev *ev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (i == LDAP_SUCCESS) {
|
if (i == LDAP_SUCCESS) {
|
||||||
|
item->sent++;
|
||||||
push = &ctx.query.responses;
|
push = &ctx.query.responses;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,78 +115,6 @@ error:
|
|||||||
otpd_queue_push(push, item);
|
otpd_queue_push(push, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum oauth2_state get_oauth2_state(enum ldap_query ldap_query,
|
|
||||||
struct otpd_queue_item *item)
|
|
||||||
{
|
|
||||||
const krb5_data *data_pwd;
|
|
||||||
const krb5_data *data_state;
|
|
||||||
enum oauth2_state oauth2_state = OAUTH2_NO;
|
|
||||||
|
|
||||||
data_pwd = krad_packet_get_attr(item->req,
|
|
||||||
krad_attr_name2num("User-Password"), 0);
|
|
||||||
data_state = krad_packet_get_attr(item->req,
|
|
||||||
krad_attr_name2num("Proxy-State"), 0);
|
|
||||||
|
|
||||||
if (data_pwd == NULL && data_state == NULL) {
|
|
||||||
oauth2_state = OAUTH2_GET_DEVICE_CODE;
|
|
||||||
} else if (data_pwd == NULL && data_state != NULL) {
|
|
||||||
oauth2_state = OAUTH2_GET_ACCESS_TOKEN;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Looks like caller does not expect oauth2 authentication */
|
|
||||||
if (oauth2_state == OAUTH2_NO) {
|
|
||||||
return oauth2_state;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ldap_query == LDAP_QUERY_USER) {
|
|
||||||
/* Check the user entry for required attributes */
|
|
||||||
if (item->user.ipaidpSub == NULL) {
|
|
||||||
oauth2_state = OAUTH2_NO;
|
|
||||||
otpd_log_req(item->req,
|
|
||||||
"OAuth2 not possible, Missing 'sub' in user entry");
|
|
||||||
}
|
|
||||||
if (item->user.ipaidpConfigLink == NULL) {
|
|
||||||
oauth2_state = OAUTH2_NO;
|
|
||||||
otpd_log_req(item->req,
|
|
||||||
"OAuth2 not possible, Missing issuer in user entry");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (oauth2_state != OAUTH2_NO) {
|
|
||||||
/* Next step is to lookup IdP data */
|
|
||||||
oauth2_state = OAUTH2_GET_ISSUER;
|
|
||||||
}
|
|
||||||
} else if (ldap_query == LDAP_QUERY_IDP) {
|
|
||||||
/* Check the idp entry for required attributes */
|
|
||||||
if (item->idp.ipaidpIssuerURL == NULL) {
|
|
||||||
if (item->idp.ipaidpDevAuthEndpoint == NULL) {
|
|
||||||
oauth2_state = OAUTH2_NO;
|
|
||||||
otpd_log_req(item->req,
|
|
||||||
"OAuth2 not possible, "
|
|
||||||
"Missing authentication end-point in idp entry");
|
|
||||||
}
|
|
||||||
if (item->idp.ipaidpTokenEndpoint == NULL) {
|
|
||||||
oauth2_state = OAUTH2_NO;
|
|
||||||
otpd_log_req(item->req,
|
|
||||||
"OAuth2 not possible, "
|
|
||||||
"Missing access token end-point in idp entry");
|
|
||||||
}
|
|
||||||
if (item->idp.ipaidpUserInfoEndpoint == NULL) {
|
|
||||||
oauth2_state = OAUTH2_NO;
|
|
||||||
otpd_log_req(item->req,
|
|
||||||
"OAuth2 not possible, "
|
|
||||||
"Missing userinfo end-point in idp entry");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (item->idp.ipaidpClientID == NULL) {
|
|
||||||
oauth2_state = OAUTH2_NO;
|
|
||||||
otpd_log_req(item->req,
|
|
||||||
"OAuth2 not possible, Missing client ID in idp entry");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return oauth2_state;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Read LDAP responses from the server. */
|
/* Read LDAP responses from the server. */
|
||||||
static void on_query_readable(verto_ctx *vctx, verto_ev *ev)
|
static void on_query_readable(verto_ctx *vctx, verto_ev *ev)
|
||||||
{
|
{
|
||||||
@@ -264,7 +126,6 @@ static void on_query_readable(verto_ctx *vctx, verto_ev *ev)
|
|||||||
LDAP *ldp;
|
LDAP *ldp;
|
||||||
int i;
|
int i;
|
||||||
(void)vctx;
|
(void)vctx;
|
||||||
enum oauth2_state oauth2_state;
|
|
||||||
|
|
||||||
ldp = verto_get_private(ev);
|
ldp = verto_get_private(ev);
|
||||||
|
|
||||||
@@ -289,22 +150,16 @@ static void on_query_readable(verto_ctx *vctx, verto_ev *ev)
|
|||||||
goto egress;
|
goto egress;
|
||||||
|
|
||||||
err = NULL;
|
err = NULL;
|
||||||
switch (item->ldap_query) {
|
switch (item->sent) {
|
||||||
case LDAP_QUERY_USER:
|
case 1:
|
||||||
err = otpd_parse_user(ldp, entry, item);
|
err = otpd_parse_user(ldp, entry, item);
|
||||||
break;
|
break;
|
||||||
case LDAP_QUERY_RADIUS:
|
case 2:
|
||||||
err = otpd_parse_radius(ldp, entry, item);
|
err = otpd_parse_radius(ldp, entry, item);
|
||||||
break;
|
break;
|
||||||
case LDAP_QUERY_RADIUS_USERMAP:
|
case 3:
|
||||||
err = otpd_parse_radius_username(ldp, entry, item);
|
err = otpd_parse_radius_username(ldp, entry, item);
|
||||||
break;
|
break;
|
||||||
case LDAP_QUERY_IDP:
|
|
||||||
err = otpd_parse_idp(ldp, entry, item);
|
|
||||||
break;
|
|
||||||
case LDAP_QUERY_PASSKEY:
|
|
||||||
err = otpd_parse_passkey(ldp, entry, item);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
ldap_msgfree(entry);
|
ldap_msgfree(entry);
|
||||||
goto egress;
|
goto egress;
|
||||||
@@ -326,14 +181,14 @@ static void on_query_readable(verto_ctx *vctx, verto_ev *ev)
|
|||||||
|
|
||||||
item->msgid = -1;
|
item->msgid = -1;
|
||||||
|
|
||||||
switch (item->ldap_query) {
|
switch (item->sent) {
|
||||||
case LDAP_QUERY_USER:
|
case 1:
|
||||||
otpd_log_req(item->req, "user query end: %s",
|
otpd_log_req(item->req, "user query end: %s",
|
||||||
item->error == NULL ? item->user.dn : item->error);
|
item->error == NULL ? item->user.dn : item->error);
|
||||||
if (item->user.dn == NULL || item->user.uid == NULL)
|
if (item->user.dn == NULL || item->user.uid == NULL)
|
||||||
goto egress;
|
goto egress;
|
||||||
break;
|
break;
|
||||||
case LDAP_QUERY_RADIUS:
|
case 2:
|
||||||
otpd_log_req(item->req, "radius query end: %s",
|
otpd_log_req(item->req, "radius query end: %s",
|
||||||
item->error == NULL
|
item->error == NULL
|
||||||
? item->radius.ipatokenRadiusServer
|
? item->radius.ipatokenRadiusServer
|
||||||
@@ -342,72 +197,22 @@ static void on_query_readable(verto_ctx *vctx, verto_ev *ev)
|
|||||||
item->radius.ipatokenRadiusSecret == NULL)
|
item->radius.ipatokenRadiusSecret == NULL)
|
||||||
goto egress;
|
goto egress;
|
||||||
break;
|
break;
|
||||||
case LDAP_QUERY_RADIUS_USERMAP:
|
case 3:
|
||||||
otpd_log_req(item->req, "username query end: %s",
|
otpd_log_req(item->req, "username query end: %s",
|
||||||
item->error == NULL ? item->user.other : item->error);
|
item->error == NULL ? item->user.other : item->error);
|
||||||
break;
|
break;
|
||||||
case LDAP_QUERY_IDP:
|
|
||||||
otpd_log_req(item->req, "idp query end: %s",
|
|
||||||
item->error == NULL ? item->idp.name : item->error);
|
|
||||||
if (!item->idp.valid) {
|
|
||||||
goto egress;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case LDAP_QUERY_PASSKEY:
|
|
||||||
otpd_log_req(item->req, "passkey query end: %s",
|
|
||||||
item->error == NULL ? "ok" : item->error);
|
|
||||||
if (item->passkey == NULL) {
|
|
||||||
goto egress;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
goto egress;
|
goto egress;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for passkey */
|
|
||||||
if (is_passkey(item)) {
|
|
||||||
if (item->ldap_query == LDAP_QUERY_USER) {
|
|
||||||
item->get_passkey_config = true;
|
|
||||||
|
|
||||||
push = &ctx.query.requests;
|
|
||||||
event = ctx.query.io;
|
|
||||||
goto egress;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = do_passkey(item);
|
|
||||||
if (i != 0) {
|
|
||||||
goto egress;
|
|
||||||
}
|
|
||||||
/* do_passkey will call ctx.stdio.writer, so we can return here */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check for oauth2 */
|
|
||||||
oauth2_state = get_oauth2_state(item->ldap_query, item);
|
|
||||||
if (oauth2_state == OAUTH2_GET_ISSUER) {
|
|
||||||
push = &ctx.query.requests;
|
|
||||||
event = ctx.query.io;
|
|
||||||
goto egress;
|
|
||||||
} else if (oauth2_state != OAUTH2_NO) {
|
|
||||||
i = oauth2(&item, oauth2_state);
|
|
||||||
if (i != 0) {
|
|
||||||
goto egress;
|
|
||||||
} else {
|
|
||||||
/* oauth2 will call ctx.stdio.writer, so we can return here */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item->error != NULL)
|
if (item->error != NULL)
|
||||||
goto egress;
|
goto egress;
|
||||||
|
|
||||||
if (item->ldap_query == LDAP_QUERY_USER &&
|
if (item->sent == 1 && item->user.ipatokenRadiusConfigLink != NULL) {
|
||||||
item->user.ipatokenRadiusConfigLink != NULL) {
|
|
||||||
|
|
||||||
push = &ctx.query.requests;
|
push = &ctx.query.requests;
|
||||||
event = ctx.query.io;
|
event = ctx.query.io;
|
||||||
goto egress;
|
goto egress;
|
||||||
} else if (item->ldap_query == LDAP_QUERY_RADIUS &&
|
} else if (item->sent == 2 &&
|
||||||
item->radius.ipatokenUserMapAttribute != NULL &&
|
item->radius.ipatokenUserMapAttribute != NULL &&
|
||||||
item->user.ipatokenRadiusUserName == NULL) {
|
item->user.ipatokenRadiusUserName == NULL) {
|
||||||
push = &ctx.query.requests;
|
push = &ctx.query.requests;
|
||||||
|
|||||||
@@ -46,8 +46,6 @@ krb5_error_code otpd_queue_item_new(krad_packet *req,
|
|||||||
|
|
||||||
void otpd_queue_item_free(struct otpd_queue_item *item)
|
void otpd_queue_item_free(struct otpd_queue_item *item)
|
||||||
{
|
{
|
||||||
size_t c;
|
|
||||||
|
|
||||||
if (item == NULL)
|
if (item == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -56,40 +54,12 @@ void otpd_queue_item_free(struct otpd_queue_item *item)
|
|||||||
free(item->user.ipatokenRadiusUserName);
|
free(item->user.ipatokenRadiusUserName);
|
||||||
free(item->user.ipatokenRadiusConfigLink);
|
free(item->user.ipatokenRadiusConfigLink);
|
||||||
free(item->user.other);
|
free(item->user.other);
|
||||||
free(item->user.ipaidpSub);
|
|
||||||
free(item->user.ipaidpConfigLink);
|
|
||||||
if (item->user.ipauserauthtypes != NULL) {
|
|
||||||
for (c = 0; item->user.ipauserauthtypes[c] != NULL; c++) {
|
|
||||||
free(item->user.ipauserauthtypes[c]);
|
|
||||||
}
|
|
||||||
free(item->user.ipauserauthtypes);
|
|
||||||
}
|
|
||||||
free(item->radius.ipatokenRadiusServer);
|
free(item->radius.ipatokenRadiusServer);
|
||||||
free(item->radius.ipatokenRadiusSecret);
|
free(item->radius.ipatokenRadiusSecret);
|
||||||
free(item->radius.ipatokenUserMapAttribute);
|
free(item->radius.ipatokenUserMapAttribute);
|
||||||
free(item->idp.ipaidpIssuerURL);
|
|
||||||
free(item->idp.ipaidpDevAuthEndpoint);
|
|
||||||
free(item->idp.ipaidpTokenEndpoint);
|
|
||||||
free(item->idp.ipaidpUserInfoEndpoint);
|
|
||||||
free(item->idp.ipaidpKeysEndpoint);
|
|
||||||
free(item->idp.name);
|
|
||||||
free(item->idp.ipaidpClientID);
|
|
||||||
if (item->idp.ipaidpClientSecret != NULL) {
|
|
||||||
size_t len = strlen(item->idp.ipaidpClientSecret);
|
|
||||||
(void*) memset(item->idp.ipaidpClientSecret, 0, len);
|
|
||||||
free(item->idp.ipaidpClientSecret);
|
|
||||||
}
|
|
||||||
free(item->idp.ipaidpScope);
|
|
||||||
free(item->idp.ipaidpSub);
|
|
||||||
free(item->idp.ipaidpDebugLevelStr);
|
|
||||||
free(item->oauth2.device_code_reply);
|
|
||||||
free(item->oauth2.state.data);
|
|
||||||
free(item->error);
|
free(item->error);
|
||||||
krad_packet_free(item->req);
|
krad_packet_free(item->req);
|
||||||
krad_packet_free(item->rsp);
|
krad_packet_free(item->rsp);
|
||||||
|
|
||||||
free_otpd_queue_item_passkey(item);
|
|
||||||
|
|
||||||
free(item);
|
free(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,6 @@ void otpd_on_stdout_writable(verto_ctx *vctx, verto_ev *ev)
|
|||||||
|
|
||||||
/* Send the packet. */
|
/* Send the packet. */
|
||||||
data = krad_packet_encode(item->rsp);
|
data = krad_packet_encode(item->rsp);
|
||||||
otpd_log_req(item->req, "sent: %d data: %d", item->sent, data->length);
|
|
||||||
i = write(verto_get_fd(ev), data->data + item->sent,
|
i = write(verto_get_fd(ev), data->data + item->sent,
|
||||||
data->length - item->sent);
|
data->length - item->sent);
|
||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
@@ -192,7 +191,6 @@ void otpd_on_stdout_writable(verto_ctx *vctx, verto_ev *ev)
|
|||||||
|
|
||||||
/* If the packet was completely sent, free the response. */
|
/* If the packet was completely sent, free the response. */
|
||||||
item->sent += i;
|
item->sent += i;
|
||||||
otpd_log_req(item->req, "..sent: %d data: %d", item->sent, data->length);
|
|
||||||
if (item->sent == data->length) {
|
if (item->sent == data->length) {
|
||||||
otpd_log_req(item->req, "response sent: %s",
|
otpd_log_req(item->req, "response sent: %s",
|
||||||
krad_code_num2name(krad_packet_get_code(item->rsp)));
|
krad_code_num2name(krad_packet_get_code(item->rsp)));
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ def main():
|
|||||||
rsp.DecodePacket(buf)
|
rsp.DecodePacket(buf)
|
||||||
pkt.VerifyReply(rsp)
|
pkt.VerifyReply(rsp)
|
||||||
|
|
||||||
proc.terminate()
|
proc.terminate() # pylint: disable=E1101
|
||||||
proc.wait()
|
proc.wait()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
+41
-118
@@ -2728,7 +2728,7 @@ static NTSTATUS get_trust_pwd(TALLOC_CTX *mem_ctx, const DATA_BLOB *auth_blob,
|
|||||||
if (iopw.count != 0 && iopw.current.count != 0 &&
|
if (iopw.count != 0 && iopw.current.count != 0 &&
|
||||||
iopw.current.array[0].AuthType == TRUST_AUTH_TYPE_CLEAR) {
|
iopw.current.array[0].AuthType == TRUST_AUTH_TYPE_CLEAR) {
|
||||||
if (pwd != NULL) {
|
if (pwd != NULL) {
|
||||||
if (!convert_string_talloc(tmp_ctx, CH_UTF16LE, CH_UNIX,
|
if (!convert_string_talloc(tmp_ctx, CH_UTF16, CH_UNIX,
|
||||||
iopw.current.array[0].AuthInfo.clear.password,
|
iopw.current.array[0].AuthInfo.clear.password,
|
||||||
iopw.current.array[0].AuthInfo.clear.size,
|
iopw.current.array[0].AuthInfo.clear.size,
|
||||||
&trustpw, &converted_size)) {
|
&trustpw, &converted_size)) {
|
||||||
@@ -3581,14 +3581,12 @@ static bool init_sam_from_ldap(struct ipasam_private *ipasam_state,
|
|||||||
bool ret = false;
|
bool ret = false;
|
||||||
bool retval = false;
|
bool retval = false;
|
||||||
bool machine_account = false;
|
bool machine_account = false;
|
||||||
bool trusted_domain = false;
|
|
||||||
int status;
|
int status;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
size_t conv_size = 0;
|
size_t conv_size = 0;
|
||||||
DATA_BLOB nthash;
|
DATA_BLOB nthash;
|
||||||
struct dom_sid *group_sid;
|
struct dom_sid *group_sid;
|
||||||
uint32_t acct_flags = 0;
|
|
||||||
|
|
||||||
TALLOC_CTX *tmp_ctx = talloc_init("init_sam_from_ldap");
|
TALLOC_CTX *tmp_ctx = talloc_init("init_sam_from_ldap");
|
||||||
if (!tmp_ctx) {
|
if (!tmp_ctx) {
|
||||||
@@ -3615,15 +3613,17 @@ static bool init_sam_from_ldap(struct ipasam_private *ipasam_state,
|
|||||||
}
|
}
|
||||||
|
|
||||||
len = ldap_count_values_len(usernames);
|
len = ldap_count_values_len(usernames);
|
||||||
/* Extract machine account as a user name if exists.
|
if (len > 1) {
|
||||||
* If not, extract the first returned value */
|
/* Extract machine account as a user name if exists.
|
||||||
for (int i=0; i < len; i++) {
|
* If not, extract the first returned value */
|
||||||
if (usernames[i] != NULL &&
|
for (int i=0; i < len; i++) {
|
||||||
usernames[i]->bv_len > 0 &&
|
if (usernames[i] != NULL &&
|
||||||
usernames[i]->bv_val[usernames[i]->bv_len-1] == '$') {
|
usernames[i]->bv_len > 0 &&
|
||||||
idx = i;
|
usernames[i]->bv_val[usernames[i]->bv_len-1] == '$') {
|
||||||
machine_account = true;
|
idx = i;
|
||||||
break;
|
machine_account = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3644,31 +3644,6 @@ static bool init_sam_from_ldap(struct ipasam_private *ipasam_state,
|
|||||||
|
|
||||||
DEBUG(2, ("init_sam_from_ldap: Entry found for user: %s\n", username));
|
DEBUG(2, ("init_sam_from_ldap: Entry found for user: %s\n", username));
|
||||||
|
|
||||||
if (machine_account) {
|
|
||||||
/* it may also be a TDO account */
|
|
||||||
struct berval **oclasses = NULL;
|
|
||||||
oclasses = ldap_get_values_len(priv2ld(ipasam_state), entry,
|
|
||||||
LDAP_ATTRIBUTE_OBJECTCLASS);
|
|
||||||
int c = 0;
|
|
||||||
if (oclasses == NULL) {
|
|
||||||
DEBUG(1, ("Cannot find any objectclasses.\n"));
|
|
||||||
goto fn_exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (c = 0; oclasses[c] != NULL; c++) {
|
|
||||||
if (strncasecmp(LDAP_OBJ_TRUSTED_DOMAIN, oclasses[c]->bv_val,
|
|
||||||
oclasses[c]->bv_len) == 0) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (oclasses[c] != NULL) {
|
|
||||||
trusted_domain = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
ldap_value_free_len(oclasses);
|
|
||||||
}
|
|
||||||
|
|
||||||
nt_username = talloc_strdup(tmp_ctx, username);
|
nt_username = talloc_strdup(tmp_ctx, username);
|
||||||
if (!nt_username) {
|
if (!nt_username) {
|
||||||
goto fn_exit;
|
goto fn_exit;
|
||||||
@@ -3737,94 +3712,42 @@ static bool init_sam_from_ldap(struct ipasam_private *ipasam_state,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* set correct account type */
|
/* Force machine accounts to be workstation trust type */
|
||||||
acct_flags = trusted_domain ? ACB_DOMTRUST :
|
pdb_set_acct_ctrl(sampass, machine_account ? ACB_WSTRUST : ACB_NORMAL,
|
||||||
(machine_account ? ACB_WSTRUST : ACB_NORMAL);
|
PDB_SET);
|
||||||
pdb_set_acct_ctrl(sampass, acct_flags, PDB_SET);
|
|
||||||
|
|
||||||
if (trusted_domain) {
|
retval = smbldap_talloc_single_blob(tmp_ctx,
|
||||||
DATA_BLOB trust_auth_incoming = {0};
|
priv2ld(ipasam_state),
|
||||||
char *pass = NULL;
|
entry, LDAP_ATTRIBUTE_NTHASH,
|
||||||
NTSTATUS xstatus;
|
&nthash);
|
||||||
|
if (!retval) {
|
||||||
retval = false;
|
/* NT Hash is not in place. Attempt to retrieve it from
|
||||||
if (smbldap_talloc_single_blob(tmp_ctx,
|
* the RC4-HMAC key if that exists in Kerberos credentials.
|
||||||
priv2ld(ipasam_state), entry,
|
* IPA 389-ds plugin allows to ask for it by setting
|
||||||
LDAP_ATTRIBUTE_TRUST_AUTH_INCOMING,
|
* ipaNTHash to MagicRegen value.
|
||||||
&trust_auth_incoming)) {
|
* */
|
||||||
xstatus = get_trust_pwd(tmp_ctx, &trust_auth_incoming,
|
temp = smbldap_talloc_dn(tmp_ctx, priv2ld(ipasam_state), entry);
|
||||||
&pass, NULL);
|
if (temp) {
|
||||||
if (NT_STATUS_IS_OK(xstatus)) {
|
retval = ipasam_nthash_regen(ipasam_state,
|
||||||
uint8_t key[NT_HASH_LEN];
|
tmp_ctx, temp);
|
||||||
volatile char *p = (void *) pass;
|
if (retval) {
|
||||||
size_t plen = strlen(pass);
|
retval = ipasam_nthash_retrieve(ipasam_state,
|
||||||
|
tmp_ctx, temp, &nthash);
|
||||||
if (E_md4hash(pass, key)) {
|
|
||||||
volatile char *q = (void *) key;
|
|
||||||
size_t qlen = NT_HASH_LEN;
|
|
||||||
|
|
||||||
nthash.data = talloc_memdup(tmp_ctx, key, NT_HASH_LEN);
|
|
||||||
nthash.length = NT_HASH_LEN;
|
|
||||||
|
|
||||||
retval = nthash.data != NULL;
|
|
||||||
|
|
||||||
while (qlen--) {
|
|
||||||
*q++ = '\0';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while (plen--) {
|
|
||||||
*p++ = '\0';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
DEBUG(9, ("Failed to get incoming auth info.\n"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
retval = smbldap_talloc_single_blob(tmp_ctx,
|
|
||||||
priv2ld(ipasam_state),
|
|
||||||
entry, LDAP_ATTRIBUTE_NTHASH,
|
|
||||||
&nthash);
|
|
||||||
if (!retval) {
|
|
||||||
/* NT Hash is not in place. Attempt to retrieve it from
|
|
||||||
* the RC4-HMAC key if that exists in Kerberos credentials.
|
|
||||||
* IPA 389-ds plugin allows to ask for it by setting
|
|
||||||
* ipaNTHash to MagicRegen value.
|
|
||||||
* */
|
|
||||||
temp = smbldap_talloc_dn(tmp_ctx, priv2ld(ipasam_state), entry);
|
|
||||||
if (temp) {
|
|
||||||
retval = ipasam_nthash_regen(ipasam_state,
|
|
||||||
tmp_ctx, temp);
|
|
||||||
if (retval) {
|
|
||||||
retval = ipasam_nthash_retrieve(ipasam_state,
|
|
||||||
tmp_ctx, temp, &nthash);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (retval) {
|
if (!retval) {
|
||||||
if (nthash.length != NT_HASH_LEN && nthash.length != 0) {
|
|
||||||
DEBUG(5, ("NT hash from LDAP has the wrong size. "
|
|
||||||
"Perhaps password was not re-set?\n"));
|
|
||||||
} else {
|
|
||||||
volatile char *q = (void *) nthash.data;
|
|
||||||
size_t qlen = nthash.length;
|
|
||||||
|
|
||||||
if (!pdb_set_nt_passwd(sampass, nthash.data, PDB_SET)) {
|
|
||||||
DEBUG(5, ("Failed to set NT hash.\n"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (q != NULL) {
|
|
||||||
/* nthash.length might be 0 on this path,
|
|
||||||
* we want to skip in this case */
|
|
||||||
while (nthash.length && qlen--) {
|
|
||||||
*q++ = '\0';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
DEBUG(5, ("Failed to read NT hash form LDAP response.\n"));
|
DEBUG(5, ("Failed to read NT hash form LDAP response.\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nthash.length != NT_HASH_LEN && nthash.length != 0) {
|
||||||
|
DEBUG(5, ("NT hash from LDAP has the wrong size. Perhaps password was not re-set?\n"));
|
||||||
|
} else {
|
||||||
|
if (!pdb_set_nt_passwd(sampass, nthash.data, PDB_SET)) {
|
||||||
|
DEBUG(5, ("Failed to set NT hash.\n"));
|
||||||
|
}
|
||||||
|
}
|
||||||
/* FIXME: */
|
/* FIXME: */
|
||||||
if (!pdb_set_pass_last_set_time(sampass, (time_t) 1, PDB_SET)) {
|
if (!pdb_set_pass_last_set_time(sampass, (time_t) 1, PDB_SET)) {
|
||||||
DEBUG(5, ("Failed to set last time set.\n"));
|
DEBUG(5, ("Failed to set last time set.\n"));
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ SUBDIRS = \
|
|||||||
ipa-cldap \
|
ipa-cldap \
|
||||||
ipa-dns \
|
ipa-dns \
|
||||||
ipa-enrollment \
|
ipa-enrollment \
|
||||||
ipa-graceperiod \
|
|
||||||
ipa-lockout \
|
ipa-lockout \
|
||||||
ipa-modrdn \
|
ipa-modrdn \
|
||||||
ipa-otp-counter \
|
ipa-otp-counter \
|
||||||
|
|||||||
@@ -287,7 +287,6 @@ done:
|
|||||||
ipa_cldap_respond(ctx, req, &reply);
|
ipa_cldap_respond(ctx, req, &reply);
|
||||||
|
|
||||||
ipa_cldap_free_kvps(&req->kvps);
|
ipa_cldap_free_kvps(&req->kvps);
|
||||||
free(reply.bv_val);
|
|
||||||
free(req);
|
free(req);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -503,8 +503,8 @@ void test_pack_ber_user_timeout(void **state)
|
|||||||
oldgetgrgid_r = test_data->ctx->nss_ctx->getgrgid_r;
|
oldgetgrgid_r = test_data->ctx->nss_ctx->getgrgid_r;
|
||||||
test_data->ctx->nss_ctx->getgrgid_r = getgrgid_r_timeout;
|
test_data->ctx->nss_ctx->getgrgid_r = getgrgid_r_timeout;
|
||||||
|
|
||||||
ret = pack_ber_user(test_data->ctx, RESP_USER_GROUPLIST, TEST_DOMAIN_NAME,
|
ret = pack_ber_user(test_data->ctx, RESP_USER_GROUPLIST,
|
||||||
"member001@"TEST_DOMAIN_NAME, 12345, 54321,
|
TEST_DOMAIN_NAME, "member001", 12345, 54321,
|
||||||
"gecos", "homedir", "shell", NULL, &resp_val);
|
"gecos", "homedir", "shell", NULL, &resp_val);
|
||||||
test_data->ctx->nss_ctx->getgrgid_r = oldgetgrgid_r;
|
test_data->ctx->nss_ctx->getgrgid_r = oldgetgrgid_r;
|
||||||
assert_int_equal(ret, LDAP_TIMELIMIT_EXCEEDED);
|
assert_int_equal(ret, LDAP_TIMELIMIT_EXCEEDED);
|
||||||
@@ -548,17 +548,15 @@ void test_encode(void **state)
|
|||||||
assert_memory_equal(res_nam, resp_val->bv_val, resp_val->bv_len);
|
assert_memory_equal(res_nam, resp_val->bv_val, resp_val->bv_len);
|
||||||
ber_bvfree(resp_val);
|
ber_bvfree(resp_val);
|
||||||
|
|
||||||
ret = pack_ber_user(ctx, RESP_USER, TEST_DOMAIN_NAME,
|
ret = pack_ber_user(ctx, RESP_USER, TEST_DOMAIN_NAME, "test", 12345, 54321,
|
||||||
"test@"TEST_DOMAIN_NAME, 12345, 54321, NULL, NULL,
|
NULL, NULL, NULL, NULL, &resp_val);
|
||||||
NULL, NULL, &resp_val);
|
|
||||||
assert_int_equal(ret, LDAP_SUCCESS);
|
assert_int_equal(ret, LDAP_SUCCESS);
|
||||||
assert_int_equal(sizeof(res_uid), resp_val->bv_len);
|
assert_int_equal(sizeof(res_uid), resp_val->bv_len);
|
||||||
assert_memory_equal(res_uid, resp_val->bv_val, resp_val->bv_len);
|
assert_memory_equal(res_uid, resp_val->bv_val, resp_val->bv_len);
|
||||||
ber_bvfree(resp_val);
|
ber_bvfree(resp_val);
|
||||||
|
|
||||||
ret = pack_ber_group(RESP_GROUP, TEST_DOMAIN_NAME,
|
ret = pack_ber_group(RESP_GROUP, TEST_DOMAIN_NAME, "test_group", 54321,
|
||||||
"test_group@"TEST_DOMAIN_NAME, 54321, NULL, NULL,
|
NULL, NULL, &resp_val);
|
||||||
&resp_val);
|
|
||||||
assert_int_equal(ret, LDAP_SUCCESS);
|
assert_int_equal(ret, LDAP_SUCCESS);
|
||||||
assert_int_equal(sizeof(res_gid), resp_val->bv_len);
|
assert_int_equal(sizeof(res_gid), resp_val->bv_len);
|
||||||
assert_memory_equal(res_gid, resp_val->bv_val, resp_val->bv_len);
|
assert_memory_equal(res_gid, resp_val->bv_val, resp_val->bv_len);
|
||||||
|
|||||||
@@ -41,7 +41,6 @@
|
|||||||
#define _GNU_SOURCE 1 /* for asprintf() */
|
#define _GNU_SOURCE 1 /* for asprintf() */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@@ -50,14 +49,6 @@
|
|||||||
#include "back_extdom.h"
|
#include "back_extdom.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
#if defined HAVE_DECL_SSS_NSS_GETORIGBYUSERNAME_TIMEOUT && !HAVE_DECL_SSS_NSS_GETORIGBYUSERNAME_TIMEOUT
|
|
||||||
#define sss_nss_getorigbyusername_timeout sss_nss_getorigbyname_timeout
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined HAVE_DECL_SSS_NSS_GETORIGBYGROUPNAME_TIMEOUT && !HAVE_DECL_SSS_NSS_GETORIGBYGROUPNAME_TIMEOUT
|
|
||||||
#define sss_nss_getorigbygroupname_timeout sss_nss_getorigbyname_timeout
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SSSD_DOMAIN_SEPARATOR '@'
|
#define SSSD_DOMAIN_SEPARATOR '@'
|
||||||
|
|
||||||
int get_buffer(size_t *_buf_len, char **_buf)
|
int get_buffer(size_t *_buf_len, char **_buf)
|
||||||
@@ -107,7 +98,7 @@ static int inc_buffer(size_t buf_max, size_t *_buf_len, char **_buf)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __nss_to_err(enum nss_status errcode)
|
int __nss_to_err(enum nss_status errcode)
|
||||||
{
|
{
|
||||||
switch(errcode) {
|
switch(errcode) {
|
||||||
case NSS_STATUS_SUCCESS:
|
case NSS_STATUS_SUCCESS:
|
||||||
@@ -527,30 +518,6 @@ int pack_ber_sid(const char *sid, struct berval **berval)
|
|||||||
return LDAP_SUCCESS;
|
return LDAP_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool verify_domain(const char *fqdn, const char *domain_name)
|
|
||||||
{
|
|
||||||
const char *pos = strrchr(fqdn, SSSD_DOMAIN_SEPARATOR);
|
|
||||||
if (pos == NULL) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (strcasecmp(pos + 1, domain_name) == 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *get_short_name(const char *fqdn, const char *domain_name)
|
|
||||||
{
|
|
||||||
const char *pos = strrchr(fqdn, SSSD_DOMAIN_SEPARATOR);
|
|
||||||
if (pos == NULL) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strcasecmp(pos + 1, domain_name) != 0) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return strndup(fqdn, pos - fqdn);
|
|
||||||
}
|
|
||||||
|
|
||||||
int pack_ber_user(struct ipa_extdom_ctx *ctx,
|
int pack_ber_user(struct ipa_extdom_ctx *ctx,
|
||||||
enum response_types response_type,
|
enum response_types response_type,
|
||||||
const char *domain_name, const char *user_name,
|
const char *domain_name, const char *user_name,
|
||||||
@@ -567,13 +534,19 @@ int pack_ber_user(struct ipa_extdom_ctx *ctx,
|
|||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
struct group grp;
|
struct group grp;
|
||||||
size_t c;
|
size_t c;
|
||||||
|
char *locat;
|
||||||
char *short_user_name = NULL;
|
char *short_user_name = NULL;
|
||||||
|
|
||||||
short_user_name = get_short_name(user_name, domain_name);
|
short_user_name = strdup(user_name);
|
||||||
if (short_user_name == NULL) {
|
if ((locat = strrchr(short_user_name, SSSD_DOMAIN_SEPARATOR)) != NULL) {
|
||||||
/* domain mismatch */
|
if (strcasecmp(locat+1, domain_name) == 0 ) {
|
||||||
ret = LDAP_NO_SUCH_OBJECT;
|
locat[0] = '\0';
|
||||||
goto done;
|
} else {
|
||||||
|
/* The found object is from a different domain than requested,
|
||||||
|
* that means it does not exist in the requested domain */
|
||||||
|
ret = LDAP_NO_SUCH_OBJECT;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ber = ber_alloc_t( LBER_USE_DER );
|
ber = ber_alloc_t( LBER_USE_DER );
|
||||||
@@ -676,13 +649,19 @@ int pack_ber_group(enum response_types response_type,
|
|||||||
BerElement *ber = NULL;
|
BerElement *ber = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
size_t c;
|
size_t c;
|
||||||
|
char *locat;
|
||||||
char *short_group_name = NULL;
|
char *short_group_name = NULL;
|
||||||
|
|
||||||
short_group_name = get_short_name(group_name, domain_name);
|
short_group_name = strdup(group_name);
|
||||||
if (short_group_name == NULL) {
|
if ((locat = strrchr(short_group_name, SSSD_DOMAIN_SEPARATOR)) != NULL) {
|
||||||
/* domain mismatch */
|
if (strcasecmp(locat+1, domain_name) == 0 ) {
|
||||||
ret = LDAP_NO_SUCH_OBJECT;
|
locat[0] = '\0';
|
||||||
goto done;
|
} else {
|
||||||
|
/* The found object is from a different domain than requested,
|
||||||
|
* that means it does not exist in the requested domain */
|
||||||
|
ret = LDAP_NO_SUCH_OBJECT;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ber = ber_alloc_t( LBER_USE_DER );
|
ber = ber_alloc_t( LBER_USE_DER );
|
||||||
@@ -748,8 +727,8 @@ done:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pack_ber_name_list(struct extdom_req *req, char **fq_name_list,
|
int pack_ber_name_list(struct extdom_req *req, char **fq_name_list,
|
||||||
struct berval **berval)
|
struct berval **berval)
|
||||||
{
|
{
|
||||||
BerElement *ber = NULL;
|
BerElement *ber = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
@@ -905,14 +884,10 @@ static int handle_uid_request(struct ipa_extdom_ctx *ctx,
|
|||||||
}
|
}
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (!verify_domain(pwd.pw_name, domain_name)) {
|
|
||||||
ret = LDAP_NO_SUCH_OBJECT;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (request_type == REQ_FULL_WITH_GROUPS) {
|
if (request_type == REQ_FULL_WITH_GROUPS) {
|
||||||
ret = sss_nss_getorigbyusername_timeout(pwd.pw_name, get_timeout(ctx),
|
ret = sss_nss_getorigbyname_timeout(pwd.pw_name, get_timeout(ctx),
|
||||||
&kv_list, &id_type);
|
&kv_list, &id_type);
|
||||||
if (ret != 0 || !(id_type == SSS_ID_TYPE_UID
|
if (ret != 0 || !(id_type == SSS_ID_TYPE_UID
|
||||||
|| id_type == SSS_ID_TYPE_BOTH)) {
|
|| id_type == SSS_ID_TYPE_BOTH)) {
|
||||||
set_err_msg(req, "Failed to read original data");
|
set_err_msg(req, "Failed to read original data");
|
||||||
@@ -988,14 +963,10 @@ static int handle_gid_request(struct ipa_extdom_ctx *ctx,
|
|||||||
}
|
}
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (!verify_domain(grp.gr_name, domain_name)) {
|
|
||||||
ret = LDAP_NO_SUCH_OBJECT;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (request_type == REQ_FULL_WITH_GROUPS) {
|
if (request_type == REQ_FULL_WITH_GROUPS) {
|
||||||
ret = sss_nss_getorigbygroupname_timeout(grp.gr_name, get_timeout(ctx),
|
ret = sss_nss_getorigbyname_timeout(grp.gr_name, get_timeout(ctx),
|
||||||
&kv_list, &id_type);
|
&kv_list, &id_type);
|
||||||
if (ret != 0 || !(id_type == SSS_ID_TYPE_GID
|
if (ret != 0 || !(id_type == SSS_ID_TYPE_GID
|
||||||
|| id_type == SSS_ID_TYPE_BOTH)) {
|
|| id_type == SSS_ID_TYPE_BOTH)) {
|
||||||
set_err_msg(req, "Failed to read original data");
|
set_err_msg(req, "Failed to read original data");
|
||||||
@@ -1144,8 +1115,8 @@ static int handle_sid_request(struct ipa_extdom_ctx *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (request_type == REQ_FULL_WITH_GROUPS) {
|
if (request_type == REQ_FULL_WITH_GROUPS) {
|
||||||
ret = sss_nss_getorigbyusername_timeout(pwd.pw_name, get_timeout(ctx),
|
ret = sss_nss_getorigbyname_timeout(pwd.pw_name, get_timeout(ctx),
|
||||||
&kv_list, &id_type);
|
&kv_list, &id_type);
|
||||||
if (ret != 0 || !(id_type == SSS_ID_TYPE_UID
|
if (ret != 0 || !(id_type == SSS_ID_TYPE_UID
|
||||||
|| id_type == SSS_ID_TYPE_BOTH)) {
|
|| id_type == SSS_ID_TYPE_BOTH)) {
|
||||||
set_err_msg(req, "Failed to read original data");
|
set_err_msg(req, "Failed to read original data");
|
||||||
@@ -1181,8 +1152,8 @@ static int handle_sid_request(struct ipa_extdom_ctx *ctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (request_type == REQ_FULL_WITH_GROUPS) {
|
if (request_type == REQ_FULL_WITH_GROUPS) {
|
||||||
ret = sss_nss_getorigbygroupname_timeout(grp.gr_name, get_timeout(ctx),
|
ret = sss_nss_getorigbyname_timeout(grp.gr_name, get_timeout(ctx),
|
||||||
&kv_list, &id_type);
|
&kv_list, &id_type);
|
||||||
if (ret != 0 || !(id_type == SSS_ID_TYPE_GID
|
if (ret != 0 || !(id_type == SSS_ID_TYPE_GID
|
||||||
|| id_type == SSS_ID_TYPE_BOTH)) {
|
|| id_type == SSS_ID_TYPE_BOTH)) {
|
||||||
set_err_msg(req, "Failed to read original data");
|
set_err_msg(req, "Failed to read original data");
|
||||||
@@ -1294,14 +1265,10 @@ static int handle_username_request(struct ipa_extdom_ctx *ctx,
|
|||||||
ret = getpwnam_r_wrapper(ctx, fq_name, &pwd, &buf, &buf_len);
|
ret = getpwnam_r_wrapper(ctx, fq_name, &pwd, &buf, &buf_len);
|
||||||
switch(ret) {
|
switch(ret) {
|
||||||
case 0:
|
case 0:
|
||||||
if (!verify_domain(pwd.pw_name, domain_name)) {
|
|
||||||
ret = LDAP_NO_SUCH_OBJECT;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
if (request_type == REQ_FULL_WITH_GROUPS) {
|
if (request_type == REQ_FULL_WITH_GROUPS) {
|
||||||
ret = sss_nss_getorigbyusername_timeout(pwd.pw_name,
|
ret = sss_nss_getorigbyname_timeout(pwd.pw_name,
|
||||||
get_timeout(ctx),
|
get_timeout(ctx),
|
||||||
&kv_list, &id_type);
|
&kv_list, &id_type);
|
||||||
if (ret != 0 || !(id_type == SSS_ID_TYPE_UID
|
if (ret != 0 || !(id_type == SSS_ID_TYPE_UID
|
||||||
|| id_type == SSS_ID_TYPE_BOTH)) {
|
|| id_type == SSS_ID_TYPE_BOTH)) {
|
||||||
set_err_msg(req, "Failed to read original data");
|
set_err_msg(req, "Failed to read original data");
|
||||||
@@ -1388,14 +1355,10 @@ static int handle_groupname_request(struct ipa_extdom_ctx *ctx,
|
|||||||
}
|
}
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (!verify_domain(grp.gr_name, domain_name)) {
|
|
||||||
ret = LDAP_NO_SUCH_OBJECT;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (request_type == REQ_FULL_WITH_GROUPS) {
|
if (request_type == REQ_FULL_WITH_GROUPS) {
|
||||||
ret = sss_nss_getorigbygroupname_timeout(grp.gr_name, get_timeout(ctx),
|
ret = sss_nss_getorigbyname_timeout(grp.gr_name, get_timeout(ctx),
|
||||||
&kv_list, &id_type);
|
&kv_list, &id_type);
|
||||||
if (ret != 0 || !(id_type == SSS_ID_TYPE_GID
|
if (ret != 0 || !(id_type == SSS_ID_TYPE_GID
|
||||||
|| id_type == SSS_ID_TYPE_BOTH)) {
|
|| id_type == SSS_ID_TYPE_BOTH)) {
|
||||||
if (ret == ENOENT) {
|
if (ret == ENOENT) {
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
NULL =
|
|
||||||
|
|
||||||
PLUGIN_COMMON_DIR = $(srcdir)/../common
|
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
|
||||||
-I$(srcdir) \
|
|
||||||
-I$(PLUGIN_COMMON_DIR) \
|
|
||||||
-DPREFIX=\""$(prefix)"\" \
|
|
||||||
-DBINDIR=\""$(bindir)"\" \
|
|
||||||
-DLIBDIR=\""$(libdir)"\" \
|
|
||||||
-DLIBEXECDIR=\""$(libexecdir)"\" \
|
|
||||||
-DDATADIR=\""$(datadir)"\" \
|
|
||||||
-I$(top_srcdir)/util \
|
|
||||||
$(DIRSRV_CFLAGS) \
|
|
||||||
$(LDAP_CFLAGS) \
|
|
||||||
$(WARN_CFLAGS) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
plugindir = $(libdir)/dirsrv/plugins
|
|
||||||
plugin_LTLIBRARIES = \
|
|
||||||
libipa_graceperiod.la \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
libipa_graceperiod_la_SOURCES = \
|
|
||||||
ipa_graceperiod.c \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
libipa_graceperiod_la_LDFLAGS = -avoid-version
|
|
||||||
|
|
||||||
libipa_graceperiod_la_LIBADD = \
|
|
||||||
$(LDAP_LIBS) \
|
|
||||||
$(top_builddir)/util/libutil.la \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
appdir = $(IPA_DATA_DIR)
|
|
||||||
app_DATA = \
|
|
||||||
graceperiod-conf.ldif \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
EXTRA_DIST = \
|
|
||||||
$(app_DATA) \
|
|
||||||
$(NULL)
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
dn: cn=IPA Graceperiod,cn=plugins,cn=config
|
|
||||||
changetype: add
|
|
||||||
objectclass: top
|
|
||||||
objectclass: nsSlapdPlugin
|
|
||||||
objectclass: extensibleObject
|
|
||||||
cn: IPA Graceperiod
|
|
||||||
nsslapd-pluginpath: libipa_graceperiod
|
|
||||||
nsslapd-plugininitfunc: ipagraceperiod_init
|
|
||||||
nsslapd-plugintype: object
|
|
||||||
nsslapd-pluginenabled: on
|
|
||||||
nsslapd-pluginid: ipagraceperiod_version
|
|
||||||
nsslapd-pluginversion: 1.0
|
|
||||||
nsslapd-pluginvendor: Red Hat, Inc.
|
|
||||||
nsslapd-plugindescription: IPA Graceperiod plugin
|
|
||||||
nsslapd-plugin-depends-on-type: database
|
|
||||||
@@ -1,513 +0,0 @@
|
|||||||
/** BEGIN COPYRIGHT BLOCK
|
|
||||||
* 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 <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* Additional permission under GPLv3 section 7:
|
|
||||||
*
|
|
||||||
* In the following paragraph, "GPL" means the GNU General Public
|
|
||||||
* License, version 3 or any later version, and "Non-GPL Code" means
|
|
||||||
* code that is governed neither by the GPL nor a license
|
|
||||||
* compatible with the GPL.
|
|
||||||
*
|
|
||||||
* You may link the code of this Program with Non-GPL Code and convey
|
|
||||||
* linked combinations including the two, provided that such Non-GPL
|
|
||||||
* Code only links to the code of this Program through those well
|
|
||||||
* defined interfaces identified in the file named EXCEPTION found in
|
|
||||||
* the source code files (the "Approved Interfaces"). The files of
|
|
||||||
* Non-GPL Code may instantiate templates or use macros or inline
|
|
||||||
* functions from the Approved Interfaces without causing the resulting
|
|
||||||
* work to be covered by the GPL. Only the copyright holders of this
|
|
||||||
* Program may make changes or additions to the list of Approved
|
|
||||||
* Interfaces.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2022 Red Hat, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
* END COPYRIGHT BLOCK **/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* IPA Graceperiod plug-in
|
|
||||||
*
|
|
||||||
* Limit LDAP operations to password changes while in the grace period.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
#define _GNU_SOURCE 1
|
|
||||||
#endif
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include "slapi-plugin.h"
|
|
||||||
#include "nspr.h"
|
|
||||||
#include <krb5.h>
|
|
||||||
|
|
||||||
#include "util.h"
|
|
||||||
#include "ipa_pwd.h"
|
|
||||||
|
|
||||||
#define IPAGRACEPERIOD_PLUGIN_NAME "ipa-graceperiod-plugin"
|
|
||||||
#define IPAGRACEPERIOD_PLUGIN_VERSION 0x00010000
|
|
||||||
|
|
||||||
#define IPA_PLUGIN_NAME IPAGRACEPERIOD_PLUGIN_NAME
|
|
||||||
|
|
||||||
#define IPAGRACEPERIOD_FEATURE_DESC "IPA Graceperiod"
|
|
||||||
#define IPAGRACEPERIOD_PLUGIN_DESC "IPA Graceperiod plugin"
|
|
||||||
#define IPAGRACEPERIOD_PREOP_DESC "IPA Graceperiod preop plugin"
|
|
||||||
|
|
||||||
static Slapi_PluginDesc pdesc = {
|
|
||||||
IPAGRACEPERIOD_FEATURE_DESC,
|
|
||||||
"Red Hat, Inc.",
|
|
||||||
"1.0",
|
|
||||||
IPAGRACEPERIOD_PLUGIN_DESC
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ipa_context {
|
|
||||||
bool disable_last_success;
|
|
||||||
bool disable_lockout;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void *_PluginID = NULL;
|
|
||||||
|
|
||||||
static int g_plugin_started = 0;
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
static struct ipa_context *global_ipactx = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static char *ipa_global_policy = NULL;
|
|
||||||
|
|
||||||
int ipagraceperiod_getpolicy(Slapi_Entry *target_entry, Slapi_Entry **policy_entry,
|
|
||||||
Slapi_ValueSet** values, char **actual_type_name,
|
|
||||||
const char **policy_dn, int *attr_free_flags,
|
|
||||||
char **errstr);
|
|
||||||
int ipagraceperiod_version(void);
|
|
||||||
|
|
||||||
static void *getPluginID(void);
|
|
||||||
static void setPluginID(void *pluginID);
|
|
||||||
|
|
||||||
#define GENERALIZED_TIME_LENGTH 15
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* management functions
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
int ipagraceperiod_init(Slapi_PBlock * pb);
|
|
||||||
|
|
||||||
static int ipagraceperiod_start(Slapi_PBlock * pb);
|
|
||||||
static int ipagraceperiod_close(Slapi_PBlock * pb);
|
|
||||||
static int ipagraceperiod_preop_init(Slapi_PBlock * pb);
|
|
||||||
static int ipagraceperiod_get_global_config(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* the ops (where the real work is done)
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
static int ipagraceperiod_preop(Slapi_PBlock *pb);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Get the plug-in version
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
int ipagraceperiod_version(void)
|
|
||||||
{
|
|
||||||
return IPAGRACEPERIOD_PLUGIN_VERSION;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Plugin identity mgmt
|
|
||||||
*/
|
|
||||||
static void setPluginID(void *pluginID)
|
|
||||||
{
|
|
||||||
_PluginID = pluginID;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void *getPluginID(void)
|
|
||||||
{
|
|
||||||
return _PluginID;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
ipagraceperiod_get_global_config(void)
|
|
||||||
{
|
|
||||||
char *dn = NULL;
|
|
||||||
char *basedn = NULL;
|
|
||||||
char *realm = NULL;
|
|
||||||
Slapi_DN *sdn;
|
|
||||||
Slapi_Entry *config_entry = NULL;
|
|
||||||
krb5_context krbctx = NULL;
|
|
||||||
krb5_error_code krberr;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* Get cn=config so we can get the default naming context */
|
|
||||||
sdn = slapi_sdn_new_dn_byref("cn=config");
|
|
||||||
|
|
||||||
ret = slapi_search_internal_get_entry(sdn, NULL, &config_entry,
|
|
||||||
getPluginID());
|
|
||||||
|
|
||||||
slapi_sdn_free(&sdn);
|
|
||||||
|
|
||||||
if (ret) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
basedn = slapi_entry_attr_get_charptr(config_entry,
|
|
||||||
"nsslapd-defaultnamingcontext");
|
|
||||||
|
|
||||||
slapi_entry_free(config_entry);
|
|
||||||
config_entry = NULL;
|
|
||||||
|
|
||||||
if (!basedn) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
krberr = krb5_init_context(&krbctx);
|
|
||||||
if (krberr) {
|
|
||||||
LOG_FATAL("krb5_init_context failed (%d)\n", krberr);
|
|
||||||
/* Yes, we failed, but it is because /etc/krb5.conf doesn't exist
|
|
||||||
* or is misconfigured. Start up in a degraded mode.
|
|
||||||
*/
|
|
||||||
} else {
|
|
||||||
krberr = krb5_get_default_realm(krbctx, &realm);
|
|
||||||
if (krberr) {
|
|
||||||
LOG_FATAL("Failed to get default realm (%d)\n", krberr);
|
|
||||||
} else {
|
|
||||||
ipa_global_policy =
|
|
||||||
slapi_ch_smprintf("cn=global_policy,cn=%s,cn=kerberos,%s",
|
|
||||||
realm, basedn);
|
|
||||||
if (!ipa_global_policy) {
|
|
||||||
LOG_OOM();
|
|
||||||
ret = LDAP_OPERATIONS_ERROR;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
|
|
||||||
done:
|
|
||||||
if (config_entry)
|
|
||||||
slapi_entry_free(config_entry);
|
|
||||||
free(realm);
|
|
||||||
krb5_free_context(krbctx);
|
|
||||||
free(dn);
|
|
||||||
free(basedn);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ipagraceperiod_getpolicy(Slapi_Entry *target_entry, Slapi_Entry **policy_entry,
|
|
||||||
Slapi_ValueSet** values, char **actual_type_name,
|
|
||||||
const char **policy_dn, int *attr_free_flags,
|
|
||||||
char **errstr)
|
|
||||||
{
|
|
||||||
int ldrc = 0;
|
|
||||||
int type_name_disposition = 0;
|
|
||||||
Slapi_DN *pdn = NULL;
|
|
||||||
|
|
||||||
/* Only continue if there is a password policy */
|
|
||||||
ldrc = slapi_vattr_values_get(target_entry, "krbPwdPolicyReference",
|
|
||||||
values,
|
|
||||||
&type_name_disposition, actual_type_name,
|
|
||||||
SLAPI_VIRTUALATTRS_REQUEST_POINTERS,
|
|
||||||
attr_free_flags);
|
|
||||||
if (ldrc == 0) {
|
|
||||||
Slapi_Value *sv = NULL;
|
|
||||||
|
|
||||||
if (values != NULL) {
|
|
||||||
slapi_valueset_first_value(*values, &sv);
|
|
||||||
*policy_dn = slapi_value_get_string(sv);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
*policy_dn = ipa_global_policy;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*policy_dn == NULL) {
|
|
||||||
LOG_TRACE("No kerberos password policy\n");
|
|
||||||
return LDAP_SUCCESS;
|
|
||||||
} else {
|
|
||||||
pdn = slapi_sdn_new_dn_byref(*policy_dn);
|
|
||||||
ldrc = slapi_search_internal_get_entry(pdn, NULL, policy_entry,
|
|
||||||
getPluginID());
|
|
||||||
slapi_sdn_free(&pdn);
|
|
||||||
if (ldrc != LDAP_SUCCESS) {
|
|
||||||
LOG_FATAL("Failed to retrieve entry \"%s\": %d\n", *policy_dn, ldrc);
|
|
||||||
*errstr = "Failed to retrieve account policy.";
|
|
||||||
return LDAP_OPERATIONS_ERROR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return LDAP_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
ipagraceperiod_init(Slapi_PBlock *pb)
|
|
||||||
{
|
|
||||||
int status = EOK;
|
|
||||||
char *plugin_identity = NULL;
|
|
||||||
|
|
||||||
LOG_TRACE("--in-->\n");
|
|
||||||
|
|
||||||
slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &plugin_identity);
|
|
||||||
PR_ASSERT(plugin_identity);
|
|
||||||
setPluginID(plugin_identity);
|
|
||||||
|
|
||||||
if (slapi_pblock_set(pb, SLAPI_PLUGIN_VERSION,
|
|
||||||
SLAPI_PLUGIN_VERSION_01) != 0 ||
|
|
||||||
slapi_pblock_set(pb, SLAPI_PLUGIN_START_FN,
|
|
||||||
(void *) ipagraceperiod_start) != 0 ||
|
|
||||||
slapi_pblock_set(pb, SLAPI_PLUGIN_CLOSE_FN,
|
|
||||||
(void *) ipagraceperiod_close) != 0 ||
|
|
||||||
slapi_pblock_set(pb, SLAPI_PLUGIN_DESCRIPTION,
|
|
||||||
(void *) &pdesc) != 0 ||
|
|
||||||
slapi_register_plugin("preoperation",
|
|
||||||
1,
|
|
||||||
"ipagraceperiod_init",
|
|
||||||
ipagraceperiod_preop_init,
|
|
||||||
IPAGRACEPERIOD_PREOP_DESC,
|
|
||||||
NULL,
|
|
||||||
plugin_identity
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
LOG_FATAL("failed to register plugin\n");
|
|
||||||
status = EFAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
LOG_TRACE("<--out--\n");
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
ipagraceperiod_preop_init(Slapi_PBlock *pb)
|
|
||||||
{
|
|
||||||
int status = EOK;
|
|
||||||
|
|
||||||
if (slapi_pblock_set(pb, SLAPI_PLUGIN_VERSION,
|
|
||||||
SLAPI_PLUGIN_VERSION_01) != 0 ||
|
|
||||||
slapi_pblock_set(pb, SLAPI_PLUGIN_DESCRIPTION,
|
|
||||||
(void *) &pdesc) != 0 ||
|
|
||||||
slapi_pblock_set(pb, SLAPI_PLUGIN_PRE_BIND_FN,
|
|
||||||
(void *) ipagraceperiod_preop) != 0) {
|
|
||||||
status = EFAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
ipagraceperiod_start(Slapi_PBlock * pb)
|
|
||||||
{
|
|
||||||
LOG_TRACE("--in-->\n");
|
|
||||||
|
|
||||||
/* Check if we're already started */
|
|
||||||
if (g_plugin_started) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_plugin_started = 1;
|
|
||||||
|
|
||||||
ipagraceperiod_get_global_config();
|
|
||||||
|
|
||||||
LOG("ready for service\n");
|
|
||||||
|
|
||||||
done:
|
|
||||||
LOG_TRACE("<--out--\n");
|
|
||||||
return EOK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
ipagraceperiod_close(Slapi_PBlock * pb)
|
|
||||||
{
|
|
||||||
LOG_TRACE( "--in-->\n");
|
|
||||||
|
|
||||||
slapi_ch_free_string(&ipa_global_policy);
|
|
||||||
|
|
||||||
LOG_TRACE("<--out--\n");
|
|
||||||
|
|
||||||
return EOK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* In the pre-op stage the bind hasn't occurred yet. It is here that
|
|
||||||
* we do the lockout enforcement.
|
|
||||||
*/
|
|
||||||
static int ipagraceperiod_preop(Slapi_PBlock *pb)
|
|
||||||
{
|
|
||||||
char *dn = NULL;
|
|
||||||
const char *policy_dn = NULL;
|
|
||||||
Slapi_Entry *target_entry = NULL;
|
|
||||||
Slapi_Entry *policy_entry = NULL;
|
|
||||||
Slapi_Value *objectclass = NULL;
|
|
||||||
Slapi_DN *sdn = NULL;
|
|
||||||
char *errstr = NULL;
|
|
||||||
int ldrc = 0;
|
|
||||||
int rc = 0;
|
|
||||||
int ret = LDAP_SUCCESS;
|
|
||||||
char *actual_type_name = NULL;
|
|
||||||
int attr_free_flags = 0;
|
|
||||||
Slapi_ValueSet *values = NULL;
|
|
||||||
long grace_limit = 0;
|
|
||||||
int grace_user_time;
|
|
||||||
char *tmpstr = NULL;
|
|
||||||
time_t pwd_expiration;
|
|
||||||
int pwresponse_requested = 0;
|
|
||||||
Slapi_PBlock *pbtm = NULL;
|
|
||||||
Slapi_Mods *smods = NULL;
|
|
||||||
|
|
||||||
LOG_TRACE("--in-->\n");
|
|
||||||
|
|
||||||
/* Just bail if we aren't ready to service requests yet. */
|
|
||||||
if (!g_plugin_started) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (slapi_pblock_get(pb, SLAPI_BIND_TARGET, &dn) != 0) {
|
|
||||||
LOG_FATAL("Error retrieving target DN\n");
|
|
||||||
ret = LDAP_OPERATIONS_ERROR;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Client is anonymously bound */
|
|
||||||
if (dn == NULL) {
|
|
||||||
LOG_TRACE("anonymous bind\n");
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get the entry */
|
|
||||||
sdn = slapi_sdn_new_dn_byref(dn);
|
|
||||||
if (sdn == NULL) {
|
|
||||||
LOG_OOM();
|
|
||||||
errstr = "Out of memory.\n";
|
|
||||||
ret = LDAP_OPERATIONS_ERROR;
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ldrc = slapi_search_internal_get_entry(sdn, NULL, &target_entry,
|
|
||||||
getPluginID());
|
|
||||||
|
|
||||||
if (ldrc != LDAP_SUCCESS) {
|
|
||||||
LOG_TRACE("Failed to retrieve entry \"%s\": %d\n", dn, ldrc);
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Only deal with users and sysaccount entries */
|
|
||||||
objectclass = slapi_value_new_string("posixAccount");
|
|
||||||
if ((slapi_entry_attr_has_syntax_value(target_entry, SLAPI_ATTR_OBJECTCLASS, objectclass)) != 1) {
|
|
||||||
LOG_TRACE("Not a posix user\n");
|
|
||||||
slapi_value_free(&objectclass);
|
|
||||||
objectclass = slapi_value_new_string("simplesecurityobject");
|
|
||||||
if ((slapi_entry_attr_has_syntax_value(target_entry, SLAPI_ATTR_OBJECTCLASS, objectclass)) != 1) {
|
|
||||||
LOG_TRACE("Not a sysaccount user\n");
|
|
||||||
slapi_value_free(&objectclass);
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
slapi_value_free(&objectclass);
|
|
||||||
|
|
||||||
tmpstr = slapi_entry_attr_get_charptr(target_entry, "krbPasswordExpiration");
|
|
||||||
if (tmpstr == NULL) {
|
|
||||||
/* No expiration means nothing to do */
|
|
||||||
LOG_TRACE("No krbPasswordExpiration for %s, nothing to do\n", dn);
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
pwd_expiration = ipapwd_gentime_to_time_t(tmpstr);
|
|
||||||
if (pwd_expiration > time(NULL)) {
|
|
||||||
/* Not expired, nothing to see here */
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
ldrc = ipagraceperiod_getpolicy(target_entry, &policy_entry,
|
|
||||||
&values, &actual_type_name,
|
|
||||||
&policy_dn, &attr_free_flags,
|
|
||||||
&errstr);
|
|
||||||
if (ldrc != LDAP_SUCCESS || policy_dn == NULL) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
slapi_pblock_get(pb, SLAPI_PWPOLICY, &pwresponse_requested);
|
|
||||||
|
|
||||||
/* This returns 0 if the attribute doesn't exist, so no grace but
|
|
||||||
* report that logins are not allowed.
|
|
||||||
*/
|
|
||||||
grace_limit = slapi_entry_attr_get_int(policy_entry, "passwordGraceLimit");
|
|
||||||
|
|
||||||
/* -1 means disable grace limit */
|
|
||||||
if (grace_limit == -1) {
|
|
||||||
LOG_TRACE("grace limit disabled, skipping\n");
|
|
||||||
goto done;
|
|
||||||
} else if (grace_limit < -1) {
|
|
||||||
LOG_FATAL("Invalid passwordGraceLimit value %d\n", grace_limit);
|
|
||||||
return LDAP_OPERATIONS_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
grace_user_time = slapi_entry_attr_get_int(target_entry, "passwordGraceUserTime");
|
|
||||||
|
|
||||||
if ((grace_limit > 0) && (grace_user_time < grace_limit)) {
|
|
||||||
char graceUserTime[16] = {0};
|
|
||||||
|
|
||||||
grace_user_time++;
|
|
||||||
sprintf(graceUserTime, "%d", grace_user_time);
|
|
||||||
smods = slapi_mods_new();
|
|
||||||
slapi_mods_add_string(smods, LDAP_MOD_REPLACE,
|
|
||||||
"passwordGraceUserTime", graceUserTime);
|
|
||||||
|
|
||||||
pbtm = slapi_pblock_new();
|
|
||||||
slapi_modify_internal_set_pb(pbtm,
|
|
||||||
slapi_entry_get_dn_const(target_entry),
|
|
||||||
slapi_mods_get_ldapmods_byref(smods),
|
|
||||||
NULL, NULL, getPluginID(), 0);
|
|
||||||
|
|
||||||
slapi_modify_internal_pb(pbtm);
|
|
||||||
slapi_pblock_get(pbtm, SLAPI_PLUGIN_INTOP_RESULT, &rc);
|
|
||||||
|
|
||||||
if (rc != LDAP_SUCCESS) {
|
|
||||||
LOG_TRACE("WARNING: modify error %d on entry '%s'\n",
|
|
||||||
rc, slapi_entry_get_dn_const(target_entry));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pwresponse_requested) {
|
|
||||||
slapi_pwpolicy_make_response_control(pb, -1, grace_limit - grace_user_time , -1);
|
|
||||||
}
|
|
||||||
} else if (grace_user_time >= grace_limit) {
|
|
||||||
LOG_TRACE("%s password is expired and out of grace limit\n", dn);
|
|
||||||
errstr = "Password is expired.\n";
|
|
||||||
ret = LDAP_INVALID_CREDENTIALS;
|
|
||||||
|
|
||||||
if (pwresponse_requested) {
|
|
||||||
slapi_pwpolicy_make_response_control(pb, -1, 0, LDAP_PWPOLICY_PWDEXPIRED);
|
|
||||||
}
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
slapi_add_pwd_control(pb, LDAP_CONTROL_PWEXPIRED, 0);
|
|
||||||
|
|
||||||
done:
|
|
||||||
slapi_pblock_destroy(pbtm);
|
|
||||||
slapi_mods_free(&smods);
|
|
||||||
slapi_entry_free(target_entry);
|
|
||||||
slapi_entry_free(policy_entry);
|
|
||||||
if (values != NULL) {
|
|
||||||
slapi_vattr_values_free(&values, &actual_type_name, attr_free_flags);
|
|
||||||
}
|
|
||||||
if (sdn) slapi_sdn_free(&sdn);
|
|
||||||
|
|
||||||
LOG("preop returning %d: %s\n", ret, errstr ? errstr : "success\n");
|
|
||||||
|
|
||||||
if (ret) {
|
|
||||||
slapi_send_ldap_result(pb, ret, NULL, errstr, 0, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
LOG_TRACE("<--out--\n");
|
|
||||||
|
|
||||||
return (ret == 0 ? EOK : EFAIL);
|
|
||||||
}
|
|
||||||
@@ -54,7 +54,7 @@ void *ipa_otp_lasttoken_plugin_id;
|
|||||||
|
|
||||||
static bool entry_is_token(Slapi_Entry *entry)
|
static bool entry_is_token(Slapi_Entry *entry)
|
||||||
{
|
{
|
||||||
char **ocls = NULL;
|
char **ocls;
|
||||||
|
|
||||||
ocls = slapi_entry_attr_get_charray(entry, SLAPI_ATTR_OBJECTCLASS);
|
ocls = slapi_entry_attr_get_charray(entry, SLAPI_ATTR_OBJECTCLASS);
|
||||||
for (size_t i = 0; ocls != NULL && ocls[i] != NULL; i++) {
|
for (size_t i = 0; ocls != NULL && ocls[i] != NULL; i++) {
|
||||||
@@ -64,7 +64,6 @@ static bool entry_is_token(Slapi_Entry *entry)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
slapi_ch_array_free(ocls);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,8 +138,7 @@ static bool is_pwd_enabled(const char *user_dn)
|
|||||||
static bool is_allowed(Slapi_PBlock *pb, Slapi_Entry *entry)
|
static bool is_allowed(Slapi_PBlock *pb, Slapi_Entry *entry)
|
||||||
{
|
{
|
||||||
Slapi_DN *target_sdn = NULL;
|
Slapi_DN *target_sdn = NULL;
|
||||||
char *bind_dn;
|
const char *bind_dn;
|
||||||
bool rv = false;
|
|
||||||
|
|
||||||
/* Ignore internal operations. */
|
/* Ignore internal operations. */
|
||||||
if (slapi_op_internal(pb))
|
if (slapi_op_internal(pb))
|
||||||
@@ -149,35 +147,23 @@ static bool is_allowed(Slapi_PBlock *pb, Slapi_Entry *entry)
|
|||||||
/* Load parameters. */
|
/* Load parameters. */
|
||||||
(void) slapi_pblock_get(pb, SLAPI_TARGET_SDN, &target_sdn);
|
(void) slapi_pblock_get(pb, SLAPI_TARGET_SDN, &target_sdn);
|
||||||
(void) slapi_pblock_get(pb, SLAPI_CONN_DN, &bind_dn);
|
(void) slapi_pblock_get(pb, SLAPI_CONN_DN, &bind_dn);
|
||||||
if (bind_dn == NULL) {
|
if (target_sdn == NULL || bind_dn == NULL) {
|
||||||
LOG_FATAL("bind_dn parameter missing!\n");
|
LOG_FATAL("Missing parameters!\n");
|
||||||
goto done;
|
return false;
|
||||||
}
|
|
||||||
if (target_sdn == NULL) {
|
|
||||||
LOG_FATAL("target_sdn parameter missing!\n");
|
|
||||||
goto done;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entry != NULL
|
if (entry != NULL
|
||||||
? !entry_is_token(entry)
|
? !entry_is_token(entry)
|
||||||
: !sdn_in_otp_container(target_sdn)) {
|
: !sdn_in_otp_container(target_sdn))
|
||||||
rv = true;
|
return true;
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!sdn_is_only_enabled_token(target_sdn, bind_dn)) {
|
if (!sdn_is_only_enabled_token(target_sdn, bind_dn))
|
||||||
rv = true;
|
return true;
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_pwd_enabled(bind_dn)) {
|
if (is_pwd_enabled(bind_dn))
|
||||||
rv = true;
|
return true;
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
return false;
|
||||||
slapi_ch_free_string(&bind_dn);
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int send_error(Slapi_PBlock *pb, int rc, const char *errstr)
|
static inline int send_error(Slapi_PBlock *pb, int rc, const char *errstr)
|
||||||
|
|||||||
@@ -96,14 +96,6 @@ void *ipapwd_get_plugin_id(void)
|
|||||||
return ipapwd_plugin_id;
|
return ipapwd_plugin_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool is_nthash_allowed(const char *service_name, const char *bind_dn)
|
|
||||||
{
|
|
||||||
#define CIFS_PRINCIPAL_PREFIX "krbprincipalname=cifs/"
|
|
||||||
return (0 == strncmp("cifs/", service_name, 5)) ||
|
|
||||||
(0 == strncmp(CIFS_PRINCIPAL_PREFIX, bind_dn,
|
|
||||||
sizeof(CIFS_PRINCIPAL_PREFIX) - 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void filter_keys(struct ipapwd_krbcfg *krbcfg,
|
static void filter_keys(struct ipapwd_krbcfg *krbcfg,
|
||||||
struct ipapwd_keyset *kset,
|
struct ipapwd_keyset *kset,
|
||||||
bool allow_nthash)
|
bool allow_nthash)
|
||||||
@@ -351,7 +343,7 @@ parse_req_done:
|
|||||||
/* If user is authenticated, they already gave their password during
|
/* If user is authenticated, they already gave their password during
|
||||||
the bind operation (or used sasl or client cert auth or OS creds) */
|
the bind operation (or used sasl or client cert auth or OS creds) */
|
||||||
slapi_pblock_get(pb, SLAPI_CONN_AUTHMETHOD, &authmethod);
|
slapi_pblock_get(pb, SLAPI_CONN_AUTHMETHOD, &authmethod);
|
||||||
if (!authmethod || strcmp(authmethod, SLAPD_AUTH_NONE) == 0) {
|
if (!authmethod || !strcmp(authmethod, SLAPD_AUTH_NONE)) {
|
||||||
errMesg = "User must be authenticated to the directory server.\n";
|
errMesg = "User must be authenticated to the directory server.\n";
|
||||||
rc = LDAP_INSUFFICIENT_ACCESS;
|
rc = LDAP_INSUFFICIENT_ACCESS;
|
||||||
goto free_and_return;
|
goto free_and_return;
|
||||||
@@ -1236,7 +1228,7 @@ static int ipapwd_setkeytab(Slapi_PBlock *pb, struct ipapwd_krbcfg *krbcfg)
|
|||||||
int kvno;
|
int kvno;
|
||||||
char *svcname;
|
char *svcname;
|
||||||
bool allowed_access = false;
|
bool allowed_access = false;
|
||||||
bool nthash_allowed = false;
|
bool is_nthash_allowed = false;
|
||||||
struct berval *bvp = NULL;
|
struct berval *bvp = NULL;
|
||||||
LDAPControl new_ctrl;
|
LDAPControl new_ctrl;
|
||||||
|
|
||||||
@@ -1313,8 +1305,8 @@ static int ipapwd_setkeytab(Slapi_PBlock *pb, struct ipapwd_krbcfg *krbcfg)
|
|||||||
/* Only allow generating arcfour-hmac keys for cifs/.. services
|
/* Only allow generating arcfour-hmac keys for cifs/.. services
|
||||||
* unless the enctype is allowed by the IPA configuration for use
|
* unless the enctype is allowed by the IPA configuration for use
|
||||||
* by the all principals */
|
* by the all principals */
|
||||||
nthash_allowed = is_nthash_allowed(serviceName, bindDN);
|
is_nthash_allowed = (0 == strncmp("cifs/", serviceName, 5));
|
||||||
filter_keys(krbcfg, kset, nthash_allowed);
|
filter_keys(krbcfg, kset, is_nthash_allowed);
|
||||||
|
|
||||||
/* check if we have any left */
|
/* check if we have any left */
|
||||||
if (kset->num_keys == 0) {
|
if (kset->num_keys == 0) {
|
||||||
@@ -1623,7 +1615,7 @@ static int ipapwd_getkeytab(Slapi_PBlock *pb, struct ipapwd_krbcfg *krbcfg)
|
|||||||
struct berval *bvp = NULL;
|
struct berval *bvp = NULL;
|
||||||
LDAPControl new_ctrl;
|
LDAPControl new_ctrl;
|
||||||
bool wantold = false;
|
bool wantold = false;
|
||||||
bool nthash_allowed = false;
|
bool is_nthash_allowed = false;
|
||||||
|
|
||||||
/* Get Bind DN */
|
/* Get Bind DN */
|
||||||
slapi_pblock_get(pb, SLAPI_CONN_DN, &bind_dn);
|
slapi_pblock_get(pb, SLAPI_CONN_DN, &bind_dn);
|
||||||
@@ -1720,8 +1712,8 @@ static int ipapwd_getkeytab(Slapi_PBlock *pb, struct ipapwd_krbcfg *krbcfg)
|
|||||||
/* Only allow generating arcfour-hmac keys for cifs/.. services
|
/* Only allow generating arcfour-hmac keys for cifs/.. services
|
||||||
* unless the enctype is allowed by the IPA configuration for use
|
* unless the enctype is allowed by the IPA configuration for use
|
||||||
* by the all principals */
|
* by the all principals */
|
||||||
nthash_allowed = is_nthash_allowed(service_name, bind_dn);
|
is_nthash_allowed = (0 == strncmp("cifs/", service_name, 5));
|
||||||
filter_enctypes(krbcfg, kenctypes, &num_kenctypes, nthash_allowed);
|
filter_enctypes(krbcfg, kenctypes, &num_kenctypes, is_nthash_allowed);
|
||||||
|
|
||||||
/* check if we have any left */
|
/* check if we have any left */
|
||||||
if (num_kenctypes == 0 && kenctypes != NULL) {
|
if (num_kenctypes == 0 && kenctypes != NULL) {
|
||||||
|
|||||||
@@ -1071,7 +1071,6 @@ static int ipapwd_post_modadd(Slapi_PBlock *pb)
|
|||||||
struct ipapwd_krbcfg *krbcfg = NULL;
|
struct ipapwd_krbcfg *krbcfg = NULL;
|
||||||
char *principal = NULL;
|
char *principal = NULL;
|
||||||
Slapi_Value *ipahost;
|
Slapi_Value *ipahost;
|
||||||
Slapi_Value *zero;
|
|
||||||
|
|
||||||
LOG_TRACE("=>\n");
|
LOG_TRACE("=>\n");
|
||||||
|
|
||||||
@@ -1168,13 +1167,6 @@ static int ipapwd_post_modadd(Slapi_PBlock *pb)
|
|||||||
}
|
}
|
||||||
slapi_value_free(&ipahost);
|
slapi_value_free(&ipahost);
|
||||||
}
|
}
|
||||||
zero = slapi_value_new_string("0");
|
|
||||||
if (!slapi_entry_attr_has_syntax_value(pwdop->pwdata.target,
|
|
||||||
"passwordgraceusertime", zero)) {
|
|
||||||
/* Clear the passwordgraceusertime from the user entry */
|
|
||||||
slapi_mods_add_string(smods, LDAP_MOD_REPLACE, "passwordgraceusertime", "0");
|
|
||||||
}
|
|
||||||
slapi_value_free(&zero);
|
|
||||||
|
|
||||||
ret = ipapwd_apply_mods(pwdop->pwdata.dn, smods);
|
ret = ipapwd_apply_mods(pwdop->pwdata.dn, smods);
|
||||||
if (ret)
|
if (ret)
|
||||||
@@ -1433,7 +1425,7 @@ static int ipapwd_pre_bind(Slapi_PBlock *pb)
|
|||||||
Slapi_DN *target_sdn = NULL;
|
Slapi_DN *target_sdn = NULL;
|
||||||
Slapi_DN *sdn = NULL;
|
Slapi_DN *sdn = NULL;
|
||||||
const char *dn = NULL;
|
const char *dn = NULL;
|
||||||
ber_tag_t method = 0;
|
int method = 0;
|
||||||
bool syncreq;
|
bool syncreq;
|
||||||
bool otpreq;
|
bool otpreq;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@@ -1454,10 +1446,8 @@ static int ipapwd_pre_bind(Slapi_PBlock *pb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* We're only interested in simple authentication. */
|
/* We're only interested in simple authentication. */
|
||||||
if (method != LDAP_AUTH_SIMPLE || credentials->bv_len == 0) {
|
if (method != LDAP_AUTH_SIMPLE || credentials->bv_len == 0)
|
||||||
LOG("Not handled (not simple bind or NULL dn/credentials)\n");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
/* Retrieve the user's entry. */
|
/* Retrieve the user's entry. */
|
||||||
sdn = slapi_sdn_dup(target_sdn);
|
sdn = slapi_sdn_dup(target_sdn);
|
||||||
@@ -1515,9 +1505,6 @@ static int ipapwd_pre_bind(Slapi_PBlock *pb)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset rc to make sure errors are reported*/
|
|
||||||
rc = LDAP_INVALID_CREDENTIALS;
|
|
||||||
|
|
||||||
/* Authenticate the user. */
|
/* Authenticate the user. */
|
||||||
ret = ipapwd_authenticate(dn, entry, credentials);
|
ret = ipapwd_authenticate(dn, entry, credentials);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|||||||
@@ -800,7 +800,7 @@ internal_find_entry_get_attr_val(const Slapi_DN *basedn, int scope,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (attrval) {
|
if (attrval) {
|
||||||
if (strcmp(attrname, "dn") == 0) { /* special - to just get the DN */
|
if (!strcmp(attrname, "dn")) { /* special - to just get the DN */
|
||||||
*attrval = slapi_ch_strdup(slapi_entry_get_dn_const(entries[0]));
|
*attrval = slapi_ch_strdup(slapi_entry_get_dn_const(entries[0]));
|
||||||
} else {
|
} else {
|
||||||
*attrval = slapi_entry_attr_get_charptr(entries[0], attrname);
|
*attrval = slapi_entry_attr_get_charptr(entries[0], attrname);
|
||||||
|
|||||||
@@ -398,7 +398,6 @@ static struct otp_token **find(const struct otp_config *cfg, const char *user_dn
|
|||||||
}
|
}
|
||||||
|
|
||||||
error:
|
error:
|
||||||
slapi_free_search_results_internal(pb);
|
|
||||||
slapi_pblock_destroy(pb);
|
slapi_pblock_destroy(pb);
|
||||||
return tokens;
|
return tokens;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -461,7 +461,7 @@ ipa_topo_cfg_host_find(TopoReplica *tconf, char *findhost, int lock)
|
|||||||
"ipa_topo_cfg_host_find: found a NULL hostname in host list\n");
|
"ipa_topo_cfg_host_find: found a NULL hostname in host list\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (strcasecmp(host->hostname, findhost) == 0) {
|
if (!strcasecmp(host->hostname,findhost)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -530,7 +530,7 @@ ipa_topo_cfg_host_del(Slapi_Entry *hostentry)
|
|||||||
hostnode = replica->hosts;
|
hostnode = replica->hosts;
|
||||||
prevnode = NULL;
|
prevnode = NULL;
|
||||||
while (hostnode) {
|
while (hostnode) {
|
||||||
if (strcasecmp(hostnode->hostname,delhost) == 0) {
|
if (!strcasecmp(hostnode->hostname,delhost)) {
|
||||||
/*remove from list and free*/
|
/*remove from list and free*/
|
||||||
if (prevnode) {
|
if (prevnode) {
|
||||||
prevnode->next = hostnode->next;
|
prevnode->next = hostnode->next;
|
||||||
@@ -566,9 +566,9 @@ ipa_topo_cfg_replica_segment_find(TopoReplica *replica, char *leftHost, char *ri
|
|||||||
while (segments) {
|
while (segments) {
|
||||||
|
|
||||||
tsegm = segments->segm;
|
tsegm = segments->segm;
|
||||||
if ( ((strcasecmp(leftHost,tsegm->from) == 0) && (strcasecmp(rightHost,tsegm->to) == 0) &&
|
if ( (!strcasecmp(leftHost,tsegm->from) && !strcasecmp(rightHost,tsegm->to) &&
|
||||||
(tsegm->direct & dir)) ||
|
(tsegm->direct & dir)) ||
|
||||||
((strcasecmp(leftHost,tsegm->to) == 0) && (strcasecmp(rightHost,tsegm->from) == 0) &&
|
(!strcasecmp(leftHost,tsegm->to) && !strcasecmp(rightHost,tsegm->from) &&
|
||||||
(tsegm->direct & reverse_dir))) {
|
(tsegm->direct & reverse_dir))) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -719,9 +719,9 @@ ipa_topo_cfg_segment_set_visited(TopoReplica *replica, TopoReplicaSegment *vsegm
|
|||||||
segments = replica->repl_segments;
|
segments = replica->repl_segments;
|
||||||
while (segments) {
|
while (segments) {
|
||||||
tsegm = segments->segm;
|
tsegm = segments->segm;
|
||||||
if ( ((strcasecmp(leftHost,tsegm->from) == 0) && (strcasecmp(rightHost,tsegm->to) == 0) &&
|
if ( (!strcasecmp(leftHost,tsegm->from) && !strcasecmp(rightHost,tsegm->to) &&
|
||||||
(tsegm->direct == SEGMENT_BIDIRECTIONAL || tsegm->direct == SEGMENT_LEFT_RIGHT)) ||
|
(tsegm->direct == SEGMENT_BIDIRECTIONAL || tsegm->direct == SEGMENT_LEFT_RIGHT)) ||
|
||||||
((strcasecmp(leftHost,tsegm->to) == 0) && (strcasecmp(rightHost,tsegm->from) == 0) &&
|
(!strcasecmp(leftHost,tsegm->to) && !strcasecmp(rightHost,tsegm->from) &&
|
||||||
(tsegm->direct == SEGMENT_BIDIRECTIONAL || tsegm->direct == SEGMENT_RIGHT_LEFT))) {
|
(tsegm->direct == SEGMENT_BIDIRECTIONAL || tsegm->direct == SEGMENT_RIGHT_LEFT))) {
|
||||||
segments->visited = 1;
|
segments->visited = 1;
|
||||||
break;
|
break;
|
||||||
@@ -879,7 +879,7 @@ ipa_topo_cfg_replica_find(char *repl_root, int lock)
|
|||||||
|
|
||||||
tconf = topo_shared_conf.replicas;
|
tconf = topo_shared_conf.replicas;
|
||||||
while (tconf) {
|
while (tconf) {
|
||||||
if (strcasecmp(repl_root,tconf->repl_root) == 0) {
|
if (!strcasecmp(repl_root,tconf->repl_root)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tconf = tconf->next;
|
tconf = tconf->next;
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ ipa_topo_post_add(Slapi_PBlock *pb)
|
|||||||
*/
|
*/
|
||||||
tsegm = ipa_topo_util_segment_from_entry(tconf, add_entry);
|
tsegm = ipa_topo_util_segment_from_entry(tconf, add_entry);
|
||||||
status = slapi_entry_attr_get_charptr(add_entry, "ipaReplTopoSegmentStatus");
|
status = slapi_entry_attr_get_charptr(add_entry, "ipaReplTopoSegmentStatus");
|
||||||
if (status == NULL || (strcasecmp(status,"autogen") != 0)) {
|
if (status == NULL || strcasecmp(status,"autogen")) {
|
||||||
ipa_topo_util_missing_agmts_add(tconf, tsegm,
|
ipa_topo_util_missing_agmts_add(tconf, tsegm,
|
||||||
ipa_topo_get_plugin_hostname());
|
ipa_topo_get_plugin_hostname());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ ipa_topo_connection_fanout(TopoReplica *tconf, TopoReplicaSegment *tseg)
|
|||||||
TopoReplicaSegmentList *seglist = tconf->repl_segments;
|
TopoReplicaSegmentList *seglist = tconf->repl_segments;
|
||||||
while (seglist) {
|
while (seglist) {
|
||||||
segm = seglist->segm;
|
segm = seglist->segm;
|
||||||
if (strcasecmp(segm->name, tseg->name) != 0) {
|
if (strcasecmp(segm->name, tseg->name)) {
|
||||||
if (segm->direct == SEGMENT_LEFT_RIGHT ||
|
if (segm->direct == SEGMENT_LEFT_RIGHT ||
|
||||||
segm->direct == SEGMENT_BIDIRECTIONAL ) {
|
segm->direct == SEGMENT_BIDIRECTIONAL ) {
|
||||||
fout = ipa_topo_connection_fanout_extend(fout, segm->from, segm->to);
|
fout = ipa_topo_connection_fanout_extend(fout, segm->from, segm->to);
|
||||||
@@ -339,9 +339,8 @@ ipa_topo_check_segment_is_valid(Slapi_PBlock *pb, char **errtxt)
|
|||||||
*errtxt = slapi_ch_smprintf("Segment definition is incomplete"
|
*errtxt = slapi_ch_smprintf("Segment definition is incomplete"
|
||||||
". Add rejected.\n");
|
". Add rejected.\n");
|
||||||
rc = 1;
|
rc = 1;
|
||||||
} else if ((strcasecmp(dir,SEGMENT_DIR_BOTH) != 0) &&
|
} else if (strcasecmp(dir,SEGMENT_DIR_BOTH) && strcasecmp(dir,SEGMENT_DIR_LEFT_ORIGIN) &&
|
||||||
(strcasecmp(dir,SEGMENT_DIR_LEFT_ORIGIN) != 0) &&
|
strcasecmp(dir,SEGMENT_DIR_RIGHT_ORIGIN)) {
|
||||||
(strcasecmp(dir,SEGMENT_DIR_RIGHT_ORIGIN) != 0)) {
|
|
||||||
*errtxt = slapi_ch_smprintf("Segment has unsupported direction"
|
*errtxt = slapi_ch_smprintf("Segment has unsupported direction"
|
||||||
". Add rejected.\n");
|
". Add rejected.\n");
|
||||||
slapi_log_error(SLAPI_LOG_FATAL, IPA_TOPO_PLUGIN_SUBSYSTEM,
|
slapi_log_error(SLAPI_LOG_FATAL, IPA_TOPO_PLUGIN_SUBSYSTEM,
|
||||||
|
|||||||
@@ -545,7 +545,7 @@ ipa_topo_util_set_agmt_rdn(TopoReplicaAgmt *topo_agmt, Slapi_Entry *repl_agmt)
|
|||||||
Slapi_RDN *agmt_rdn = slapi_rdn_new();
|
Slapi_RDN *agmt_rdn = slapi_rdn_new();
|
||||||
slapi_sdn_get_rdn(agmt_dn, agmt_rdn);
|
slapi_sdn_get_rdn(agmt_dn, agmt_rdn);
|
||||||
const char *agmt_rdn_str = slapi_rdn_get_rdn(agmt_rdn);
|
const char *agmt_rdn_str = slapi_rdn_get_rdn(agmt_rdn);
|
||||||
if (strcasecmp(agmt_rdn_str, topo_agmt->rdn) != 0) {
|
if (strcasecmp(agmt_rdn_str, topo_agmt->rdn)) {
|
||||||
slapi_ch_free_string(&topo_agmt->rdn);
|
slapi_ch_free_string(&topo_agmt->rdn);
|
||||||
topo_agmt->rdn = slapi_ch_strdup(agmt_rdn_str);
|
topo_agmt->rdn = slapi_ch_strdup(agmt_rdn_str);
|
||||||
}
|
}
|
||||||
@@ -669,7 +669,7 @@ ipa_topo_util_update_agmt_list(TopoReplica *conf, TopoReplicaSegmentList *repl_s
|
|||||||
}
|
}
|
||||||
agmt_attr_val = slapi_entry_attr_get_charptr(repl_agmt,mattrs[i]);
|
agmt_attr_val = slapi_entry_attr_get_charptr(repl_agmt,mattrs[i]);
|
||||||
if (agmt_attr_val == NULL ||
|
if (agmt_attr_val == NULL ||
|
||||||
(strcasecmp(agmt_attr_val,segm_attr_val) != 0)) {
|
strcasecmp(agmt_attr_val,segm_attr_val)) {
|
||||||
/* value does not exist in agmt or
|
/* value does not exist in agmt or
|
||||||
* is different from segment: replace
|
* is different from segment: replace
|
||||||
*/
|
*/
|
||||||
@@ -1185,8 +1185,8 @@ ipa_topo_util_segment_merge(TopoReplica *tconf,
|
|||||||
|
|
||||||
if (tsegm->direct == SEGMENT_BIDIRECTIONAL) return;
|
if (tsegm->direct == SEGMENT_BIDIRECTIONAL) return;
|
||||||
|
|
||||||
if ((strcasecmp(tsegm->from,ipa_topo_get_plugin_hostname()) != 0) &&
|
if (strcasecmp(tsegm->from,ipa_topo_get_plugin_hostname()) &&
|
||||||
(strcasecmp(tsegm->to,ipa_topo_get_plugin_hostname()) != 0)) {
|
strcasecmp(tsegm->to,ipa_topo_get_plugin_hostname())) {
|
||||||
/* merging is only done on one of the endpoints of the segm */
|
/* merging is only done on one of the endpoints of the segm */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-2
@@ -23,6 +23,12 @@ help:
|
|||||||
%: Makefile
|
%: Makefile
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
|
.PHONY: workshop-remote workshop-pull
|
||||||
|
workshop-remote:
|
||||||
|
git remote add -f freeipa-workshop https://github.com/freeipa/freeipa-workshop.git
|
||||||
|
workshop-pull:
|
||||||
|
git pull -s subtree freeipa-workshop master
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint:
|
lint:
|
||||||
$(MAKE) html SPHINXOPTS="$(SPHINXOPTS) -E -a"
|
$(MAKE) html SPHINXOPTS="$(SPHINXOPTS) -E -a"
|
||||||
@@ -35,5 +41,4 @@ distclean: clean
|
|||||||
venv:
|
venv:
|
||||||
$(PYTHON) -m venv $(VENVDIR)
|
$(PYTHON) -m venv $(VENVDIR)
|
||||||
$(VENVDIR)/bin/python3 -m pip install -U pip setuptools
|
$(VENVDIR)/bin/python3 -m pip install -U pip setuptools
|
||||||
$(VENVDIR)/bin/python3 -m pip install -U -r ./requirements.txt \
|
$(VENVDIR)/bin/python3 -m pip install -U -r ./requirements.txt
|
||||||
-c constraints.txt
|
|
||||||
Vendored
-4
@@ -1,4 +0,0 @@
|
|||||||
section ul.simple li {
|
|
||||||
list-style: disc;
|
|
||||||
margin-left: 1em;
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _A6Record:
|
|
||||||
|
|
||||||
# A6Record
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
A6 DNS record.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _AAAARecord:
|
|
||||||
|
|
||||||
# AAAARecord
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
AAAA DNS record.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _AFSDBRecord:
|
|
||||||
|
|
||||||
# AFSDBRecord
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
AFSDB DNS record.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _APLRecord:
|
|
||||||
|
|
||||||
# APLRecord
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
APL DNS record.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _ARecord:
|
|
||||||
|
|
||||||
# ARecord
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
A DNS record.
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _AccessTime:
|
|
||||||
|
|
||||||
# AccessTime
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
Access time parameter type.
|
|
||||||
|
|
||||||
Accepts values conforming to generalizedTime as defined in RFC 4517 section 3.3.13 without time zone information.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _Any:
|
|
||||||
|
|
||||||
# Any
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
A parameter capable of holding values of any type. For internal use only.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _BinaryFile:
|
|
||||||
|
|
||||||
# BinaryFile
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
Binary file parameter type.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _Bool:
|
|
||||||
|
|
||||||
# Bool
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
A parameter for boolean values (stored in the ``bool`` type).
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _Bytes:
|
|
||||||
|
|
||||||
# Bytes
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
A parameter for binary data (stored in the ``str`` type).
|
|
||||||
This class is named *Bytes* instead of *Str* so it's aligned with the
|
|
||||||
Python v3 ``(str, unicode) => (bytes, str)`` clean-up.
|
|
||||||
See: http://docs.python.org/3.0/whatsnew/3.0.html
|
|
||||||
Also see the `Str` parameter.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _BytesEnum:
|
|
||||||
|
|
||||||
# BytesEnum
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
Enumerable for binary data (stored in the ``str`` type).
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _CERTRecord:
|
|
||||||
|
|
||||||
# CERTRecord
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
CERT DNS record.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _CNAMERecord:
|
|
||||||
|
|
||||||
# CNAMERecord
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
CNAME DNS record.
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _Certificate:
|
|
||||||
|
|
||||||
# Certificate
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _CertificateSigningRequest:
|
|
||||||
|
|
||||||
# CertificateSigningRequest
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _DHCIDRecord:
|
|
||||||
|
|
||||||
# DHCIDRecord
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
DHCID DNS record.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _DLVRecord:
|
|
||||||
|
|
||||||
# DLVRecord
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
DLV DNS record.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _DNAMERecord:
|
|
||||||
|
|
||||||
# DNAMERecord
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
DNAME DNS record.
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _DNOrURL:
|
|
||||||
|
|
||||||
# DNOrURL
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
DN parameter that allows, and strips, a "ldap:///" prefix on input.
|
|
||||||
|
|
||||||
Used for ``subtree`` to maintain backward compatibility.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _DNParam:
|
|
||||||
|
|
||||||
# DNParam
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
LDAP DN.
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _DNSNameParam:
|
|
||||||
|
|
||||||
# DNSNameParam
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
Domain name parameter type.
|
|
||||||
|
|
||||||
* `only_absolute`: a domain name has to be absolute (makes it absolute from unicode input)
|
|
||||||
* `only_relative`: a domain name has to be relative
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _DNSRecord:
|
|
||||||
|
|
||||||
# DNSRecord
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
Base class for DNS records, subclass of `Str`.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _DSRecord:
|
|
||||||
|
|
||||||
# DSRecord
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
DS DNS record.
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _Data:
|
|
||||||
|
|
||||||
# Data
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
Base class for the `Bytes` and `Str` parameters.
|
|
||||||
|
|
||||||
Previously `Str` was as subclass of `Bytes`. Now the common functionality
|
|
||||||
has been split into this base class so that ``isinstance(foo, Bytes)`` wont
|
|
||||||
be ``True`` when ``foo`` is actually an `Str` instance (which is confusing).
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _DateTime:
|
|
||||||
|
|
||||||
# DateTime
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
DateTime parameter type.
|
|
||||||
|
|
||||||
Accepts LDAP Generalized time without in the following format:
|
|
||||||
'%Y%m%d%H%M%SZ'
|
|
||||||
|
|
||||||
Accepts subset of values defined by ISO 8601:
|
|
||||||
'%Y-%m-%dT%H:%M:%SZ'
|
|
||||||
'%Y-%m-%dT%H:%MZ'
|
|
||||||
'%Y-%m-%dZ'
|
|
||||||
|
|
||||||
Also accepts above formats using ' ' (space) as a separator instead of 'T'.
|
|
||||||
|
|
||||||
Refer to the `man strftime` for the explanations for the %Y,%m,%d,%H.%M,%S.
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _Decimal:
|
|
||||||
|
|
||||||
# Decimal
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
A parameter for floating-point values (stored in the ``Decimal`` type).
|
|
||||||
|
|
||||||
Python Decimal type helps overcome problems tied to plain "float" type,
|
|
||||||
e.g. problem with representation or value comparison. In order to safely
|
|
||||||
transfer the value over RPC libraries, it is being converted to string
|
|
||||||
which is then converted back to Decimal number.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _Dict:
|
|
||||||
|
|
||||||
# Dict
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
A parameter for dictionary.
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _Enum:
|
|
||||||
|
|
||||||
# Enum
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
Base class for parameters with enumerable values.
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
[//]: # (THE CONTENT BELOW IS GENERATED. DO NOT EDIT.)
|
|
||||||
.. _File:
|
|
||||||
|
|
||||||
# File
|
|
||||||
[//]: # (ADD YOUR NOTES BELOW. THESE WILL BE PICKED EVERY TIME THE DOCS ARE REGENERATED. //end)
|
|
||||||
|
|
||||||
Text file parameter type.
|
|
||||||
|
|
||||||
Accepts file names and loads their content into the parameter value.
|
|
||||||
Loaded 100 of 1134 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user