Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idempotency not working for reverse proxy configuration set #215

Open
elijah-chan opened this issue Feb 16, 2020 · 2 comments
Open

Idempotency not working for reverse proxy configuration set #215

elijah-chan opened this issue Feb 16, 2020 · 2 comments

Comments

@elijah-chan
Copy link

elijah-chan commented Feb 16, 2020

it seems that the reverse proxy configuration set function keeps inserting a new entry instead of not making any changes for eai-trigger-urls stanza

this is a snippet of my code

setEntries = [['trigger', '/pwd/testing']]
p(ibmsecurity.isam.web.reverse_proxy.configuration.entry.set(isamAppliance=isam_server, reverseproxy_id="sp-saml", stanza_id="eai-trigger-urls", entries=setEntries))

this is shown in the logs:

Entry found in rp:sp-saml, stanza:eai-trigger-urls, entryid:trigger, value:['/FIM/sps/auth*', '/FIM/sps/IDPFed/saml20/soap*', '/FIM/sps/IDPFed/saml20/slo*', '/FIM/sps/IDPFed/saml20/login*', '/mga/sps/oauth/oauth20/session*', '/mga/sps/auth*', '/mga/sps/authservice/authentication*', '/pwd/testing']
[2020-02-16 22:57:00,489] [PID:91475 TID:4527084992] [DEBUG] [ibmsecurity.isam.web.reverse_proxy.configuration.entry] [_check():251] Existing Value(s): ['/FIM/sps/auth*', '/FIM/sps/IDPFed/saml20/soap*', '/FIM/sps/IDPFed/saml20/slo*', '/FIM/sps/IDPFed/saml20/login*', '/mga/sps/oauth/oauth20/session*', '/mga/sps/auth*', '/mga/sps/authservice/authentication*', '/pwd/testing']
[2020-02-16 22:57:00,489] [PID:91475 TID:4527084992] [DEBUG] [ibmsecurity.isam.web.reverse_proxy.configuration.entry] [_check():252] Value to update  : ['/pwd/testing']
[2020-02-16 22:57:00,489] [PID:91475 TID:4527084992] [DEBUG] [ibmsecurity.isam.web.reverse_proxy.configuration.entry] [_check():256] Value arrays do not match!

the result is this

[2020-02-16 22:57:21,834] [PID:92328 TID:4514801088] [DEBUG] [ibmsecurity.appliance.ibmappliance] [_log_response():609] Response: 0
{ 'changed': False,
  'data': { 'trigger': [ '/FIM/sps/auth*',
                         '/FIM/sps/IDPFed/saml20/soap*',
                         '/FIM/sps/IDPFed/saml20/slo*',
                         '/FIM/sps/IDPFed/saml20/login*',
                         '/mga/sps/oauth/oauth20/session*',
                         '/mga/sps/auth*',
                         '/mga/sps/authservice/authentication*',
                         '/pwd/testing',
                         '/pwd/testing']}

since the entry is already inside the list, why is the code adding it the entry again ?

@ram-ibm
Copy link
Collaborator

ram-ibm commented Apr 10, 2020

I suspect it may the format of the input - will investigate this further.

@djorgen-ibm
Copy link
Collaborator

The set is replacing the old list with the new list if the two lists are not the same. It is not adding a new value to the old list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants