goharbor / perf

performance test scripts and data
Apache License 2.0
20 stars 16 forks source link

createUserForbidden on OIDC enabled instance #42

Open srinath-chandra opened 1 year ago

srinath-chandra commented 1 year ago

Seems this tools doesn't work for OIDC enabled Harbor instances, as the local user creation would be disabled, when on OIDC.

When we run perf prepare on OIDC enabled instance we get below error [Test projects gets created fine]: INFO[0001] GoError: failed to create user user-001, error: [POST /users][403] createUserForbidden source=console

We use admin User, so its not the User permission issue, rather not allowed of local User creation apart from the default admin user, when OIDC is enabled.

Any suggestions or workaround please?

jicki commented 1 year ago

确实如此~ 有什么办法吗?

chlins commented 1 year ago

Yes, harbor admin can not create user manually when switch the auth mode to OIDC because the local user only available when use DB for authorization, so a workaround may delete the script for prepare user.

nmcostello commented 11 months ago

Yup, we just do a simple rm scripts/data/02-user.js scripts/data/03-project-member.js prior to running go run mage.go prepare.