-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add signature check for NRTMv4 client (#1596)
* feat: add signature check for NRTMv4 client * feat: get the UNF from signature * feat: add wrong signed joses and apply to tests * feat: use a file instead of a property because a possible key rotation * feat: add static fields * feat: log as error and not as info * feat: change the mediaType to jose
- Loading branch information
Showing
13 changed files
with
129 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"kty":"OKP","crv":"Ed25519","kid":"a9ddf4a5-0ca0-47b1-a80d-3c63fd5c19c5","x":"ry9yLgcy1eUNX1lDs852mmUXRoy4qZW1HSOu54qBCHI"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
whois-nrtm4-client/src/test/resources/mock/fake-nrtm-RIPE-NONAUTH-signature.jose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
eyJraWQiOiJhOWRkZjRhNS0wY2EwLTQ3YjEtYTgwZC0zYzYzZmQ1YzE5YzUiLCJhbGciOiJFZDI1NTE5In0.ewogICJucnRtX3ZlcnNpb24iOiAxLAogICJ0aW1lc3RhbXAiOiAiMjAyNC0xMC0yNFQxMzoyMDowMFoiLAogICJ0eXBlIjogIm5vdGlmaWNhdGlvbiIsCiAgInNvdXJjZSI6ICJSSVBFLU5PTkFVVEgiLAogICJzZXNzaW9uX2lkIjogIjYzMjgwOTVlLTdkNDYtNDE1Yi05MzMzLThmMmFlMjc0YjdjOCIsCiAgInZlcnNpb24iOiAxLAogICJzbmFwc2hvdCI6IHsKICAgICJ2ZXJzaW9uIjogMSwKICAgICJ1cmwiOiAiUklQRS1OT05BVVRIL25ydG0tc25hcHNob3QuMS5SSVBFLU5PTkFVVEguNjMyODA5NWUtN2Q0Ni00MTViLTkzMzMtOGYyYWUyNzRiN2M4LmYxMTk1YmI4YTY2NmZlN2I5N2ZhNzQwMDlhNzBjZWZhLmpzb24uZ3oiLAogICAgImhhc2giOiAiZmFrZV9oYXNoIgogIH0sCiAgImRlbHRhcyI6IFtdCn0K.ByryeIsmJSVpuHg0nGnn06VsufJ60wdO5UHHiWjm_FzAThtAICZ8uiUkeiNDmrp0fpRWapH5CeTlxhdCfMqwDg |
1 change: 1 addition & 0 deletions
1
whois-nrtm4-client/src/test/resources/mock/fake-nrtm-RIPE-signature.jose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
eyJraWQiOiJhOWRkZjRhNS0wY2EwLTQ3YjEtYTgwZC0zYzYzZmQ1YzE5YzUiLCJhbGciOiJFZDI1NTE5In0.ewogICJucnRtX3ZlcnNpb24iOiA0LAogICJ0aW1lc3RhbXAiOiAiMjAyNC0xMC0yNVQwMDowNzowMFoiLAogICJ0eXBlIjogIm5vdGlmaWNhdGlvbiIsCiAgInNvdXJjZSI6ICJSSVBFIiwKICAic2Vzc2lvbl9pZCI6ICI0NTIxMTc0Yi01NDhmLTRlNTEtOThmYy1kZmQ3MjAwMTFhMGMiLAogICJ2ZXJzaW9uIjogMSwKICAic25hcHNob3QiOiB7CiAgICAidmVyc2lvbiI6IDEsCiAgICAidXJsIjogIlJJUEUvbnJ0bS1zbmFwc2hvdC40LlJJUEUuNDUyMTE3NGItNTQ4Zi00ZTUxLTk4ZmMtZGZkNzIwMDExYTBjLjgyNTQyYmQwNDhlMTExZmU1N2RiNDA0ZDA4YjY0MzNlLmpzb24uZ3oiLAogICAgImhhc2giOiAiZmFrZV9oYXNoIgogIH0sCiAgImRlbHRhcyI6IFsKICAgIHsKICAgICAgInZlcnNpb24iOiAxLAogICAgICAidXJsIjogIlJJUEUvbnJ0bS1kZWx0YS40LlJJUEUuNDUyMTE3NGItNTQ4Zi00ZTUxLTk4ZmMtZGZkNzIwMDExYTBjLmUzYmU0MWZmMzEyMDEwMDQ2YjY3ZDA5OWZhYTU4ZjQ0Lmpzb24iLAogICAgICAiaGFzaCI6ICJjNTBkZDc1NTRjYjM1ZWY1ZjJmNDVkN2JmYTA5ZmM1MTAzM2NiZTExNTJkMjliMzZjYjExNzgzMTllMjJiZTNlIgogICAgfQogIF0KfQo.FleGXqvep1AmVmnn3Hk9oU0eGNEOtE8vEY19tKVdpJMSHAijOtzWcyasVI1vHA3vGxj7jaxqm-l3LnG6ZoyDAw |
1 change: 1 addition & 0 deletions
1
whois-nrtm4-client/src/test/resources/mock/nrtm-RIPE-NONAUTH-signature.jose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
eyJraWQiOiJhOWRkZjRhNS0wY2EwLTQ3YjEtYTgwZC0zYzYzZmQ1YzE5YzUiLCJhbGciOiJFZDI1NTE5In0.ewogICJucnRtX3ZlcnNpb24iOiAxLAogICJ0aW1lc3RhbXAiOiAiMjAyNC0xMC0yNFQxMzoyMDowMFoiLAogICJ0eXBlIjogIm5vdGlmaWNhdGlvbiIsCiAgInNvdXJjZSI6ICJSSVBFLU5PTkFVVEgiLAogICJzZXNzaW9uX2lkIjogIjYzMjgwOTVlLTdkNDYtNDE1Yi05MzMzLThmMmFlMjc0YjdjOCIsCiAgInZlcnNpb24iOiAxLAogICJzbmFwc2hvdCI6IHsKICAgICJ2ZXJzaW9uIjogMSwKICAgICJ1cmwiOiAiUklQRS1OT05BVVRIL25ydG0tc25hcHNob3QuMS5SSVBFLU5PTkFVVEguNjMyODA5NWUtN2Q0Ni00MTViLTkzMzMtOGYyYWUyNzRiN2M4LmYxMTk1YmI4YTY2NmZlN2I5N2ZhNzQwMDlhNzBjZWZhLmpzb24uZ3oiLAogICAgImhhc2giOiAiMTQ4YzNjNDExYjhmMDQ0ZjVmYzBhYjIwMWY2ZGQwM2U4MGM4NjJlMjdhZDFhNjM0ODhhZWUzMzdkYzdlYjRhMiIKICB9LAogICJkZWx0YXMiOiBbXQp9Cg.AGsn3z7Yd_-unMprcjUMB5nBkqdPrQuiC2C494Joz7CoGxfJEc9zWsVQ28nlK3GJVwMtSBCWP8msPEV_lX_lCg |
1 change: 1 addition & 0 deletions
1
whois-nrtm4-client/src/test/resources/mock/nrtm-RIPE-NONAUTH-wrong-signature.jose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
eyJraWQiOiJhOWRkZjRhNS0wY2EwLTQ3YjEtYTgwZC0zYzYzZmQ1YzE5YzUiLCJhbGciOiJFZDI1NTE5In0.ewogICJucnRtX3ZlcnNpb24iOiAxLAogICJ0aW1lc3RhbXAiOiAiMjAyNC0xMC0yNFQxMzoyMDowMFoiLAogICJ0eXBlIjogIm5vdGlmaWNhdGlvbiIsCiAgInNvdXJjZSI6ICJSSVBFLU5PTkFVVEgiLAogICJzZXNzaW9uX2lkIjogIjYzMjgwOTVlLTdkNDYtNDE1Yi05MzMzLThmMmFlMjc0YjdjOCIsCiAgInZlcnNpb24iOiAxLAogICJzbmFwc2hvdCI6IHsKICAgICJ2ZXJzaW9uIjogMSwKICAgICJ1cmwiOiAiUklQRS1OT05BVVRIL25ydG0tc25hcHNob3QuMS5SSVBFLU5PTkFVVEguNjMyODA5NWUtN2Q0Ni00MTViLTkzMzMtOGYyYWUyNzRiN2M4LmYxMTk1YmI4YTY2NmZlN2I5N2ZhNzQwMDlhNzBjZWZhLmpzb24uZ3oiLAogICAgImhhc2giOiAiMTQ4YzNjNDExYjhmMDQ0ZjVmYzBhYjIwMWY2ZGQwM2U4MGM4NjJlMjdhZDFhNjM0ODhhZWUzMzdkYzdlYjRhMiIKICB9LAogICJkZWx0YXMiOiBbXQp9Cg.AGsn3z7Yd_-unMprcjUMB5nBkqdPrQuiC2C494Joz7CoGxfJEc9zWsVQ28nlK3GJVwMtSBCWP8msPEV_lX_lCF |
1 change: 1 addition & 0 deletions
1
whois-nrtm4-client/src/test/resources/mock/nrtm-RIPE-signature.jose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
eyJraWQiOiJhOWRkZjRhNS0wY2EwLTQ3YjEtYTgwZC0zYzYzZmQ1YzE5YzUiLCJhbGciOiJFZDI1NTE5In0.ewogICJucnRtX3ZlcnNpb24iOiA0LAogICJ0aW1lc3RhbXAiOiAiMjAyNC0xMC0yNVQwMDowNzowMFoiLAogICJ0eXBlIjogIm5vdGlmaWNhdGlvbiIsCiAgInNvdXJjZSI6ICJSSVBFIiwKICAic2Vzc2lvbl9pZCI6ICI0NTIxMTc0Yi01NDhmLTRlNTEtOThmYy1kZmQ3MjAwMTFhMGMiLAogICJ2ZXJzaW9uIjogMSwKICAic25hcHNob3QiOiB7CiAgICAidmVyc2lvbiI6IDEsCiAgICAidXJsIjogIlJJUEUvbnJ0bS1zbmFwc2hvdC40LlJJUEUuNDUyMTE3NGItNTQ4Zi00ZTUxLTk4ZmMtZGZkNzIwMDExYTBjLjgyNTQyYmQwNDhlMTExZmU1N2RiNDA0ZDA4YjY0MzNlLmpzb24uZ3oiLAogICAgImhhc2giOiAiYjI5M2U5Mjk5N2QzYmU3YTUxNTZmZGNhODMyYWYzNzhjMzk4OWIyY2VmYTllM2UzN2NhYWVlYmEwY2E5NzFlOSIKICB9LAogICJkZWx0YXMiOiBbCiAgICB7CiAgICAgICJ2ZXJzaW9uIjogMSwKICAgICAgInVybCI6ICJSSVBFL25ydG0tZGVsdGEuNC5SSVBFLjQ1MjExNzRiLTU0OGYtNGU1MS05OGZjLWRmZDcyMDAxMWEwYy5lM2JlNDFmZjMxMjAxMDA0NmI2N2QwOTlmYWE1OGY0NC5qc29uIiwKICAgICAgImhhc2giOiAiYzUwZGQ3NTU0Y2IzNWVmNWYyZjQ1ZDdiZmEwOWZjNTEwMzNjYmUxMTUyZDI5YjM2Y2IxMTc4MzE5ZTIyYmUzZSIKICAgIH0KICBdCn0K.PPu7vdJJW-8h1GsLlXKhGCmzkUt_cTQVpC9WLvhSFlfbM78kJYLFO_9YgaA-0oRaBfSmprCBUA3PZoP6UK3mAg |
1 change: 1 addition & 0 deletions
1
whois-nrtm4-client/src/test/resources/mock/nrtm-RIPE-wrong-signature.jose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
eyJraWQiOiJhOWRkZjRhNS0w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