cloudcaptainsh / cloudcaptain

Issue Tracker for CloudCaptain
13 stars 3 forks source link

Error on valid NewRelic keys #281

Closed buma closed 1 year ago

buma commented 1 year ago

We have to rotate NewRelic keys and new keys look like xxxNRAL and this fails Boxfuse validation:

18:32:03.351 ERROR: Invalid NewRelic license key: **************************************** => ensure it is at least 40 chars long and only contains a-f (lowercase) and 0-9
com.boxfuse.base.exception.BoxfuseException: Invalid NewRelic license key: **************************************** => ensure it is at least 40 chars long and only contains a-f (lowercase) and 0-9
    at com.boxfuse.generator.newrelic.NewRelicLicenseKey.<init>(NewRelicLicenseKey.java:19)
    at com.boxfuse.generator.newrelic.NewRelicLicenseKey.of(NewRelicLicenseKey.java:12)
    at com.boxfuse.generator.config.BoxfuseConfig.configure(BoxfuseConfig.java:250)
    at com.boxfuse.client.commandline.Main.main(Main.java:89)

Exited with code exit status 1

for boxfuse v.1.35.2.1525

Even if I manually change the case of uppercase part to lowercase I get same error. (this would probably fail at newrelic side anyways) Maybe it's same issue as https://github.com/cloudcaptainsh/cloudcaptain/issues/228 but this is not EU newrelic AFAIK and key does not start with eu*.

axelfontaine commented 1 year ago

Thanks for the report. Could you post an example key (with other numbers/letters obviously) so we can adjust our validation logic accordingly?

buma commented 1 year ago

It looks like first 32 characters are hexadecimal (lowercase a-f and 0-9) but last 8 are RNAFL. Some characters are duplicated among last 8 and all uppercase. I generated two keys and both have same combination of last 8 characters but different combination of first 32 maybe that's client ID or something. Old key didn't have it.

This was ingest - license key.

axelfontaine commented 1 year ago

Thanks for your patience. This has now been fixed in version 1.35.3.1526 of the client.

buma commented 1 year ago

Thank you. It works now.