rockcarver / frodo-cli

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

Can't add AM connection URL with parameters #408

Closed brife closed 1 month ago

brife commented 1 month ago

Frodo CLI version

Provide output of frodo -v You are running the binary release. Installed versions: cli: v1.0.1 lib: v1.1.0 node: v18.5.0

I can’t seem to add connections with parameters, For example,

frodo conn add “https:///am?authIndexType=service&authIndexValue=XXX” --insecure

responds with

Cannot use ‘in’ operator to search for ‘callbacks’ in <!– DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved

The contents of this file are subject to the terms
of the Common Development and Distribution License
(the License). You may not use this file except in
compliance with the License.

You can obtain a copy of the License at
https://opensso.dev.java.net/public/CDDLv1.0.html or
opensso/legal/CDDLv1.0.txt
See the License for the specific language governing
permission and limitations under the License.

When distributing Covered Code, include this CDDL
Header Notice in each file and include the License file
at opensso/legal/CDDLv1.0.txt.
If applicable, add the following below the CDDL Header,
with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"

$Id: index.html,v 1.2 2008/06/25 05:48:51 qcheng Exp $

-->

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

Please Wait While Redirecting to Login page
vscheuber commented 1 month ago

@brife thank you for your report! Can you please confirm/validate:

  1. You are passing username and password arguments
  2. You are using the AM base URL without any query parameters as the host argument
  3. You are using either the default login tree or are using the --authentication-service [service] option to use a non-default tree to login

A few valid sample commands:

Standard: frodo conn add https://platform.example.com/am amadmin Passw0rd

Allow insecure connection (self-signed certs): frodo conn add --insecure https://platform.example.com/am amadmin Passw0rd

Use a non-default login tree: frodo conn add https://platform.example.com:9443/am amadmin Passw0rd --authentication-service ldapService

Use a non-default login tree and inject a custom header: frodo conn add https://platform.example.com:9443/am amadmin Passw0rd --authentication-service ldapService --authentication-header-overrides "{host:'am.example.com:8081'}"

Please note that the host URL always stays the same format.

Also, our 2.0.0 release is only weeks (maybe days) away and 2.x provides many more capabilities and fixes issues that we won't backport to 1.x. Check out our latest release: Frodo CLI 2.0.0-66

brife commented 1 month ago

Thank you, I should have read the manual. --authentication-service solved my problem