summaryrefslogtreecommitdiffstats
path: root/custodia/httpd
Commit message (Collapse)AuthorAgeFilesLines
* Add support for using listening on TCP socketsChristian Heimes2015-10-193-42/+87
| | | | | | | | | | | | | | | | | | | The server can be now configured using a new parameter called "server_url". Setting server_url to "http://0.0.0.0:80/" will make the server listen on TCP port 80, while setting it to "http+unix://%2fsocket" will make the server listen on the unix socket named "/socket". The backwards compatible "server_socket" is retained and used if no server_url is provided. The request dict has a new field "client_id" that contains either a PID or a peer name. In the future the field can be augmented with a TLS client cert DN or other similar identifier. Signed-off-by: Christian Heimes <cheimes@redhat.com> Signed-off-by: Simo Sorce <simo@redhat.com>
* Add auditing to auth/authz modulesSimo Sorce2015-10-193-10/+58
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Christian Heimes <cheimes@redhat.com>
* Add simple Keys-in-Header based authenticationSimo Sorce2015-10-191-1/+47
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Christian Heimes <cheimes@redhat.com>
* Add UserNameSpace auths pluginSimo Sorce2015-10-191-0/+26
| | | | | | | | Moves the secrets.Namespaces plugin to the proper authorizers file and fixes it to properly enforce the user-named namespace is being used. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Christian Heimes <cheimes@redhat.com>
* Add Ability to retrieve peer's SELinux ContextSimo Sorce2015-10-191-2/+16
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Christian Heimes <cheimes@redhat.com>
* Make tox pep8 happySimo Sorce2015-10-191-8/+11
| | | | | Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Christian Heimes <cheimes@redhat.com>
* Also capture loginuid of the remote processPavel Odvody2015-09-011-1/+18
| | | | | Reviewed-by: Simo Sorce <simo@redhat.com> Closes #9
* Unquote the path before processingSimo Sorce2015-07-081-2/+3
| | | | | | | This avoids issues where spaces get turned to %20 and then name matching comparisons (like for KEMHandler) fail. Signed-off-by: Simo Sorce <simo@redhat.com>
* Add basic debugging capabilitiesSimo Sorce2015-06-051-12/+5
| | | | | | | If debug is set to True, then custodia's own Exception handlers will print a stack trace to standard output to aid debugging. Signed-off-by: Simo Sorce <simo@redhat.com>
* Make the socket world accessible by defaultSimo Sorce2015-05-261-0/+2
| | | | Signed-off-by: Simo Sorce <simo@redhat.com>
* Move pipeline from server class to request handlerSimo Sorce2015-04-081-79/+80
| | | | | Doesn't really make sense to have it on the server class, just snatch the config from it.
* Add basic framework for authorization pluginsSimo Sorce2015-04-083-24/+68
|
* Change authenticators to return a resultSimo Sorce2015-04-072-12/+23
| | | | | | | | | Authenticators will not signal anymore validity by adding a request attributes. Instead they can return on of three values: - True, indicates positive authentication - False, indicate explicit failure - None, inicates neither success nor failure, not applicable
* Defensive parsingSimo Sorce2015-04-071-0/+3
| | | | | Allow only specific commands, we do not want to allow users to end up being able to access internal functions with arbitrary names.
* Add simple secrets storage API to RootSimo Sorce2015-04-011-1/+1
| | | | | | | | | | | | | | This is a very simple implementation of a prototype API. Anyone that has access to the server and causes an authentication plugin to set the 'remote_user' value in the request, can retrieve and store secrets, Secrets are namespaced to the user requsteing them, so sharing secrets between multiple users is not possible. Secrets must to be of type "simple" and can only have one value. The value can be anything that can be reprsented in json format. It is recommended to pass a base64 encoded value.
* Add code to parse body and put it in the requestSimo Sorce2015-04-011-1/+19
| | | | | Accept a maximum of 10 Megabytes and relies on proper Content-length being set by the client
* Minor server.py fixesSimo Sorce2015-04-011-4/+9
| | | | | | | | Silence pylint errors due to python3 imports Switch to HTTP 1.0 by default, this terminates each request by default which make it handier for manual testing with clients like curl. Properly handle a consumer returning nothing (None) as output.
* Consumers can define entire subtreesSimo Sorce2015-04-011-3/+26
| | | | | | Each "page" is added to a parent consumer by callin add_sub() on the desired parent and provide a "page name" and the consumer class that handles it.
* Provide more complete parsing of a request pathSimo Sorce2015-03-301-0/+24
|
* Add some documentation in form of class commentsSimo Sorce2015-03-301-0/+57
|
* Make stores directly availble to consumersSimo Sorce2015-03-251-0/+3
|
* Adjust the code to be python3 happySimo Sorce2015-03-254-0/+310
This required the renaming of the http directory to avoid clashes with the python3 own http/server module.