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

Issue340 reverseproxy config idempotency #342

Conversation

tombosmansibm
Copy link
Collaborator

This code improves idempotency for editing entries. It closes #340.

This is only applicable for the entries style of writing, where you can update multiple entries at once.
The code also does a more efficient check, by doing a single call per stanza instead of a call per entry (get_all instead of get).
That, however, does not make a noticable difference in performance.

That idempotency now works better, obvioulsy does make a huge difference in performance (when there are no changes), though.

These tests need to run twice, to demonstrate idempotency. If you run these with the current code, you'll see the idempotency check fails.

p(ibmsecurity.isam.web.reverse_proxy.configuration.entry.set(isamAppliance=isam_server,
                                                                                 reverseproxy_id="default",
                                                                                 stanza_id="filter-content-types",
                                                                                 entries=[["type", "text/html"],
                                                                                          ["type", "text/vnd.wap.wml"],
                                                                                          ["type",
                                                                                           "applications/atom+xml"]]))

    p(ibmsecurity.isam.web.reverse_proxy.configuration.entry.set(isamAppliance=isam_server,
                                                                                 reverseproxy_id="default",
                                                                                 stanza_id="server",
                                                                                 entries=[
                                                                                     ["use-http-only-cookies", "yes"],
                                                                                     ["allow-unsollicited-logins",
                                                                                      "no"],
                                                                                     ["worker-threads", "1000"],
                                                                                     ["suppress-server-identity", "yes"]
                                                                                     ]))

    p(ibmsecurity.isam.web.reverse_proxy.configuration.entry.set(isamAppliance=isam_server,
                                                                                 reverseproxy_id="default",
                                                                                 stanza_id="session",
                                                                                 entries=[
                                                                                     ["create-unauth-sessions", "yes"],
                                                                                     ["inactive-timeout", 1800],
                                                                                     ["max-entries", 8192],
                                                                                     ["ssl-id-sessions", "no"],
                                                                                     ["timeout", 21600],
                                                                                     ["unauth-inactive-timeout", 300],
                                                                                     ["unauth-max-entries", 4096]
                                                                                     ]))
    # Commit or Deploy the changes
    p(ibmsecurity.isam.appliance.commit(isamAppliance=isam_server))

I've also updated the readme to be in line with what is mentioned in the ibm.isam Ansible Collection.

djorgen-ibm pushed a commit that referenced this pull request Feb 24, 2022
…nsibm-issue340_reverseproxy_config_idempotency'
@djorgen-ibm djorgen-ibm merged commit 3dccdbf into IBM-Security:master Feb 24, 2022
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

Successfully merging this pull request may close these issues.

Idempotency for reverse proxy configuration settings
2 participants