[FOLIO-676] folio-ansible/roles/mod-users-data fails when 'auth_required' set to 'false' Created: 14/Jun/17  Updated: 12/Nov/18  Resolved: 16/Jun/17

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Bug Priority: P3
Reporter: John Malconian Assignee: Wayne Schneider
Resolution: Done Votes: 0
Labels: ci
Remaining Estimate: Not Specified
Time Spent: 1 hour, 15 minutes
Original estimate: Not Specified

Sprint:

 Description   

By default, the variable 'auth_required' is set to 'false' in the mod-users-data folio-ansible role. If not set to 'true', however, the role fails. Perhaps the default should be set to 'true'. Error output in comments.



 Comments   
Comment by John Malconian [ 14/Jun/17 ]
TASK [folio-ansible/roles/mod-users-data : Check tenant mod-user registration] ***
ok: [folioami]

TASK [folio-ansible/roles/mod-users-data : Enable mod-users module for tenant] ***
skipping: [folioami]

TASK [folio-ansible/roles/mod-users-data : Login as diku_admin] ****************
skipping: [folioami]

TASK [folio-ansible/roles/mod-users-data : Load groups] ************************
failed: [folioami] (item=/home/malc/proj/folio-infrastructure/CI/ansible/folio-ansible/roles/mod-users-data/files/groups/oncampus.json) => {"changed": false, "connection": "close", "content": "", "failed": true, "item": "/home/malc/proj/folio-infrastructure/CI/ansible/folio-ansible/roles/mod-users-data/files/groups/oncampus.json", "msg": "Status code was not [201, 422]: HTTP Error 400: Bad Request", "redirected": false, "status": 400, "transfer_encoding": "chunked", "url": "http://10.36.1.124:9130/groups", "x_okapi_trace": "POST authtoken http://10.36.1.124:9131/groups : 400"}
failed: [folioami] (item=/home/malc/proj/folio-infrastructure/CI/ansible/folio-ansible/roles/mod-users-data/files/groups/other.json) => {"changed": false, "connection": "close", "content": "", "failed": true, "item": "/home/malc/proj/folio-infrastructure/CI/ansible/folio-ansible/roles/mod-users-data/files/groups/other.json", "msg": "Status code was not [201, 422]: HTTP Error 400: Bad Request", "redirected": false, "status": 400, "transfer_encoding": "chunked", "url": "http://10.36.1.124:9130/groups", "x_okapi_trace": "POST authtoken http://10.36.1.124:9131/groups : 400"}
failed: [folioami] (item=/home/malc/proj/folio-infrastructure/CI/ansible/folio-ansible/roles/mod-users-data/files/groups/offcampus.json) => {"changed": false, "connection": "close", "content": "", "failed": true, "item": "/home/malc/proj/folio-infrastructure/CI/ansible/folio-ansible/roles/mod-users-data/files/groups/offcampus.json", "msg": "Status code was not [201, 422]: HTTP Error 400: Bad Request", "redirected": false, "status": 400, "transfer_encoding": "chunked", "url": "http://10.36.1.124:9130/groups", "x_okapi_trace": "POST authtoken http://10.36.1.124:9131/groups : 400"}
Comment by John Malconian [ 14/Jun/17 ]

I should add that the failure occurs using group_vars/testing module configuration.

Comment by John Malconian [ 14/Jun/17 ]

I should also clarify that setting 'auth_required' to 'true' does resolve the issue.

Comment by Wayne Schneider [ 16/Jun/17 ]

The error is caused by loading and enabling the authn/z modules for the tenant without setting auth_required to "true". If you update the module list to exclude those modules (and also exclude mod-users-bl, which depends on them), the mod-users-data role succeeds.

I think it is still best for the default of auth_required to be "false", because the simplest system doesn't include auth. However, I think that the auth_required variable should be defined in the same group_vars files as the list of modules, since that's actually a little more where it belongs.

I don't really have a great notion about how to document this, it's kind of a weird side effect – any suggestions on that would be welcome.

Generated at Thu Feb 08 23:07:32 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.