Commit 236743f
Add TLS support for Registrar communication
This change enables TLS-based communication with the Registrar service
in the push model agent, providing secure registration and activation.
Key changes:
- Added registrar_tls_enabled, registrar_tls_ca_cert,
registrar_tls_client_cert, and registrar_tls_client_key configuration
options with empty defaults for backwards compatibility
- Updated RegistrarClientBuilder to accept TLS configuration parameters
(ca_certificate, certificate, key, insecure, timeout)
- Modified RegistrarClient to use HTTPS client when TLS is configured,
falling back to plain HTTP when TLS parameters are not provided
- Refactored to use single ResilientClient for all HTTP/HTTPS requests
instead of maintaining separate client instances
- Added RegistrarTlsConfig struct in push model agent to manage TLS
configuration from config file
- Updated StateMachine to accept and pass registrar_tls_config to
registration functions
Backwards compatibility:
- Defaults to plain HTTP when registrar_tls_enabled is false (default)
- Defaults to plain HTTP when TLS certificate paths are empty (default)
- TLS only enabled when all three certificate paths are provided AND
registrar_tls_enabled is true
- Pull model agent unchanged - maintains existing behavior with None
values for all new TLS fields
The implementation separates Registrar TLS configuration from Verifier
TLS configuration, allowing each service to be secured independently
based on deployment requirements.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>1 parent 672bc1b commit 236743f
File tree
8 files changed
+311
-87
lines changed- keylime-agent/src
- keylime-push-model-agent/src
- keylime/src
- config
8 files changed
+311
-87
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
620 | 626 | | |
621 | 627 | | |
622 | 628 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
178 | 205 | | |
179 | 206 | | |
180 | 207 | | |
181 | 208 | | |
182 | 209 | | |
| 210 | + | |
183 | 211 | | |
184 | 212 | | |
185 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
11 | 19 | | |
12 | 20 | | |
| 21 | + | |
13 | 22 | | |
14 | 23 | | |
15 | | - | |
16 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
17 | 29 | | |
18 | 30 | | |
19 | 31 | | |
| |||
41 | 53 | | |
42 | 54 | | |
43 | 55 | | |
| 56 | + | |
44 | 57 | | |
45 | 58 | | |
46 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
47 | 73 | | |
48 | 74 | | |
49 | 75 | | |
| |||
55 | 81 | | |
56 | 82 | | |
57 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
58 | 89 | | |
59 | 90 | | |
60 | 91 | | |
| |||
111 | 142 | | |
112 | 143 | | |
113 | 144 | | |
114 | | - | |
| 145 | + | |
115 | 146 | | |
116 | 147 | | |
117 | 148 | | |
| |||
136 | 167 | | |
137 | 168 | | |
138 | 169 | | |
139 | | - | |
| 170 | + | |
140 | 171 | | |
141 | 172 | | |
142 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| |||
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
107 | | - | |
108 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
109 | 116 | | |
110 | 117 | | |
111 | 118 | | |
| |||
263 | 270 | | |
264 | 271 | | |
265 | 272 | | |
| 273 | + | |
| 274 | + | |
266 | 275 | | |
267 | 276 | | |
268 | 277 | | |
| |||
272 | 281 | | |
273 | 282 | | |
274 | 283 | | |
| 284 | + | |
275 | 285 | | |
276 | 286 | | |
277 | 287 | | |
| |||
425 | 435 | | |
426 | 436 | | |
427 | 437 | | |
| 438 | + | |
428 | 439 | | |
429 | 440 | | |
430 | 441 | | |
| |||
437 | 448 | | |
438 | 449 | | |
439 | 450 | | |
| 451 | + | |
440 | 452 | | |
441 | 453 | | |
442 | 454 | | |
| |||
611 | 623 | | |
612 | 624 | | |
613 | 625 | | |
614 | | - | |
615 | | - | |
616 | | - | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
617 | 631 | | |
618 | 632 | | |
619 | 633 | | |
| |||
654 | 668 | | |
655 | 669 | | |
656 | 670 | | |
657 | | - | |
658 | | - | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
659 | 676 | | |
660 | 677 | | |
661 | 678 | | |
| |||
704 | 721 | | |
705 | 722 | | |
706 | 723 | | |
| 724 | + | |
707 | 725 | | |
708 | 726 | | |
709 | 727 | | |
| |||
766 | 784 | | |
767 | 785 | | |
768 | 786 | | |
| 787 | + | |
769 | 788 | | |
770 | 789 | | |
771 | 790 | | |
| |||
793 | 812 | | |
794 | 813 | | |
795 | 814 | | |
| 815 | + | |
796 | 816 | | |
797 | 817 | | |
798 | 818 | | |
| |||
816 | 836 | | |
817 | 837 | | |
818 | 838 | | |
| 839 | + | |
819 | 840 | | |
820 | 841 | | |
821 | 842 | | |
| |||
852 | 873 | | |
853 | 874 | | |
854 | 875 | | |
| 876 | + | |
855 | 877 | | |
856 | 878 | | |
857 | 879 | | |
| |||
878 | 900 | | |
879 | 901 | | |
880 | 902 | | |
| 903 | + | |
881 | 904 | | |
882 | 905 | | |
883 | 906 | | |
| |||
901 | 924 | | |
902 | 925 | | |
903 | 926 | | |
| 927 | + | |
904 | 928 | | |
905 | 929 | | |
906 | 930 | | |
| |||
928 | 952 | | |
929 | 953 | | |
930 | 954 | | |
| 955 | + | |
931 | 956 | | |
932 | 957 | | |
933 | 958 | | |
| |||
959 | 984 | | |
960 | 985 | | |
961 | 986 | | |
| 987 | + | |
962 | 988 | | |
963 | 989 | | |
964 | 990 | | |
| |||
985 | 1011 | | |
986 | 1012 | | |
987 | 1013 | | |
| 1014 | + | |
988 | 1015 | | |
989 | 1016 | | |
990 | 1017 | | |
| |||
1000 | 1027 | | |
1001 | 1028 | | |
1002 | 1029 | | |
| 1030 | + | |
1003 | 1031 | | |
1004 | 1032 | | |
1005 | 1033 | | |
| |||
1024 | 1052 | | |
1025 | 1053 | | |
1026 | 1054 | | |
| 1055 | + | |
1027 | 1056 | | |
1028 | 1057 | | |
1029 | 1058 | | |
| |||
1051 | 1080 | | |
1052 | 1081 | | |
1053 | 1082 | | |
| 1083 | + | |
1054 | 1084 | | |
1055 | 1085 | | |
1056 | 1086 | | |
| |||
1083 | 1113 | | |
1084 | 1114 | | |
1085 | 1115 | | |
| 1116 | + | |
1086 | 1117 | | |
1087 | 1118 | | |
1088 | 1119 | | |
| |||
0 commit comments