roadie-backstage-plugins icon indicating copy to clipboard operation
roadie-backstage-plugins copied to clipboard

[scaffolder-backend-module-http-request] - added credentials prop sup…

Open goququ opened this issue 1 year ago • 3 comments

…port

Hi team, more information about this changes here

:heavy_check_mark: Checklist

  • [ ] Added tests for new functionality and regression tests for bug fixes
  • [ ] Added changeset (run yarn changeset in the root)
  • [ ] Screenshots of before and after attached (for UI changes)
  • [ ] Added or updated documentation (if applicable)

goququ avatar Aug 31 '22 11:08 goququ

https://app.shortcut.com/larder/story/10468

roadie-bot avatar Aug 31 '22 11:08 roadie-bot

@goququ can I ask why you wouldnt configure the backstage proxy to provide the credentials? This change seems unusual, because these credentials will be presented to the backstage proxy backend which is designed to provide auth to the target service.

punkle avatar Sep 01 '22 15:09 punkle

@punkle thank you for the question. May be I missed something, but when I try to do request to the backstage catalog api I don't use proxy. Isn't it?

goququ avatar Sep 08 '22 06:09 goququ

Yes that is true. You can use this to call any api on the backstage backend. The user's backstage token is provided to the backstage backend by this scaffolder action already. https://github.com/RoadieHQ/roadie-backstage-plugins/blob/main/plugins/scaffolder-actions/scaffolder-backend-module-http-request/src/actions/run/backstageRequest.ts#L141

So in theory the catalog backend should be honouring this token and using it to identify the user who triggered the scaffolder task to start.

For example here on the catalog backend, it is using the authorization token to identify the user https://github.com/backstage/backstage/blob/master/plugins/catalog-backend/src/service/createRouter.ts#L205

punkle avatar Sep 08 '22 08:09 punkle

@goququ were you able to consider my question?

punkle avatar Sep 22 '22 08:09 punkle

@goququ I'll close this to keep things clean. When you'll have some time again to pick this up feel free to reopen this one!

kissmikijr avatar Oct 11 '22 12:10 kissmikijr