Hey!
I started to work with the scaffolder and have some questions to the publish:gitlab action.
So i created an App in out GitLab and configured Backstage to include GitLab auth. When I use the RepoUrlPicker, it generates a "Login Required" popup for gitlab, when im not already logged in - this works.
But then, in my action, I want only logged in Users, which have Permission to the repo, to be able to publish a project.
- id: publish
name: Publish
action: publish:gitlab
input:
allowedHosts: ['gitlab.mycompany.com']
repoUrl: ${{ parameters.RepoUrlPicker }}
token: ${{ secrets.USER_OAUTH_TOKEN }}
settings:
visibility: private
defaultBranch: develop
setUserAsOwner: true
gitCommitMessage: "Initial commit"
The problem: When I login as Guest, and cancel the RepoPicker Popup, I am still able to publish a project to Gitlab. Shouldn't the token property ensure, that only logged in users are able to do so?
Also it is not working to publish, even when I'm logged in, whenever the setUserAsOwner is active.
I want: Only Gitlab authenticated Users should be able to publish to a repo, which belongs to them.
Problem: A guest without any Login can publish to Gitlab (because of the Integration Token? Or why..)