IBM-Security / ibmsecurity

Idempotent functions for IBM Security Appliance REST APIs. Currently covering ISAM and ISDS Appliances.
Apache License 2.0
47 stars 73 forks source link

Update junctions.py #409

Closed djorgen-ibm closed 3 months ago

djorgen-ibm commented 7 months ago

removed the replacement of '_' with '-' for remote_http_header from the existing junction.

tombosmansibm commented 7 months ago

I think this is necessary because of a difference between input and output parameters (output is iv_user, input is iv-user). See https://ibm-security.github.io/apidocs/verifyaccess/10.0.7.0/ISVA-mgmt-rest-api/index.html

tombosmansibm commented 7 months ago

So the fix is the expansion of all -> list needs to have the '-' syntax.

                if remote_http_header is None or remote_http_header == []:
                    jct_json['remote_http_header'] = 'do not insert'
                elif isinstance(remote_http_header, basestring) and remote_http_header.lower() == 'all':
                    jct_json['remote_http_header'] = ['iv-creds', 'iv-groups', 'iv-user']
tombosmansibm commented 6 months ago

I've rewritten the compare functions for the junctions.py and junctions_server.py -> #411

"all" (as string or as array) is now handled differently -> it's sent to the API now (instead of translating it first).