Skip to content

Passing ClientId as parameter while creating principal doesn't work #1929

Open
@fivetran-arunsuri

Description

@fivetran-arunsuri

Describe the bug

Hey Team,
I was trying to verify some of Polaris management API's. I found out that even though the documentation says we can pass clientId as param while creating the principal, it doesn't seems to be working fine

To Reproduce

  1. Start the server and bootstrap with root credentials
  2. create the token
  3. Hit the http://localhost:8181/api/management/v1/principals API for generating the principal with body as below
    {
    "name": "principal-1",
    "clientId": "arman"
    }

Actual Behavior

It generates the principal as
{
"principal": {
"name": "principal-3",
"clientId": "9cc-blah-blah",
"properties": {},
"createTimestamp": 1750756252079,
"lastUpdateTimestamp": 1750756252079,
"entityVersion": 1
},
"credentials": {
"clientId": "9cc-bla-bha",
"clientSecret": "blah-blah"
}
}

Expected Behavior

It should ideally preserve the clientId we are passing from the body and only generate the clientSecret

Additional context

Also, Why are we not allowing users to set their own clientId and clientSecret while creating the principal?
I am looking for a solution like register principal with older credentials preserved? Can we do that like we do for the root credentials?

System information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions