dolt-workbench icon indicating copy to clipboard operation
dolt-workbench copied to clipboard

Passthrough the Author for Commits

Open avaitla opened this issue 2 years ago • 4 comments

Currently HostedDolt allows us to use the authors email on commits as follows: Screen Shot 2024-04-17 at 10 33 28 AM

However there is no way to specify the committer in dolt workbench currently: Screen Shot 2024-04-17 at 10 34 27 AM

This then logs a user without a clear identifier. How can we pass through a header indicating the user making the commit itself, for instance we have a reverse proxy like nginx or oauth2proxy in front that can feed in X-Forwarded-Email which we should use in our commits (https://oauth2-proxy.github.io/oauth2-proxy/configuration/overview#config-file)

Screen Shot 2024-04-17 at 10 45 36 AM

avaitla avatar Apr 17 '24 15:04 avaitla

Hi @avaitla, thanks for the feature request. I can quickly add a workaround today where you can manually enter a user/email when you start a connection or want to commit and have it saved in the store. Will look into how we can make it work with a header but that may take a little longer

tbantle22 avatar Apr 17 '24 16:04 tbantle22

For enterprise use cases we don't want anyone overriding / disabling / misspelling it, which is why the reverse proxy pass through header is ideal. We can have an envvar that the golang code reads in the http request and places in the committer value when running the commit (all our access to dolt workbench is reverse proxy through oauth2proxy).

avaitla avatar Apr 17 '24 16:04 avaitla

Makes sense. I'll start looking into this today and keep you updated

tbantle22 avatar Apr 17 '24 17:04 tbantle22

I just released 0.2.10 with this change. I have an example nginx configuration here that passes through the user headers and if successful you will see this checkbox enabled in the commit modal (you'll be able to use it when creating releases and merging pull requests). Screenshot 2024-04-23 at 10 15 10 AM

Let me know when you have a chance to try it out and if you have any feedback!

tbantle22 avatar Apr 23 '24 17:04 tbantle22