Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Plastic SCM REST API Cloud Authentication

Discussion in 'Unity Version Control' started by AlexRideout, Apr 11, 2023.

  1. AlexRideout

    AlexRideout

    Joined:
    Apr 11, 2023
    Posts:
    1
    Hello,

    I am looking to utilize the server REST API with a cloud repo. Documentation for this is appears to be a bit sparse on specifics of working with the cloud, and sometimes have vague "you need to know the base uri of the server" but doesn't suggest how to find that.
    I found the answer for that bit here:
    https://forum.plasticscm.com/topic/23459-base-uri-of-the-server-that-hosts-your-organization/

    However I am now running into "invalid credentials" issues when running a login. I send a post request to:

    https://useast4-00-cloud.plasticscm.com:7178/api/v1/login
    Also tried:
    https://useast4-00-cloud.plasticscm.com:7178/api/v1/organizations/{my-org-name}/login

    and I get a 401 with a "username or password are not valid" message. I did send my Unity Id creds there if that may be the issue?

    Edit: Upon looking further into this, it appears that when using a server REST API, I must use the full organizations/{my-org}/login calls. And in the docs it mentions that only User/Pass and LDAP authentication works.

    Upon looking at my profiles.conf file under %LOCALAPPDATA%/plastic4, I see that the working mode for the server I want to use is "SSOWorkingMode" and I am imagining that is simply not supported?

    I am currently now looking into running a client REST API with Python and firing up a "cm api" subprocess to then send REST commands to. Initial testing seems to work okay, though may opt to simply use a cmdrunner sort of setup instead.
     
    Last edited: Apr 11, 2023
  2. rednbrick

    rednbrick

    Unity Technologies

    Joined:
    Dec 22, 2021
    Posts:
    66
    Hi @AlexRideout,

    If you have a username and password for plasticscm.com, you can use LDAP and the login should be working. As there's no mention of SSO(Signin with UnityID), I assume that SSO is not supported. However, I am checking with the relevant team. Once I have a response about it, I will update the information here.

    Update: The Server Rest API currently does not support SSO at this moment.
     
    Last edited: Apr 17, 2023
  3. pzaparas

    pzaparas

    Joined:
    Jun 1, 2023
    Posts:
    1

    Hi @AlexRideout,

    I've run into the same problem as you, could you provide a few more details on the solution/alternative you followed?
     
  4. RD_Luminous

    RD_Luminous

    Joined:
    Oct 27, 2021
    Posts:
    2
    Hi @rednbrick,

    Is there an estimate on when this functionality will be introduced, or an alternative way to make a Plastic account that is not tied to a Unity ID?

    This has broken functionality with build pipelines that had been working fine previously..
     
  5. rednbrick

    rednbrick

    Unity Technologies

    Joined:
    Dec 22, 2021
    Posts:
    66
    Hi @RD_Luminous ,

    Unfortunately, there's no specific time given for this task at this moment.
    Have you used the username/password previously when it was working fine?
    If so, can you please try to use a username/password as a workaround for now?