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

Error trying to configure a new env(RPA installed on OCP) #41

Closed
carolagirolami opened this issue May 25, 2023 · 6 comments · Fixed by #47
Closed

Error trying to configure a new env(RPA installed on OCP) #41

carolagirolami opened this issue May 25, 2023 · 6 comments · Fixed by #47
Labels
bug Something isn't working

Comments

@carolagirolami
Copy link

carolagirolami commented May 25, 2023

Describe the bug

Hello,
I get an error trying to configure a new environment.
See Logs for details.
Thanks

Logs

C:\Users\Administrator\AppData\Local\Joba\rpa cli>rpa --version
1.0.0-beta-2

C:\Users\Administrator\AppData\Local\Joba\rpa cli>rpa env new rpaDev --url "https://cpd-rpanamespace.apps.rpa-ocp.cp.fyre.ibm.com/rpa/api/v1.0/" --tenant 5000 --userName carolagirolami --password XXXX -v Detailed
VALID server certificate.
Requested URI: https://cpd-rpanamespace.apps.rpa-ocp.cp.fyre.ibm.com/rpa/api/v1.0/en-US/configuration
Effective date: 4/14/2023 6:54:37 AM
Expiration date: 7/13/2023 6:54:37 AM
Issuer: CN=IBM Automation Foundation CA
Subject: CN=cpd
VALID server certificate.
Requested URI: https://cpd-rpanamespace.apps.rpa-ocp.cp.fyre.ibm.com/rpa/api/v1.0/en-US/account/tenant
Effective date: 4/14/2023 6:54:37 AM
Expiration date: 7/13/2023 6:54:37 AM
Issuer: CN=IBM Automation Foundation CA
Subject: CN=cpd
System.Net.Http.HttpRequestException: The request failed with status BadRequest, reason Bad Request. Details:{"errorMessage":"Model is not valid","modelState":{"userName":["The UserName field is required.","'User Name' must not be empty."]}}

   at Joba.IBM.RPA.Extensions.ThrowWhenUnsuccessful(HttpResponseMessage response, CancellationToken cancellation)
   at Joba.IBM.RPA.Cli.RpaClient.AccountResource.FetchTenantsAsync(String userName, CancellationToken cancellation)
   at Joba.IBM.RPA.Cli.RpaClient.AccountResource.AuthenticateAsync(Int32 tenantCode, String userName, String password, CancellationToken cancellation)
   at Joba.IBM.RPA.AccountCredentials.AuthenticateAsync(IAccountResource resource, CancellationToken cancellation)
   at Joba.IBM.RPA.Proj
C:\Users\Administrator\AppData\Local\Joba\rpa cli>

Expected behavior

The account to access the tenat is carolagirolami.
I have tried with userName = [email protected] but I get the same error.
image

Version

1.0.0-beta-1 (latest)

Which operating system?

Windows Server

@carolagirolami carolagirolami added the bug Something isn't working label May 25, 2023
@JobaDiniz
Copy link
Contributor

JobaDiniz commented May 25, 2023

  1. What is the IBM RPA server version you're trying to use?
  2. Is your environment configured with SSO? That is not supported.

@carolagirolami
Copy link
Author

carolagirolami commented May 25, 2023

  1. Operator version is 1.12.0 which correspond to RPA 23.0.4
  2. As far as I understand, it is not possible to use RPA on OCP without SSO

@JobaDiniz
Copy link
Contributor

JobaDiniz commented May 25, 2023

As stated in the documentation, RPA CLI needs a regular user. It does not support SSO authentication flow.

Does it support Single Sign-On?
RPA CLI does not support Single Sign-On. You need to create a regular user to provide credentials to the tool.

@JobaDiniz JobaDiniz added the wontfix This will not be worked on label May 25, 2023
@JobaDiniz
Copy link
Contributor

JobaDiniz commented May 25, 2023

As far as I understand, it is not possible to use RPA on OCP without SSO

It seems OCP is not supported since you cannot create a regular user. Until IBM RPA provides a different method of authentication for environments with SSO, such as api-key, OCP is not supported.

Command line interfaces in general do not support SSO authentication flows. This is not something specific for RPA CLI.

@JobaDiniz
Copy link
Contributor

JobaDiniz commented May 25, 2023

@carolagirolami it looks like there's a way to get a token programmatically when SSO is configured: https://www.ibm.com/docs/en/rpa/23.0?topic=openshift-get-access-token-api

It's not well documented. If that works, this is a new feature that RPA CLI would have to implement.

@JobaDiniz JobaDiniz removed the wontfix This will not be worked on label Aug 10, 2023
@JobaDiniz JobaDiniz reopened this Aug 10, 2023
@JobaDiniz
Copy link
Contributor

@carolagirolami I do not know whether you still want to try out this tool, but I successfully implemented the OCP + SSO support.
Documentation: https://ibm.github.io/ibm-rpa-cli/#/guide/environment?id=red-hat%c2%ae-openshift%c2%ae-support-with-single-sign-on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants