Thursday, 2020-10-08

*** evrardjp has quit IRC04:33
*** evrardjp has joined #ara04:33
*** TKersten has joined #ara05:25
svgI'm a bit confused on how I could enable and use external authentication. Am I missing the right section, or is there documentation missing about this? i only see a reference to the Django docs, but not sure what it would take to use this in ARA?11:15
dmsimardsvg: I don't use external auth myself but it's something that django supports, it's not something implemented specifically by/for ara11:23
dmsimardfrom ara's perspective you would need to flip the required booleans for requiring authentication: https://ara.readthedocs.io/en/latest/api-security.html#enabling-authentication-for-read-or-write-access11:25
dmsimardand then set ARA_EXTERNAL_AUTH to True11:25
dmsimardthen the rest is django/your webserver I think11:25
dmsimardhappy to review a patch to improve docs if you get it working :)11:26
dmsimardoh, there is an apache specific howto here that could help point you in the right direction: https://github.com/ansible-community/ara/issues/124#issuecomment-61784159711:30
svgok, thank you, situation is  clear now; for now I'm using the docker setup, so that would involve a bit more to get it working11:58
dmsimardsvg: let me know if you get it working, I'm curious :)12:19
svgdmsimard, having a first look at it; customer would want github authentication, but I fear I'll have to postpone that to later, and stick to a base setup for now, then later I can have a look at extending the docker image locally12:20
svghm, what would be the problem when getting a warning (<ansible.plugins.callback.ara_default.CallbackModule object at 0x7fe3c6866c70>): 'id'12:37
svgI get on the server atthe same time   "POST /api/v1/playbooks HTTP/1.1" 40112:38
svgI'll double check the password to be sure12:38
svgseems ok, as I can log in on the web frontend12:39
svg(not sure which exact permissions the user used by the callback plugin should have, I select most for now)12:40
dmsimardthere's no concept of permission granularity in ara, either you have access to it or you don't12:43
dmsimarddid you set ARA_API_USERNAME/PASSWORD as env variables for the callback ?12:44
dmsimardif you turn up verbosity (ansible-playbook -vvv) ansible should print the traceback12:44
svgI set them in ansible.cfg12:49
svgjus tested ot log in on /api, and I don't have that permission, I can login on /admin/ though12:49
dmsimardthat's odd12:50
svgoh, so the different user permissions listed at https://ara.team.skedify.io/admin/auth/user/2/change/ have zero effect?12:50
dmsimardwe only use login12:51
dmsimardneed to afk a bit, brb12:51
svgapologies, pebkac, I had a typo somewhere :-(12:54
dmsimardsvg: oh, so it works ?13:28
svgyes13:28
svgmy bad13:29
dmsimardnice! so you're using a github token for auth ?13:29
svgoh, no, not looked at the auth yet13:29
svgexternal auth13:29
dmsimardoh13:30
svgfirst impresion of running a playbook, it does slow down a lot. or perhaps especially when uploading all files.13:30
dmsimardyes, there is definitely an overhead with vs without ara13:30
dmsimardthe objective is for that overhead to be small enough to be worth it, though13:30
dmsimardyou want to pay attention to latency between the callback, the API server and the database server13:31
svgfirst try, using sqlite, and the ara server is located at remote DC, where my hosts are. So we'll see how it evolves, I could test it from a DC local machine later13:32
svgbtw, is it possible the playbook vars like ara_playbook_labels don't get templated b yansible before passing them to the callback?13:32
svgI was trying to add a tag with the username of who runs the playbook13:33
dmsimardgood question, I don't think I've templated labels before -- only ever specified them as-is13:37
dmsimardby the time the labels get to ara, they are picked up at the beginning of each play so hopefully the templated value is available by then13:38
svgwell, seems it isn't, I suspect templating is something that needs to be done explicitly in the code13:40
dmsimardso just to make sure we're talking about the same thing -- you're doing something like this: https://github.com/ansible-community/ara/blob/40894c7027144c4d875e5d5a97e5cfebf75ec318/tests/integration/smoke.yaml#L24-L26 but with something like - "{{ ansible_user }}" ?13:41
svgyes13:42
svgand then I get https://transfer.office.ginsys.eu/inline/py7UQ/20201008154242.png13:43
svgbtw, setting this is only per play, not playbook? We alwasy run a site.yaml with multiple playbooks, so we would need to repeat those labels each time I presume.13:45
dmsimardlabels apply to the playbook, not the play -- but you'd technically have the ability to change labels across different plays13:46
dmsimardi need to do some testing for the templated label, let me get back to you on that13:47
svgok!13:52
dmsimardI've reproduced the issue but I'm not sure if it's the fault of ara or ansible, will create an issue on github about it13:55
dmsimardcreated https://github.com/ansible-community/ara/issues/18014:05
*** TKersten has quit IRC14:23
*** TKersten has joined #ara14:23
*** TKersten has quit IRC14:46
*** etienne has joined #ara14:47
*** gvincent_ has quit IRC15:34
*** gvincent_ has joined #ara15:34
*** gvincent_ has quit IRC18:55
*** etienne has quit IRC20:41

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!