Skip to content

Commit 16582a1

Browse files
author
Dylan
committed
style: adjust code changes to display as diff instead
1 parent 7a03aef commit 16582a1

3 files changed

Lines changed: 44 additions & 6 deletions

File tree

docs/saml/image-2.png

-703 KB
Binary file not shown.

docs/saml/image-3.png

-302 KB
Binary file not shown.

docs/saml/saml.md

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,62 @@
11
# Zero Trust Proxy Configurtion
22

3-
The first change is in `/etc/shibboleth/shibboleth2.xml`
3+
To get an overview of what we will be working with later we start in `/etc/shibboleth/shibboleth2.xml` (no changes needed here)
4+
5+
- Here in the `ApplicationDefaults` section we have configured the policy that determines what our `REMOTE_USER` value will be as it flows through the proxy. The current set up is to check for eppn, then persistent-id, then finally targeted-id and then assign it to `REMOTE_USER`.
46

57
![image of shibboleth2.xml configuration in terminal](image.png)
68

7-
- Here in the `ApplicationDefaults` section we configure the policy that determines what our `REMOTE_USER` value will be as it flows through the proxy. The current set up is to check for eppn, then persistent-id, then finally targeted-id and then assign it to `REMOTE_USER`.
89

9-
Our next change is in to `/etc/shibboleth/attribute-map.xml`
10-
![image of attribute-map.xml](image-1.png)
10+
11+
Next we will look at `/etc/shibboleth/attribute-map.xml`
1112

1213
- In this file we can configure how the eppn value is decoded. In the current configuration we have left it as scoped but its possible to transform it into a simple string value as well
1314

15+
![image of attribute-map.xml](image-1.png)
16+
17+
1418
Here in `/etc/shibboleth/attribute-policy.xml` there are a few more change points
15-
![shibboleth attribute-policy xml file](image-2.png)
1619

1720
- First is the highlighted section showing the eppn. We currently have the `PermitValueRule` set to `basic:ANY` to allow the value to flow through simply as it is. Previously we were using the `PermitValueRuleReference ScopingRules` which can be seen towards the top of the screenshot, this policy defines what an acceptable value is for the rules that reference it.
1821

22+
```diff
23+
<afp:AttributeRule attributeID="eppn">
24+
+ <afp:PermitValueRule xsi:type="basic:ANY" />
25+
</afp:AtttributeRule>
26+
27+
<afp:AttributeRule attributeID="eppn">
28+
- <afp:PermitValueRuleReference ref="ScopingRules" />
29+
</afp:AtttributeRule>
30+
```
31+
32+
1933
In `/etc/httpd/conf.d/front-end.conf` we have a completely new entry
20-
![apache front-end.conf configuration file](image-3.png)
2134

2235
- From the top we set a wide-open location match that will allow the application behind the proxy to be able to easily check back in with the proxy for each request (applying a zero trust-esque flow). In the auth section below we set up this location to require shibboleth and currently let the application handle what to do with an unauthorized user.
2336

2437
- In the next block we preform one of two different regex matches depending on if a user has a BlazerID or if they are a XIAS user. Then we update REMOTE_USER and send it back down to the application
38+
39+
```diff
40+
+<LocationMatch "/.*">
41+
+ AuthType shibboleth
42+
+ ShibRequestSetting requireSession false
43+
+ Require shibboleth
44+
+ ShibUseHeaders On
45+
46+
+ #these lines match know EPPNs
47+
+ #Matches a standard BlazerId
48+
+ RewriteCond %{LA-U:REMOTE_USER} ^([a-zA-Z1-0_.+-]+@uab.edu)$ [OR]
49+
+ #Matches a xias account with the @uab domain at the end
50+
+ RewriteCond %{LA-U:REMOTE_USER} ^(.*@[^@]*?)@uab.edu$
51+
+ RewriteRule . - [E=REMOTE_USER%1]
52+
53+
+ #this section applies the changes we have made above to the REMOTE_USER value that we send downstream
54+
+ RequestHeader set REMOTE_USER "expr=%{ENV:REMOTE_USER}"
55+
+ RequestHeader set X-Forwarded-Scheme http
56+
+
57+
+ #these are placeholder values, for an actual application we would simply insert the ip/dns entry for the application itself
58+
+ ProxyPass http://login001/
59+
+ ProxyPassReverse http://login001/
60+
+</LocationMatch>
61+
</VirtualHost>
62+
```

0 commit comments

Comments
 (0)