...
This feature must be mixed with one of the other authentication plugin. Indeed, REMOTE_USER manage user authentication but software still need an authentication plugin to extract user info from ldap, local, etc., its role is only to bypass login/password checks.
Kerberos
Kerberos authentication has already been tested (thanks to Marius Wigger), and can used as below example. In this case, server is configured to support REMOTE_USER and Kerberos auth is managed via a web proxy.
Code Block | ||||
---|---|---|---|---|
| ||||
import json import requests from requests_kerberos import HTTPKerberosAuth, DISABLED kerberos_auth = HTTPKerberosAuth(mutual_authentication=DISABLED) job={ "meta": { "name": "test-02" }, "requirements": { "cpu": 1, "ram": 2 }, "container": { "image": "god-testimage/ubuntu-sshd", "volumes": [], "root": False }, "command": { "interactive": False, "cmd" : "sleep 6000" } } response= requests.post(r"https://gatewayserver:3456/api/1.0/task", auth=kerberos_auth, verify="c:\path\to\CA.pem" , json=job) taskdata=json.loads(response.text) task_id=taskdata["id"] response= requests.get(r"https:// gatewayserver:3456/api/1.0/task/{0:d}".format(task_id), auth=kerberos_auth, verify="c:\path\to\CA.pem") taskdata=json.loads(response.text) print(taskdata) |