This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Request authentization for lnt submit command via secret_key in lnt.cfg file.
AbandonedPublic

Authored by marxin on May 29 2018, 10:01 AM.

Details

Reviewers
MatzeB
cmatthews
Summary

If I see correctly secret_key value in lnt.cfg is unused. I'm planning to install a new LNT instance and I would like to restrict machines which can actually do submissions.
I hope adding argument (--secret-key) to submit command can provide that.

Thoughts?

Diff Detail

Event Timeline

marxin created this revision.May 29 2018, 10:01 AM

Secret key is used. That is the value that Flask is using to encrypt the cookies flask uses for sessions. It is also very secret, so we don't want it showing up outside the server config file.

Would make more sense to to use the api_auth_token that we use for other write operations. A config file option could be set to make that key needed on submissions as well.

MatzeB added a comment.EditedMay 29 2018, 10:46 AM

I'd also recommend using the api_auth_token. Actually if you look at the Rest API you can see it supporting submissions only with api_auth_token set. I just never wanted to introduce this to the /submitRun pages to remain compatible with old clients.

About LNT authentication in general: api_auth_token is a very simple/poor mechanism. At the same time I'd really like to avoid for LNT to get into the game of authentication and the complexity that comes with it. How hard is it to do the authentication on the server level i.e. apache/nginx modules (either by setting them up as proxy servers or running the python app inside them)? Maybe the thing we should do is give some tips for this in the documentation and not implement any authentication inside LNT.

marxin abandoned this revision.May 29 2018, 10:54 AM

@MatzeB: Agree with you, restricting methods will be the easiest way how to achieve that:

https://httpd.apache.org/docs/2.4/mod/mod_allowmethods.html