added / updated some files
This commit is contained in:
parent
e6d17e8a75
commit
f7e084c5c2
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@
|
||||
|
||||
# Config-Token
|
||||
|
||||
See [ConfigToken.md](ConfigToken.md).
|
||||
See [config-token.md](config-token.md).
|
||||
|
||||
# Certificate and CA-Chain
|
||||
|
||||
@ -22,6 +22,8 @@ When *base64-decoded* both files have a length of **256 bytes**.
|
||||
|
||||
If these files are renamed (adding `.bak`) NLS stack will come up normally.
|
||||
|
||||
> These files are static and don't change after resetting NLS-Instance
|
||||
|
||||
- `master_pwd.bin`
|
||||
```
|
||||
RdX1Fng5fYUEq+hSvQcDPdZmKkLfEfVd9k6OU6BG0UpFz1s9fbT5H2fqPBcxFogg
|
||||
@ -48,6 +50,8 @@ When *base64-decoded* this file has a length of **256 bytes**.
|
||||
|
||||
If this file is renamed (adding `.bak`) NLS stack will come up normally.
|
||||
|
||||
> This file is static and don't change after resetting NLS-Instance
|
||||
|
||||
```
|
||||
0a3MZny/w+hEduuSakCLM5ADlr9oKapdjIrZIM5A7mzq3e8I0UPVb9m6DOXlzJe8
|
||||
wu+X+gWdIMjPED0GqqyNUQ3MlklaXE1jIvA7NBUeskSdSAACYEX6IZRNVQvSs2Yn
|
||||
@ -57,8 +61,6 @@ m56oy1WRGSdHRiBt/6Mbb2I7BQ+YNsPrq9pI9wdPxbCbyT8UbEPM0/Qo4RSH77lx
|
||||
ipX9bJaK63sIplYtPSBB2A==
|
||||
```
|
||||
|
||||
|
||||
|
||||
# Other Code
|
||||
|
||||
Interesting is that for encryption the `service_instance.deployment` **Public-Key** is used. For that one, we have no
|
||||
|
256
doc/config-token.md
Normal file
256
doc/config-token.md
Normal file
File diff suppressed because one or more lines are too long
15
doc/files/config-token.json
Normal file
15
doc/files/config-token.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"certificateConfiguration": {
|
||||
"caChain": [
|
||||
"-----BEGIN CERTIFICATE-----\r\nMIIF3TCCA8WgAwIBAgIUC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y88RevUd3a52TxAYxGuVe/2qYuIkSoPfMJ1P5nbk6hnOjiBg5GGSrqv6Qwj+ZtPo6cm\r\nyg0Z8RXb5cboU+3Xru6HEQCsidLuC1bwbcsnmvyt4pJxjGG1MQvN9jBWBGiKvqSnDuLMW34eD7mg\r\nLm1W0QCMzTvxIxH2X/xylT2q7gkFdDPxHnMotYeFpeYmPn6nqI36Ot7xBv512RUZz5hdG6r20LSP\r\ndbHoBYZIbaS+wGTaAOFIpms1Xwe/S/ehQpMpArlzphqV+o9IOZn8BIRvpT3d4r8iV/a2TtbxPDVX\r\nOR/aooC9BRI7Q52b2V3L0aKYeC2P8bqqwoivBrWPnr12h+CRx18NvF7sxJ8A8O6h7+Os2psA22CX\r\nvDd0ngxnNy08CMgS1u98Nxg5nV2P596mLRY9X7dzgQikoabEfKtqdKOW4PJWI/wane44ju6vUZPK\r\n3MyAgUWJr34aB8Q0paou0atP9OW+KOeFuwICL02RQ7ke5IpBQrWSF/OlMxhnepzhnp1favk5W3rl\r\ncZNLQMFmeaxyKKrjowh3diBsfo2m6Qin/fkRA3w62Zfox37l5q4s+B/YPxMmrcJgoDFxxf2WYDc6\r\nsoqR7/ExG7kHasd+Th+oqaX8LGdGUfZMD/IY6wvOFJ1Smh7QgWTZbUyLRwTU6jZ40pM=\r\n-----END CERTIFICATE-----",
|
||||
"publicKey": {
|
||||
"exp": 65537,
|
||||
"mod": [
|
||||
"c0024b87dfcbda5d847e5f932d6a76a42bb0259241a5c1dc55b92cad74537d5f5d11ef946356ad35b8341c4eb2cf4dc25a4788913796cd8920ee817b6dd67fbac6694c84672b46cdfc5cd779790434e18db0b81c8d2196bbc20fe2625ca7f93b51c83f1600cc6f155889f04a9eb3a14fb1d9db551071782293d8849cbd1c8405bf2667041cc4e87e48fe06e29dc94a971e3e0e2832ce8663ed282298d20bfed302f8b7b6a5cec192957b110bfe7d75d08bca89879515390496fe166ef76459a1118851dde8a7745cea5c98435d0a60f5dd0cb78d984c57e794a1b8d4409dc6d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7XLf5Rf6nrUco5W_T-Zt0VZ2AOvPutmn1CV5VXCbBfh1ekaVjuxTr3rTl8xsuIXBfXDLm-W2L-TJCT-uB450m4MLROmc7on3If3sG64PG8Bdd5o8TqEmjigoOND2K5_3H9G6aAHjBWiI8aGgzNo9oO-s_DBYcOIODS_jOJr_2n6SM_UKIM-8w"
|
||||
}
|
@ -2,6 +2,7 @@ import json
|
||||
from calendar import timegm
|
||||
from datetime import datetime, UTC, timedelta
|
||||
from textwrap import wrap
|
||||
|
||||
from cryptography import x509
|
||||
from cryptography.hazmat._oid import NameOID
|
||||
from cryptography.hazmat.primitives import serialization, hashes
|
||||
@ -16,67 +17,29 @@ Any variables prefixed with `NV_` or `nv_` are original values, dumped from an N
|
||||
Any variables prefixed with `MY_` or `my_` are variables which are set by fastapi-dls and are "faked".
|
||||
"""
|
||||
|
||||
### FILES
|
||||
|
||||
FILE_REQUEST_ROUTING_SI = f'../../doc/database/3-after-upload-license/request_routing.service_instance.json'
|
||||
FILE_CONFIG_TOKEN = f'../../doc/files/config-token.json'
|
||||
FILE_SI_ARTIFACT = f'../../doc/database/3-after-upload-license/si_d8c07e4af6a449d0b2dc3faf0e1bf2bd.service_instance_artifact.json'
|
||||
|
||||
### DEFAULTS
|
||||
|
||||
# SELECT xid FROM request_routing.service_instance
|
||||
NV_SI_SITE_ID = '4e53a171-103b-4946-9ed8-5f4c0ee750d9'
|
||||
# SELECT value FROM si_<xid>.service_instance_artifact WHERE namespace = 'service_instance.client.all' and name = 'private_key'
|
||||
NV_SI_KEY_RSA = """-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpAIBAAKCAQEAyIz6i48cFn4XOK0S2GTYpLMU85xzJ1fmQmA2nC6Zod2V4BxN
|
||||
Xqk+9y8nvdzZVELxmC+N47ZQGV/J5cquIadx0V42F3JTryJFDuZ+7fQsNlXUX3og
|
||||
UQhhgvHuluhDJQSvdZAzpguS7N+gJGCGbGk1pZBYL2JtTDTWSIcWsQtD/w9DAPEk
|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zo9V2qki1660vqtv1cJF+ODidr6X
|
||||
p5rFRblx7OGYCIWFmDVR3q0CgYBZZ03eZBe1yq4lP12ISSa0bfSIQmle5JR9ptrL
|
||||
D93oz6LEiuYm2Q7L8KLBJNzjU8nywvXtxUgzGUswtHoUoX0i0xlJuQMCBWnz57H+
|
||||
Hj+AyqmkkLNFquFynPs+ZbE/V/54gmoqIWCv8cVKRaEK9y9qOGMAZSouhgaZiPHZ
|
||||
sSEu+QKBgQDRpPzQrn0xD0QPvQMi/gl8TJHjEfjQkGkxREa1XAKj4XcHXKwzSfdf
|
||||
LdUhyKEt/if0EJd09UbH6+T7aqkuw4HthF8ab2FSlLcyQ6t0UYUlTwCLTHsquqeu
|
||||
5+Le7DO89hskB8DKr4Oobmr12eulCf81UDYWSKhDYeqrBJyf3PopLg==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
"""
|
||||
# SELECT value FROM service_instance_artifact WHERE namespace = 'service_instance.client.all' and name = 'public_key'
|
||||
NV_SI_KEY_PUB = """-----BEGIN PUBLIC KEY-----
|
||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyIz6i48cFn4XOK0S2GTY
|
||||
pLMU85xzJ1fmQmA2nC6Zod2V4BxNXqk+9y8nvdzZVELxmC+N47ZQGV/J5cquIadx
|
||||
0V42F3JTryJFDuZ+7fQsNlXUX3ogUQhhgvHuluhDJQSvdZAzpguS7N+gJGCGbGk1
|
||||
pZBYL2JtTDTWSIcWsQtD/w9DAPEkK5cHGoZkovngH1LOTkVAcyEqKxLblerMnLu3
|
||||
rOaDVkEcf+1l2BwvHUWTU4LI6uudCWP2em69T2EXp1qczi5IKJzc53puNfp5nXlH
|
||||
ayrneYAdIbEAQSQg+Z40npUwNKW71Ue2NsG3SoGWuj3lTyEVXlLsAw0bsCDVLipM
|
||||
WwIDAQAB
|
||||
-----END PUBLIC KEY-----
|
||||
"""
|
||||
MY_CLIENT_TOKEN_EXPIRE_DELTA = relativedelta(years=12)
|
||||
with open(FILE_REQUEST_ROUTING_SI, 'r') as f:
|
||||
NV_SI_SITE_ID = json.loads(f.read())[0].get('xid')
|
||||
|
||||
NV_CONFIG_TOKEN_RESPONSE = {
|
||||
"certificateConfiguration": {
|
||||
"caChain": [
|
||||
"-----BEGIN CERTIFICATE-----\r\nMIIF3TCCA8WgAwIBAgIUCpVszfecRrnPa3EGwPKuyWESBmMwDQYJKoZIhvcNAQELBQAwcjELMAkG\r\nA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExDzANBgNVBAoTBk52aWRpYTEnMCUGA1UECxMe\r\nTnZpZGlhIExpY2Vuc2luZyBTZXJ2aWNlIChOTFMpMRQwEgYDVQQDEwtOTFMgUm9vdCBDQTAeFw0y\r\nNDA5MjYwNzM4MTlaFw0zNDA5MjQwNzM4NDlaMHoxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxp\r\nZm9ybmlhMQ8wDQYDVQQKEwZOdmlkaWExJzAlBgNVBAsTHk52aWRpYSBMaWNlbnNpbmcgU2Vydmlj\r\nZSAoTkxTKTEcMBoGA1UEAxMTTkxTIEludGVybWVkaWF0ZSBDQTCCAiIwDQYJKoZIhvcNAQEBBQAD\r\nggIPADCCAgoCggIBAOIb5ZcYWR78WkJipEW4cOB2d3WkXhjzA9Omj0SBnA6fJad+zObguInmkgyB\r\nUC/0xMnHeEH1WQpZ0yZE1rdH0ziwPy07hmCgjMSC8iXSfV4QXoHzsQy80HSbD3dr0A5Fk9UrWdJu\r\nIlLnwqTfUjxMSqiVYbGI2JLVLDIPjnrCKgZ//vVTFWiMDQaGInDz5Qo3azHIt1Sw3u47/b88TzmK\r\ni3TMbjtAR3djlhQfJBY6nUdP8wWy2Fntx9fO7U723sp6cnGtHnbXGpon/QqxlPjT4RXXm1QmFQ/d\r\nyUmvmjoiJsCQ3v2KFJNei2bkUS29ZKPr4TGokojOilESQAQTLo+5s0cN7ZtPWvwZ4uets84GCRP5\r\ndC+aKoNQ7cg06A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/o520oGIqKTmima73E\r\n9NgNbIk2MB8GA1UdIwQYMBaAFEo1JPxQ95lhCAtksQowEaSVoAMeMC8GA1UdEQQoMCaCJDRlNTNh\r\nMTcxLTEwM2ItNDk0Ni05ZWQ4LTVmNGMwZWU3NTBkOTANBgkqhkiG9w0BAQsFAAOCAgEAv9NcfpBU\r\nxZP9PsdJ4twWu/EQqeJRsrTV3ngg6o9JV22285p5TbhTk9aKa6HlME9KoYDlXo1yn4pwVL6TFc/W\r\nR+2UJJphrlZGEUJvTrEwDxs29QXjkWAJ+2KZoLHdKK1luV1QAV2x8/hTWUvj4pnpRUHvdXAWu3uy\r\nVUYhE2Ypj6Lq6ipzHQCh+ZM6Zyml6Em/byRrIv6dv/DH7QsQCqXmuyxajTNYmexG33HOr5R/JAX/\r\n4xC1C9KB0Ru1NcJRIKJ+OPiXEJNXugvAMx02MJw5fETEEvGY8YakjaRFn9p7cfRCBFbJWWyQ2RM8\r\n8Z9pr2JrDzDIImBZ5LY4KpvYhsWr2R2mYqtNw0P3FPfm23x0WzSx10TtRnEX1I1349CDwNIOFpQr\r\ncW3mBtX0pb/iOwazvBfxCO7Y7FrHXVxv0tPtJg6PSdCyp7Lgu2zIsWuteHOnaoo+IXocAbSuTmIN\r\n0yduLkYU0XBJOouO0fBziorL6S7ifeaVP/ppRnF0L61DLbaHy8qkqBQTe9JQRHmV+owl0lsHrYRI\r\nRKOxVxFS2UmAJZiqnJ/HI2nHRqZerH5c465u8N3xuT71HxsoFxiu4tQM0NEGGUoooefX/ramo4P+\r\neEVOavIG7uVFzYnrfadEZiCF+hLQf/DNgueHglgaibGAbSTILhVaQ+9KvlhMh5Am2tU=\r\n-----END CERTIFICATE-----",
|
||||
"publicKey": {
|
||||
"exp": 65537,
|
||||
"mod": [
|
||||
"b052f02202f8c6ee0100689049479beba17ceed6412a7d39eee2bdd903db3ccc511420fd80dd0d531bf96a9103c562da51e72e82f39ba77775842ae45245ddbbb3a06f61993105ea0af045bd95fb4b6645100f57855da12f31d83152f3dddb159d93ff478fab177a8f631e2b96426af975abff2ea43bdde8728a85908405d107d9fad0fac9dc9f65d4804a18e739597376cd9f99a14724918ba3f4acbe3727b95a49faa29aa320fe74ebd355a602ac235c236709eac8123e9d715abb7d1eedb596bd2d1f99e8bb877058f76572217a21fae79871dd6f03a56c2cf84d2fede21a41143fdb0cd3555286eef8a4472511972a5ac193e51dc747699a4519f3458e15"
|
||||
]
|
||||
}
|
||||
},
|
||||
"configToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJOTFMgU2VydmljZSBJbnN0YW5jZSIsImF1ZCI6Ik5MUyBMaWNlbnNlZCBDbGllbnQiLCJpYXQiOjE3NDIxOTU4ODUsIm5iZiI6MTc0MjE5NTg4NSwiZXhwIjoxNzQyMTk2Nzg1LCJwcm90b2NvbF92ZXJzaW9uIjoiMi4wIiwiZF9uYW1lIjoiRExTIiwic2VydmljZV9pbnN0YW5jZV9yZWYiOiI0ZTUzYTE3MS0xMDNiLTQ5NDYtOWVkOC01ZjRjMGVlNzUwZDkiLCJzZXJ2aWNlX2luc3RhbmNlX3B1YmxpY19rZXlfY29uZmlndXJhdGlvbiI6eyJzZXJ2aWNlX2luc3RhbmNlX3B1YmxpY19rZXlfbWUiOnsibW9kIjoiYzg4Y2ZhOGI4ZjFjMTY3ZTE3MzhhZDEyZDg2NGQ4YTRiMzE0ZjM5YzczMjc1N2U2NDI2MDM2OWMyZTk5YTFkZDk1ZTAxYzRkNWVhOTNlZjcyZjI3YmRkY2Q5NTQ0MmYxOTgyZjhkZTNiNjUwMTk1ZmM5ZTVjYWFlMjFhNzcxZDE1ZTM2MTc3MjUzYWYyMjQ1MGVlNjdlZWRmNDJjMzY1NWQ0NWY3YTIwNTEwODYxODJmMWVlOTZlODQzMjUwNGFmNzU5MDMzYTYwYjkyZWNkZmEwMjQ2MDg2NmM2OTM1YTU5MDU4MmY2MjZkNGMzNGQ2NDg4NzE2YjEwYjQzZmYwZjQzM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udGlvbl9tb2RlIjoiTEFURVNUX09OTFkifX0.mZnB0NnE4WIxg0Q6zH98NSt6UYLbtbNPfWsVVJwtcn8rv9mFWmBr3vxB9BGzafY-kLo5uJztI_Ue3Q1VD5yHaMVtgrtI8K5-Ojm3d8p5hGe2qwoskQ1OXSSTE15JaGsdkTihPnZ-0r6RBRucXa-PoNWBYnvl0SbcNiU_-FAK1ugmemLW3Q9T2KZ71n8nr0-FXrJUpsxrluUEerhtDlOZmNHuCEcsU10U0ZdMPBc3iguy_psd_jR4QIDRwc6W0dp29403epDJqqkUW8c-ORi1Ny2Bk2OFNK87VBxf5GP5KxuYxlujtzf0Y1niDqnYdW1MpKl9OxRvz0E4HUEK7_JBbA"
|
||||
}
|
||||
with open(FILE_CONFIG_TOKEN, 'r') as f:
|
||||
NV_CONFIG_TOKEN_RESPONSE = json.loads(f.read())
|
||||
|
||||
with open(FILE_SI_ARTIFACT, 'r') as f:
|
||||
rows = json.loads(f.read())
|
||||
si_identity_rows = list(filter(lambda _: _.get('namespace') == 'service_instance.client.all', rows))
|
||||
si_identity_private_key = next(filter(lambda _: _.get('name') == 'private_key', si_identity_rows))
|
||||
si_identity_public_key = next(filter(lambda _: _.get('name') == 'public_key', si_identity_rows))
|
||||
NV_SI_KEY_RSA = si_identity_private_key.get('value')
|
||||
NV_SI_KEY_PUB = si_identity_public_key.get('value')
|
||||
|
||||
MY_CLIENT_TOKEN_EXPIRE_DELTA = relativedelta(years=12)
|
||||
|
||||
### VARIABLES
|
||||
|
||||
@ -214,7 +177,7 @@ def test_our_config_token():
|
||||
},
|
||||
}
|
||||
|
||||
# todo: maybe DLS_SI_CERTIFICATE['private_key']
|
||||
# todo: maybe DLS_SI_CERTIFICATE['private_key'] todo: try different files
|
||||
# our_correct_sign_key = load_key('our_correct_private_key.pem').export_key().decode('utf-8')
|
||||
# our_correct_sign_key = jwk.construct(our_correct_sign_key, algorithm=ALGORITHMS.RS256)
|
||||
nv_sign_key = jwk.construct(nv_si_private_key_pem.decode('utf-8'), algorithm=ALGORITHMS.RS256)
|
||||
|
Loading…
Reference in New Issue
Block a user