Skip to content

Commit 0cb4e88

Browse files
authored
Lab8 fixes after running through clean install (#58)
* Lab8 fixes after running through clean install * Found the issue - nginx.conf has the resolve items which seems cleaner. * Cleaned up Lab9 with all the previous labs done.
1 parent 4d2ae50 commit 0cb4e88

14 files changed

+93
-93
lines changed

labs/lab7/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ Now that you have a self signed TLS certificate for testing, you will configure
286286
287287
![Browser Cert Invalid](media/lab7_browser_cert_invalid.png)
288288
289-
1. You can use browser's built-in certificate viewer to look at the details of the TLS certificate that was sent from NGINX to your browser. In address bar, click on the `Not Secure` icon, then click on `Certificate is not valid`. This will display the certificate. You can verify looking at the `Comman Name` field that this is the same certificate that you provided to NGINX for Azure resource.
289+
1. You can use browser's built-in certificate viewer to look at the details of the TLS certificate that was sent from NGINX to your browser. In the address bar, click on the `Not Secure` icon, then click on `Certificate is not valid`. This will display the certificate. You can verify looking at the `Common Name` field that this is the same certificate that you provided to NGINX for Azure resource.
290290

291291
![Browser Cert Details](media/lab7_browser_cert_details.png)
292292

labs/lab8/cafe.example.com.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
server {
55

66
# Include AzureAD Auth configuration files
7-
include /etc/nginx/conf.d/oidc/openid_connect.server_conf; # Authorization code flow and Relying Party processing
7+
include /etc/nginx/oidc/openid_connect.server_conf; # Authorization code flow and Relying Party processing
88

99
listen 443 ssl; # Listening on port 443 with "ssl" parameter for terminating TLS on all IP addresses on this machine
1010

96.1 KB
Loading
135 KB
Loading
70 KB
Loading
88.7 KB
Loading

labs/lab8/media/lab8_overview.png

71.1 KB
Loading
91.9 KB
Loading

labs/lab8/nginx.conf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ http {
6666

6767
stream {
6868

69+
resolver 127.0.0.1:49153 valid=20s;
70+
71+
server {
72+
listen 9000; # should match the port specified with zone_sync_server
73+
74+
zone_sync;
75+
zone_sync_server internal.nginxaas.nginx.com:9000 resolve;
76+
}
77+
6978
include /etc/nginx/stream/*.conf; # Stream TCP nginx files
7079

7180
}

labs/lab8/openid_connect.server_conf

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
# Nginx for Azure / OpenID Connect configuration
2-
# Chris Akker, Shouvik Dutta, Adam Currier - Mar 2024
3-
#
4-
# Advanced configuration START
1+
# Advanced configuration START
52
set $internal_error_message "NGINX / OpenID Connect login failure\n";
63
set $pkce_id "";
74
resolver 8.8.8.8; # For DNS lookup of IdP endpoints;
85
subrequest_output_buffer_size 32k; # To fit a complete tokenset response
96
gunzip on; # Decompress IdP responses if necessary
107
# Advanced configuration END
118

12-
js_import oidc from /etc/nginx/oidc/openid_connect.js;
13-
149
location = /_jwks_uri {
1510
internal;
1611
proxy_cache jwk; # Cache the JWK Set recieved from IdP
@@ -34,9 +29,9 @@
3429
# This location is called by the IdP after successful authentication
3530
status_zone "OIDC code exchange";
3631
js_content oidc.codeExchange;
37-
error_page 500 502 504 @oidc_error;
32+
error_page 500 502 504 @oidc_error;
3833
}
39-
34+
4035
location = /_token {
4136
# This location is called by oidcCodeExchange(). We use the proxy_ directives
4237
# to construct the OpenID Connect token request, as per:
@@ -90,3 +85,5 @@
9085
default_type text/plain;
9186
return 500 $internal_error_message;
9287
}
88+
89+
# vim: syntax=nginx

0 commit comments

Comments
 (0)