rockcarver / frodo-cli

A CLI to manage ForgeRock platform deployments supporting Identity Cloud tenants, ForgeOps deployments, and classic deployments.
MIT License
19 stars 17 forks source link

Getting certificate error while trying to make connection #400

Closed navjyot058 closed 4 months ago

navjyot058 commented 4 months ago

Frodo CLI version

Provide output of frodo -v

vboxuser@Forgerock:~$ frodo -v You are running the binary release. Installed versions: cli: v2.0.0-64 lib: v2.0.0-88 node: v20.11.1

Describe the issue

A clear and concise description of what the issue is.

I have installed frodo in my forgeops deployment in my ubuntu machine. However, when i am trying make connection, i get the below cert error. can anyone help?

vboxuser@Forgerock:~$ frodo conn add https://forgeops.example.com/am john.doe@company.com '' Error getting tokens self-signed certificate

vscheuber commented 4 months ago

@navjyot058 please try to use the -k, --insecure switch: Allow insecure connections when using SSL/TLS. Has no effect when using a network proxy for https (HTTPS_PROXY=http://:), in that case the proxy must provide this capability. (default: Don't allow insecure connections)

To see all the command options for a command, use -h: frodo conn save -h

Please let me know if that works for you.

navjyot058 commented 4 months ago

@vscheuber , Thanks for looking into this. I tried passing the argument, but it is still complaining.

vboxuser@Forgerock:~/forgeops$ frodo conn add https://forgeops.example.com/am/ amadmin ' ' --insecure Error getting tokens self-signed certificate

navjyot058 commented 4 months ago

I tried different options --

vboxuser@Forgerock:~/forgeops$ frodo conn add -k https://forgeops.example.com/am/ amadmin 'zIiolyo9gdjpnssPQwAedeNh' Error getting tokens self-signed certificate vboxuser@Forgerock:~/forgeops$ frodo conn save -k https://forgeops.example.com/am/ amadmin 'zIiolyo9gdjpnssPQwAedeNh' Error getting tokens self-signed certificate vboxuser@Forgerock:~/forgeops$ frodo conn save --insecure https://forgeops.example.com/am/ amadmin 'zIiolyo9gdjpnssPQwAedeNh' Error getting tokens self-signed certificate

vscheuber commented 4 months ago

@navjyot058 I have confirmed your issue and I am working on a fix. Please stay tuned and I will notify you when it's ready.

vscheuber commented 4 months ago

@navjyot058 please give Frodo CLI 2.0.0-66 a try and let me know if that does not resolve your issue.

Harshdeepahuja commented 4 months ago

Thanks @vscheuber for fixing the connection issue. looks like we might need same fix on frodo logs as well . I am using -k and getting below error.

vboxuser@vboxuser-VMware-Virtual-Platform:~/Documents/workspace$ frodo logs tail -l 4 -c -k https://forgeops.example.com |sed 's/\n/\n/g' |sed 's/\t/\t/g' > /home/vboxuser/Documents/workspace/log1.txt Found admin credentials in connection profile, attempting to create log api credentials... Error getting tokens self-signed certificate Unable to create log api credentials. No log api credentials found!

Thanks in Advance for help.

cc @navjyot058

vscheuber commented 4 months ago

@Harshdeepahuja that's an interesting observation! Clearly the fix doesn't appear to work for the logs command but at the same time, the logs is a cloud-only command. ForgeOps or other deployments do not provide the same logging endpoints as PingOne Advanced Identity Cloud does.

Check out this chapter in the ForgeOps documentation how to obtain logs in a ForgeOps deployment.

Harshdeepahuja commented 4 months ago

Thanks @vscheuber for the clarification. I have been using debug-logs and it works fine. Thanks again for help.