Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

Commit 8252852

Browse files
xensBojanZelic
authored andcommitted
doc: slightly rework the README
1 parent 6c83e9f commit 8252852

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

README.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,39 @@
1-
Name
2-
====
1+
# Name
32

43
haproxy-cloudflare-jwt-validator - JSON Web Token validation for haproxy
54

6-
Description
7-
===========
5+
# Description
86

97
This was tested & developed with HAProxy version 1.8.25 & Lua version 5.3.
108
This library provides the ability to validate JWT headers sent by Cloudflare Access.
119

12-
Installation
13-
============
10+
# Installation
1411

1512
Install the following dependencies:
13+
1614
* [haproxy-lua-http](https://github.com/haproxytech/haproxy-lua-http)
1715
* [rxi/json](https://github.com/rxi/json.lua)
1816
* [wahern/luaossl](https://github.com/wahern/luaossl)
1917

2018
Extract base64.lua & jwtverify.lua to the same directory like so:
2119

22-
```
20+
```shell
2321
git clone [email protected]:kudelskisecurity/haproxy-cloudflare-jwt-validator.git
2422
sudo cp haproxy-cloudflare-jwt-validator/src/* /usr/local/share/lua/5.3
2523
```
2624

27-
Version
28-
=======
29-
0.1.0
30-
25+
# Version
3126

32-
Usage
33-
=====
27+
0.1.0
3428

35-
###Configuration:
29+
# Usage
3630

3731
JWT Issuer: `https://test.cloudflareaccess.com` (replace with yours in the config below)
3832

3933
Add the following settings in your `/etc/haproxy/haproxy.cfg` file:
4034

4135
Define a HAProxy backend, DNS Resolver, and ENV variables with the following names:
36+
4237
```
4338
global
4439
lua-load /usr/local/share/lua/5.3/jwtverify.lua
@@ -59,7 +54,7 @@ resolvers dnsresolver
5954
hold valid 10s
6055
```
6156

62-
Obtain your Application Audience (AUD) Tag from cloudflare and define your backend with JWT validation:
57+
Obtain your Application Audience (AUD) Tag from Cloudflare and define your backend with JWT validation:
6358

6459
```
6560
backend my_jwt_validated_app
@@ -69,4 +64,4 @@ backend my_jwt_validated_app
6964
http-request lua.jwtverify
7065
http-request deny unless { var(txn.authorized) -m bool }
7166
server haproxy 127.0.0.1:8080
72-
```
67+
```

0 commit comments

Comments
 (0)