Issue_0075 

Fuego wiki

Login or create account

Issue 0075

Summary
Have ftc authenticate itself with Jenkins
Owner
Tim
Reporter
Dhinakar Kalyanasundaram
Status
open
Priority
medium

Description [edit section]

If I enable security in Fuego dashboard (Manage Jenkins -> Configure Global Security -> Enable Security and choose 'Logged-in users can do anything', and have 'Allow anonymous read access' not checked), I get authentication issues in 'ftc list-nodes' command:

    root@linux-2030047407:/ <mailto:root@linux-2030047407:/> # ftc list-nodes
    Traceback (most recent call last):
      File "/usr/local/bin/ftc", line 4772, in <module>
        main()
      File "/usr/local/bin/ftc", line 4665, in main
        do_list_nodes(conf)
      File "/usr/local/bin/ftc", line 1869, in do_list_nodes
        node_list = [node['name'] for node in server.get_nodes()]
      File "/usr/local/lib/python2.7/dist-packages/jenkins/__init__.py", line 1170, in get_nodes
        nodes_data = json.loads(self.jenkins_open(Request(self._build_url(NODE_LIST))))
      File "/usr/local/lib/python2.7/dist-packages/jenkins/__init__.py", line 430, in jenkins_open
        self.maybe_add_crumb(req)
      File "/usr/local/lib/python2.7/dist-packages/jenkins/__init__.py", line 303, in maybe_add_crumb
        self._build_url(CRUMB_URL)), add_crumb=False)
      File "/usr/local/lib/python2.7/dist-packages/jenkins/__init__.py", line 448, in jenkins_open
        e.code, e.msg)
    jenkins.JenkinsException: Error in request. Possibly authentication failed [403]: Forbidden

If I check 'Allow anonymous read access', then it works:

    root@userl2:/ <mailto:root@userl2:/> # ftc list-nodes
    Jenkins nodes in this system:
       ARM64-SSH-Test
       ARM64-Serial-Test
       X86-SSH-Test

Notes [edit section]

In general, we should probably be using an authenticated user for ftc access to Jenkins, to avoid permission problems like this.

This will require some investigation, but we should be able to generate a key (or handle or token or something) that can be used inside the docker container, and automatically install it for the user on container creation.

backlink

Fuego Issues List

TBWiki engine 1.8.3 by Tim Bird