Passthrough the Author for Commits
avaitla opened this issue · 4 comments
Currently HostedDolt allows us to use the authors email on commits as follows:
However there is no way to specify the committer in dolt workbench currently:
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)
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
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).
Makes sense. I'll start looking into this today and keep you updated
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).
Let me know when you have a chance to try it out and if you have any feedback!