openfaas / openfaas-cloud

The Multi-user OpenFaaS Platform
https://docs.openfaas.com/openfaas-cloud/intro/
MIT License
770 stars 228 forks source link

Lowercase usernames in github-event #595

Open Waterdrips opened 4 years ago

Waterdrips commented 4 years ago

There are places where uppercase usernames cause issues (register-image in the ECR code, as one example)

It would be good to lowercase this as far up the chain as possible so we dont need to remember to do it downstream everywhere, as we might miss those or they might get removed by accident.

Expected Behaviour

github-event lowercases the event's owner

Current Behaviour

its done downstream in the various services.

Possible Solution

github-event lowercases the event's owner

amalkh5 commented 4 years ago

@Waterdrips do you mean that ToLower method should be used here event.Installation.Account.Login https://github.com/openfaas/openfaas-cloud/blob/master/github-event/handler.go#L201 ?

Waterdrips commented 4 years ago

This would probably require a thorough look through the OFC code to work out where all of the usernames are, and which ones should be upper and lower, possibly look at a move to using the github user ID, but this would have much wider impact. (https://github.com/openfaas/openfaas-cloud/issues/314)

Currently there is nothing we are aware of that's broken due to this so its low priority.