Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand authentication with mTLS #554

Merged
merged 18 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/secret_scanning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
paths-ignore:
- "quickstart/exampledata/config/credentials.yml"
- "quickstart/exampledata/config/nginx/mtls.conf.d/*.key"
- "quickstart/exampledata/config/nginx/mtls.conf.d/*.crt"
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
### Breaking
### Features

* retrieve oauth token automatically from different oauth endpoints by introducing an additional file to
define the credentials for every configuration source
* introducing an additional file to define the credentials for every configuration source
* retrieve oauth token automatically from different oauth endpoints
* retrieve configruation with mTLS authentication

#### Improvements
### Bugfix
Expand Down
20 changes: 19 additions & 1 deletion doc/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,23 @@ Run with getting config from http server with basic authentication
logprep run http://localhost:8081/config/pipeline.yml


Run with getting config from http server with mTLS authentication
-----------------------------------------------------------------

* Run from within the `quickstart` directory:

.. code-block:: bash

docker compose --profile mtls up -d

* Run within the project root directory:

.. code-block:: bash

export LOGPREP_CREDENTIALS_FILE="quickstart/exampledata/config/credentials.yml"
logprep run https://localhost:8082/config/pipeline.yml


Run with getting config from FDA with oauth2 authentication
-----------------------------------------------------------

Expand Down Expand Up @@ -159,7 +176,8 @@ Opensearch: `localhost:9200` / /
Opensearch Dashboards: `localhost:5601` / /
Grafana Dashboards: `localhost:3000` admin admin
Prometheus: `localhost:9090` / /
Nginx: `localhost:8081` user password
Nginx Basic Auth: `localhost:8081` user password
Nginx mTLS: `localhost:8082`
Keycloak: `localhost:8080` admin admin
Keycloak Postgres: `localhost:5432` keycloak bitnami
FDA: `localhost:8002` logprep logprep
Expand Down
64 changes: 62 additions & 2 deletions logprep/util/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@
# example for Basic Authentication with inline password
username: <username>
password: <plaintext password> # will be overwritten if 'password_file' is given
"http://target.url":
# example for mTLS authentication
client_key: <path/to/client/key/file>
cert: <path/to/certificate/file>
"http://target.url":
# example for mTLS authentication with ca cert given
client_key: <path/to/client/key/file>
cert: <path/to/certificate/file>
ca_cert: <path/to/ca/cert>

Options for the credentials file are:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -66,6 +75,9 @@
.. autoclass:: logprep.util.credentials.OAuth2PasswordFlowCredentials
:members: endpoint, client_id, client_secret, username, password
:no-index:
.. autoclass:: logprep.util.credentials.MTLSCredentials
:members: client_key, cert, ca_cert
:no-index:

Authentication Process:
^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -197,7 +209,8 @@ def _resolve_secret_content(credential_mapping: dict):

@classmethod
def from_dict(cls, credential_mapping: dict) -> "Credentials":
"""matches the given credentials of the credentials mapping with the expected credential object"""
"""matches the given credentials of the credentials mapping
with the expected credential object"""
if credential_mapping:
cls._resolve_secret_content(credential_mapping)
try:
Expand Down Expand Up @@ -229,6 +242,29 @@ def _match_credentials(cls, credential_mapping: dict) -> "Credentials":
extra_params.keys(),
)
return OAuth2TokenCredentials(token=token)
case {
"client_key": client_key,
"cert": cert,
"ca_cert": ca_cert,
**extra_params,
}:
if extra_params:
cls._logger.warning(
"Other parameters were given: %s but OAuth token authorization was chosen",
extra_params.keys(),
)
return MTLSCredentials(client_key=client_key, cert=cert, ca_cert=ca_cert)
case {
"client_key": client_key,
"cert": cert,
**extra_params,
}:
if extra_params:
cls._logger.warning(
"Other parameters were given: %s but OAuth token authorization was chosen",
extra_params.keys(),
)
return MTLSCredentials(client_key=client_key, cert=cert)
case {
"endpoint": endpoint,
"client_id": client_id,
Expand Down Expand Up @@ -333,6 +369,7 @@ class Credentials:
_session: Session = field(validator=validators.instance_of((Session, type(None))), default=None)

def get_session(self):
"""returns session with retry configuration"""
if self._session is None:
self._session = Session()
max_retries = 3
Expand Down Expand Up @@ -438,7 +475,8 @@ class OAuth2PasswordFlowCredentials(Credentials):
client_secret: str = field(
validator=validators.instance_of((str, type(None))), default=None, repr=False
)
"""The client secret for the token request. This is used to authenticate the client. (Optional)"""
"""The client secret for the token request.
This is used to authenticate the client. (Optional)"""
_token: AccessToken = field(
validator=validators.instance_of((AccessToken, type(None))),
init=False,
Expand Down Expand Up @@ -574,3 +612,25 @@ def _get_token(self) -> AccessToken:
expires_in = token_response.get("expires_in")
self._token = AccessToken(token=access_token, expires_in=expires_in)
return self._token


@define(kw_only=True)
class MTLSCredentials(Credentials):
"""class for mTLS authentification"""

client_key: str = field(validator=validators.instance_of(str))
"""path to the client key"""
cert: str = field(validator=validators.instance_of(str))
"""path to the client cretificate"""
ca_cert: str = field(validator=validators.instance_of((str, type(None))), default=None)
"""path to a certification authority certificate"""

def get_session(self):
session = super().get_session()
if session.cert is None:
cert = (self.cert, self.client_key)
session.cert = cert
if self.ca_cert:
session.verify = self.ca_cert

return session
12 changes: 12 additions & 0 deletions quickstart/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ services:
- ../quickstart/exampledata:/usr/share/nginx/html:ro
- ../quickstart/exampledata/config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ../quickstart/exampledata/config/nginx/conf.d:/etc/nginx/conf.d:ro
mtls-config:
image: nginx:latest
container_name: mtls-config
profiles:
- mtls
network_mode: host
expose:
- 8082
volumes:
- ../quickstart/exampledata:/usr/share/nginx/html:ro
- ../quickstart/exampledata/config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ../quickstart/exampledata/config/nginx/mtls.conf.d:/etc/nginx/conf.d:ro
keycloak:
image: bitnami/keycloak:latest
container_name: keycloak
Expand Down
4 changes: 4 additions & 0 deletions quickstart/exampledata/config/credentials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
"http://localhost:8081":
username: user
password: password
"https://localhost:8082":
client_key: quickstart/exampledata/config/nginx/mtls.conf.d/client.key
cert: quickstart/exampledata/config/nginx/mtls.conf.d/client.crt
ca_cert: quickstart/exampledata/config/nginx/mtls.conf.d/ca.crt
22 changes: 22 additions & 0 deletions quickstart/exampledata/config/nginx/mtls.conf.d/ca.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-----BEGIN CERTIFICATE-----
MIIDmzCCAoOgAwIBAgIUCyRRwwUOd0iw1In+yHn9aoqozVcwDQYJKoZIhvcNAQEL
BQAwXDELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEVMBMGA1UEAwwMY2EubG9jYWxob3N0
MCAXDTI0MDMyODA4NDIwOVoYDzIwNTEwODEzMDg0MjA5WjBcMQswCQYDVQQGEwJB
VTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0
cyBQdHkgTHRkMRUwEwYDVQQDDAxjYS5sb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQCQAh2nl9w6qFngBVkpZixI2u2IPHuqxaSnm2AkBqcy
4OyDqEC463czZPQUS0Yv0RpzDVFYjq0ii21q0ywCiWxt4DwobqyDXTn68lcwvNTY
qLLlviqC0xuSv2/eqWJZ1QJ8yJhx3QzdpXbLb7MnkVFaiLucebUK205Gs+i1wKw0
tniC3+BpUCynowZSge095HwGINvwSKrpweGDoYI5woRjsl8Ksn7/0OXn6ueKKJYu
R1dXT5JgbOaY22WBe96b5HUpLxamqbO+M6TJJdVv0H3G/rAgnxrhrYHgJBs/IF8/
mBgahH2EazGw2BI2SrmOYmayKXs4rmWAX34P/zq3rNLHAgMBAAGjUzBRMB0GA1Ud
DgQWBBRQqo42nJN4uerAY9k2IdECI0922TAfBgNVHSMEGDAWgBRQqo42nJN4uerA
Y9k2IdECI0922TAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQB5
JX7Q05yueUtWZK1Gx41jxojj8fi3nq0VUbNLATEJT1OFMSRGrBFlm+ayJw7GhnvO
wPuy3fxA+Ixhw68rzB8JAl9gtLm1Rv4biBbTrlrbCq4S4Ne2qHSZJTzeLLFgpkZ1
VwneCEjjXNNnIOMvxFT4TequlEzGAUQjIFKxOj0AjeLucnZnktCge2oxNaUr/s4+
b7LqIvEZUZPup+XTk79rCIfhNN7ML/9yeNZbxneoz2GKn5KU5NoBOLmyHEd6HEGC
/6PAOFNLO9OR2b4zsIEorSTXCP5NkRDuA8DAAKoaYkK8P4pYuFbmvSvQixSLVcVu
gXNBmnx+ej6lKVn5yuo2
-----END CERTIFICATE-----
30 changes: 30 additions & 0 deletions quickstart/exampledata/config/nginx/mtls.conf.d/ca.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQI+VMpvN/v7YkCAggA
MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECApOwJBfoRwqBIIEyDAZ5NMr2h3x
eOPsu4rmjiICNQ2GyRpo8bGOSgn4SDwEGzw7NfMwx6n1tSLzfD8lKkI54QQ9LS8i
Tviki02htW57lpd09yNv17x0Lt8e5A1iN40UK7c6UWo5khcvoMOvjv+JPNgSheXt
dm0AF0co49j3PmqNjJO37uNmrzcq32S925d02gQ4kBDYri6VNMh4s46s5Wli6tpP
/yvj07x1a0nNVI+EtOyYswtJCh/OGtpidM1wdkvBjIivzcBBbeVjQkgCaa/P/+Wu
qZKJpAarpJgW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koaAcTbYAOwxk4dte9WXTeG
JrDryj4WDYqdLuET99o+LFqfjUX+YngSwnSZxpDWLs2iLWopkV7s+iIsI/UViqXb
rPVD8kR0FPbMqbtNSm9lySMLdI5hXYw8msflRUAlp9RZnDp6psLNheqJTCRbzw5d
ChKbUx9u/MpZbci9GXdgbE9pq9nFJV4hJWILSQs47ADtuVS6jNoTCY21IMTDp5Ux
aia2Gi1qKAtF1aX5Cfk83F0RTDDV4sQTqCS0quE6qffPjB2Jbq4eoabVRlPp30r4
gyijUXilVZPCyVTEyPzF8A==
-----END ENCRYPTED PRIVATE KEY-----
25 changes: 25 additions & 0 deletions quickstart/exampledata/config/nginx/mtls.conf.d/client.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-----BEGIN CERTIFICATE-----
MIIEPDCCAyQCFA9Zylday8XeecLLAXbNHTvh2x4dMA0GCSqGSIb3DQEBCwUAMFwx
CzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRl
cm5ldCBXaWRnaXRzIFB0eSBMdGQxFTATBgNVBAMMDGNhLmxvY2FsaG9zdDAgFw0y
NDAzMjgwODQ2MjZaGA8yMDUxMDgxMzA4NDYyNlowVzELMAkGA1UEBhMCQVUxEzAR
BgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5
IEx0ZDEQMA4GA1UEAwwHbG9ncHJlcDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCC
AgoCggIBAMSlbR3LnON+6gszAoyBVCdKc98sbSvzKfQfYeKPj0Pklvo5t59UN9cg
+EpYH+GyAr/OxhywzD/K1Q0G/VZQpAglibwmRoZHCd2D9uqYKb1cNL7rJ/9MtyJs
0w8c7efV6S9gCbu/tbnH93yhPfWotjTxTciHK87SkG/NCcJ0D4pSt2m4KIEotp71
DeRh9Le+D4JLCpDtTd41jp86tBFOtQUOzHzCJNSqijXuJqPBzNHjV7Jks/PR6Y4f
DymxGcqPne3O1j6LRAvPgkYuw9ikcuUVKcZOUM7gt2qOOlEImGbeYB0u7cxRyyvZ
ZNgscokm9X3cAVcVhlPJwTXiOsBv+dWJK9DMvl37RtpCUj9KqoER06xHvHz0prxq
Tl+1Xqqlk2uEG3ykqrUhDgj4WcY/ahY/oUAVH8scYA+dva5LzChHZOl24eOHF0D2
Rbn7Ja9Vuw6yMCBaH5GIMwqQep0hmJbVfWi4Gife0+nuYOko9Wi+caU2znKb2HC9
+wE93lWpcgJ/fVsMEDQxB1KggKeM7iHPw8QQ5UiDwThTgQ1nbTGJ11MKoM21lngZ
JpBDn50dPAkF3UbKhKtepf1vTbnJJZBdPdF99pHNB49O5xUPOVnrog8dAL71RlNu
HNxxCYH3APpuLZflqf1sE4+ZpqQeYLdYEk8qGFe/cu/YQcQcDLdjAgMBAAEwDQYJ
KoZIhvcNAQELBQADggEBAFzodmqOES3FZAZdpKNjB55VOtNCKHChqQtMnMmV7RcB
2knn0501ML1/mpryR+cIZqBCkkKkj39WzJn8M9uSiSoJ+16woi3gUKA/5x0p1EOB
v7xLy78EvDnADYMJfsbdTPzejdIoMvJpHKpvv1Jnw7ZkgUThiXbCWRSwYeVi9HPy
U3wxtTovr2aPfzPC2BEp1u8fHFafEdSXOACqo1fRnnmFkFHTNVcstkxprmr0sPBB
o5I0VGElWbTY1B/OUhCCGFwmpv5P+L/3L7D3NSRSqGrlK4iWYuUgQGNvqAvPF2PJ
NSi//I2aCJuKV0cNyV6CX8sTQgxg53MGZLWZTSyLxHM=
-----END CERTIFICATE-----
27 changes: 27 additions & 0 deletions quickstart/exampledata/config/nginx/mtls.conf.d/client.csr
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN CERTIFICATE REQUEST-----
MIIEnDCCAoQCAQAwVzELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUx
ITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEQMA4GA1UEA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GkyYMlmIg30gSDyFdAbaHuC832xN05SP14FA+
YDJ+zDkGr7IvaNNX6CnOVEaYL8K24tRFpvcXCFlunOu55pr+JkUp23oSQnPFTCfu
FIKY4mn7oVQ3HgckRSGAQsdVbchMPq5p2Qfvr/MuLuV1CAa5CJZKhIORYKGvlyoQ
cOD0jDaxImg9jl08+YWa7QYqodhGoaxK+IE6Xo45Xf4Rt9oGB6SnI24W6P1oG70+
JULLND75A7lDqUBr1eSOt1TXnzuu4b80b3a/wzMpz202rrrGNuiXGwNKc+b52PJY
XrMo8+CcwbrDPGzOlYM2d0tbLPpKSgM3UGWcm0VwkX2O+9NyHMd1zN6mkcGmfELQ
BwzP5I66kCtEecYEnS3f0d/b4Wl57QE00NrGxq96cxo=
-----END CERTIFICATE REQUEST-----
52 changes: 52 additions & 0 deletions quickstart/exampledata/config/nginx/mtls.conf.d/client.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
-----BEGIN PRIVATE KEY-----
MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDEpW0dy5zjfuoL
MwKMgVQnSnPfLG0r8yn0H2Hij49D5Jb6ObefVDfXIPhKWB/hsgK/zsYcsMw/ytUN
Bv1WUKQIJYm8JkaGRwndg/bqmCm9XDS+6yf/TLcibNMPHO3n1ekvYAm7v7W5x/d8
oT31qLY08U3IhyvO0pBvzQnCdA+KUrdpuCiBKLae9Q3kYfS3vg+CSwqQ7U3eNY6f
OrQRTrUFDsx8wiTUqoo17iajwczR41eyZLPz0emOHw8psRnKj53tztY+i0QLz4JG
LsPYpHLlFSnGTlDO4LdqjjpRCJhm3mAdLu3MUcsr2WTYLHKJJvV93AFXFYZTycE1
4jrAb/nViSvQzL5d+0baQlI/SqqBEdOsR7x89Ka8ak5ftV6qpZNrhBt8pKq1IQ4I
+FnGP2oWP6FAFR/LHGAPnb2uS8woR2TpduHjhxdA9kW5+yWvVbsOsjAgWh+RiDMK
kHqdIZiW1X1ouBon3tPp7mDp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6VJIrl0vNDS7XulTmond0jN7pUoDYxa3Bp
eSka4I+fi4MboAqCcuIc2dGmW0PGx1L3XiG0chsxTb0tn6X8+mVmeakOEpzto0Ws
NeqOc8rSfvTCfLIvMEGA316b3K3CGz0w25fGSm2LwdHZuHCmIs4W0pEe8YuSQh7r
yUECggEAaj12P3dX51UURYecvclsGnR1Jnm2vioN2F+VkknGA7oOc2++LmHqrMW2
WwslTJdGXoGe53/vbpQCzFtGk2vq8Qa2DoRh1OPTwOALcHFy049b3Be5S0hEgQEo
3ZecqV7Q7F/KSYp2KtHugUSLshbEgIRZMeHC7QoaovXSznr/xFc5DoU2hTXvFlno
RVIXKWm5xbMSMiYMsvu/l2UL8d/QN4SyW22+3OlstUNdijiVBbTsEY1N6ViKTuQ5
DeWFgkwXplXMHh/dOmFyl4B5LHN3yHQZeJWrKKleZK7SPPJtLQ/i2VPldVF+m4eL
N0a9jiPNbuK+xhk0g8ptwOO6kYIsDg==
-----END PRIVATE KEY-----
21 changes: 21 additions & 0 deletions quickstart/exampledata/config/nginx/mtls.conf.d/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
server {
listen 8082 ssl;
listen [::]:8082 ssl;
server_name localhost;
ssl_certificate conf.d/server.crt;
ssl_certificate_key conf.d/server.key;
ssl_client_certificate conf.d/ca.crt;
ssl_verify_client on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

25 changes: 25 additions & 0 deletions quickstart/exampledata/config/nginx/mtls.conf.d/server.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-----BEGIN CERTIFICATE-----
MIIEPjCCAyYCFD1YFblwn/66le9qhiRXER5pWz5MMA0GCSqGSIb3DQEBCwUAMFwx
CzAJBgNVBAYTAkFVMR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