Skip to content

Commit df9cfd3

Browse files
author
Fredrik Orderud
committed
Enable TLS-only client authentication by default
Done to make default builds of this EST server better conform to RFC 7030 that recommend TLS-based client authentication, whereas HTTP-based authentication is optional. Extract from RFC 7030 section 3.3.2. TLS-Based Client Authentication: TLS client authentication is the RECOMMENDED method for identifying EST clients. HTTP-based client authentication (Section 3.2.3) MAY be used.
1 parent a464ba8 commit df9cfd3

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

example/client/README

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ To run the example:
117117
5. Optionally, you can use a certificate to identify the EST client
118118
to the server instead of specifying the HTTP user name/password.
119119
Now that you've enrolled a certificate in step #3
120-
above, you can use that certificate to enroll again. Note, your
121-
EST server should be configured not to force HTTP authentication.
120+
above, you can use that certificate to enroll again.
122121

123122
First, convert the pkcs7 cert from step 3 to a PEM cert:
124123

example/server/estserver.c

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ static int http_digest_auth = 0;
9393
static int http_basic_auth = 0;
9494
static int http_token_auth = 0;
9595
static int http_auth_disable = 0;
96-
static int disable_forced_http_auth = 0;
9796
static int enable_enhcd_cert_auth = 0;
9897
static int set_cert_auth_ah_pwd = 0;
9998
static EST_ECA_CSR_CHECK_FLAG enhcd_cert_csr_check_on = ECA_CSR_CHECK_OFF;
@@ -232,7 +231,6 @@ static void show_usage_and_exit (void)
232231
" -t Enable check for binding client PoP to the TLS UID\n"
233232
" -m <seconds> Simulate manual CA enrollment\n"
234233
" -n Disable HTTP authentication (TLS client auth required)\n"
235-
" -o Disable HTTP authentication when TLS client auth succeeds\n"
236234
" -h Use HTTP Digest auth instead of Basic auth\n"
237235
" -b Use HTTP Basic auth. Causes explicit call to set Basic auth\n"
238236
" -p <num> TCP port number to listen on\n"
@@ -2244,9 +2242,6 @@ int main (int argc, char **argv)
22442242
case 'n':
22452243
http_auth_disable = 1;
22462244
break;
2247-
case 'o':
2248-
disable_forced_http_auth = 1;
2249-
break;
22502245
case 'v':
22512246
verbose = 1;
22522247
break;
@@ -2509,14 +2504,13 @@ int main (int argc, char **argv)
25092504
exit(1);
25102505
}
25112506
}
2512-
if (disable_forced_http_auth) {
2513-
if (verbose)
2514-
printf(
2515-
"\nDisabling HTTP authentication when TLS client auth succeeds\n");
2516-
if (est_set_http_auth_required(ectx, HTTP_AUTH_NOT_REQUIRED)) {
2517-
printf("\nUnable to disable required HTTP auth. Aborting!!!\n");
2518-
exit(1);
2519-
}
2507+
2508+
if (verbose)
2509+
printf(
2510+
"\nDisabling HTTP authentication when TLS client auth succeeds\n");
2511+
if (est_set_http_auth_required(ectx, HTTP_AUTH_NOT_REQUIRED)) {
2512+
printf("\nUnable to disable required HTTP auth. Aborting!!!\n");
2513+
exit(1);
25202514
}
25212515

25222516
if (http_digest_auth) {

0 commit comments

Comments
 (0)