Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
Signed-off-by: chodges15 <[email protected]>
  • Loading branch information
chodges15 authored and chodges15 committed Mar 1, 2023
1 parent 7e1d1b8 commit f58eb40
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.8.2 / 2023-02-28

* [FEATURE] Add configuration for verifying the presence of an address in the Subject Alternate Name of the TLS cert provided by the client. #126

## 0.8.1 / 2022-10-21

* [BUGFIX] Fix systemd activation flag when using a custom kingpin app. #118
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.1
0.8.2
5 changes: 5 additions & 0 deletions docs/web-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ tls_server_config:
# CA certificate for client certificate authentication to the server.
[ client_ca_file: <filename> ]
# Verify that the client certificate has a Subject Alternate Name (SAN) which includes the following
# regex pattern, else terminate connection. SAN match can be one or multiple of the following:
# DNS, IP, e-mail, or URI address from https://pkg.go.dev/crypto/x509#Certificate.
[ client_allowed_san_regex: <string> | default ""]
# Minimum TLS version that is acceptable.
[ min_version: <string> | default = "TLS12" ]
Expand Down
2 changes: 0 additions & 2 deletions web/tls_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ func (t *TLSConfig) VerifyPeerCertificate(rawCerts [][]byte, verifiedChains [][]
}
}

//todo: check other fields of the cert

return fmt.Errorf("could not find configured SAN in client cert: %s", t.ClientAllowedSanRegex)
}

Expand Down

0 comments on commit f58eb40

Please sign in to comment.