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

cnspec login clock screw, wrong error message #1342

Closed
atomic111 opened this issue Jun 25, 2024 · 0 comments · Fixed by mondoohq/cnquery#4325
Closed

cnspec login clock screw, wrong error message #1342

atomic111 opened this issue Jun 25, 2024 · 0 comments · Fixed by mondoohq/cnquery#4325
Assignees

Comments

@atomic111
Copy link
Member

atomic111 commented Jun 25, 2024

I'm trying to register a new virtual machine with Rocky 9.4, but I can't register the machine using the generated command

export MONDOO_REGISTRATION_TOKEN='eyJhbGciOiJFUzM4NCIsInR5cCI6IkpXVCJ9.eyJhcGlfZW5kcG9pbnQiOiJodHRwczovL2FwaS5sZWNvcy5tb25kb28uY29tIiwiYXVkIjpbIm1vbmRvbyJdLCJjZXJ0X3ZhbGlkX3VudGlsIjoiOTk5OS0xMi0zMVQyMzo1OTo1OVoiLCJkZXNjIjoiIiwiZXhwIjoxNzE5MTc1OTQxLCJpYXQiOjE3MTkxNzUzNDEsImlzcyI6Im1vbmRvby9hbXMiLCJsYWJlbHMiOm51bGwsIm5iZiI6MTcxOTE3NTM0MSwib3duZXIiOiIiLCJzY29wZSI6Ii8vY2FwdGFpbi5hcGkubW9uZG9vLmFwcC9zcGFjZXMvYW1hemluZy1ob2ZzdGFkdGVyLTE3NTU2NSIsInNwYWNlIjoiLy9jYXB0YWluLmFwaS5tb25kb28uYXBwL3NwYWNlcy9hbWF6aW5nLWhvZnN0YWR0ZXItMTc1NTY1Iiwic3ViIjoiLy9jYXB0YWluLmFwaS5tb25kb28uYXBwL3VzZXJzLzJOZFR6ZVNmNjFzYkdXQmFMaUxFM3Q2OU8xeiJ9.6SaeF3_M6cq4lvCEVA1sV_K_uWI-ePMbyULj2HNvzv-gSl5pzo6udpkSo1fzdSKYXvojKQ1jO79J4ayqU9LD-4KClFN5qXfeHvOtYymwUYfOFl_A97VApV6KHV4fjgqP'
curl -sSL https://install.mondoo.com/sh | bash -s -- -u enable -s enable -t $MONDOO_REGISTRATION_TOKEN

nor through generating a non-expiring token and running "cnspec register" myself. I always get the following message:

[root@rocky941 ~]# cnspec register -t "$MONDOO_REGISTRATION_TOKEN" -v
DBG Gathering system information
DBG local> run command uname -s
DBG local> run command uname -m
DBG platform> cannot parse lsb config on this linux system error="open /etc/lsb-release: no such file or directory"
DBG local> run command uname -m
DBG detected rhelish platform release=9.4 title="Rocky Linux"
DBG platform> detected os family=["redhat","linux","unix","os"] platform=rockylinux
DBG local> run command hostname -f
DBG detected platform ids id-detector=["hostname","cloud-detect"] platform-ids=["//platformid.api.mondoo.app/hostname/rocky941.local"]
DBG local> run command hostname -f
! token is expired
DBG non-ok http request body="request permission unauthenticated" status=401
Error: failed to log in client: failed to log in client: rpc error: code = Unauthenticated desc = request permission unauthenticated

the reason why i was not able to register the cnspec client was:

cnspec status

! possible clock skew detected: -1h59m59.681067043s

It would be better to show me an error message with a possible clock screw with the command cnspec login and not 'request permission unauthenticated' because the main reason was the clock screw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants