Skip to content

add support for harbor2 OpenID Connect (OIDC) users #10

@Vad1mo

Description

@Vad1mo

I am trying out again docker-pushrm with now more realistic scenario.

My user vad1mo is Project Admin on Project c8n. This Role is needed in Harbor to be able to edit the Project Info in the UI.
However it seems that this role is not sufficient to update the project info via the API.

It might be also the case that we are using Harbor2 with OIDC, I verified in the API explorer that the user is able to do operations with the username/password, where password is the one taken from harbor->user->profile and not OIDC.

Status: Downloaded newer image for chko/docker-pushrm:1
DEBU root cmd init config                         
DEBU home dir: /                                  
DEBU subcommand "pushrm" called                   
DEBU Using target: c8n.io/c8n/portal:latest       
DEBU using README file: /myvol/README.md          
DEBU server: c8n.io                               
DEBU namespace: c8n                               
DEBU repo: portal                                 
DEBU tag: latest                                  
DEBU repo provider: harbor2                       
DEBU Harbor2.GetAuthident called                  
DEBU using credentials for user vad1mo from generic env var 
DEBU Using Docker creds: vad1mo ********          
DEBU Harbor2.Pushrm called                        
DEBU push readme, response body: {"errors":[{"code":"UNAUTHORIZED","message":"unauthorized"}]} 
DEBU push README, status code: 401                
DEBU error pushing README, bad status code for response: 401 Unauthorized. Server responded: "UNAUTHORIZED - unauthorized" 
ERRO error pushing readme to repo server. See error message below. Run with "--debug" for more details. 

error pushing README, bad status code for response: 401 Unauthorized. Server responded: "UNAUTHORIZED - unauthorized" 

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions