{"action":"created","issue":{"url":"https://api.github.com/repos/IBM-Security/ibmsecurity/issues/109","repository_url":"https://api.github.com/repos/IBM-Security/ibmsecurity","labels_url":"https://api.github.com/repos/IBM-Security/ibmsecurity/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/IBM-Security/ibmsecurity/issues/109/comments","events_url":"https://api.github.com/repos/IBM-Security/ibmsecurity/issues/109/events","html_url":"https://github.com/IBM-Security/ibmsecurity/pull/109","id":343434194,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzMDczODg1","number":109,"title":"Resolution to issue_108","user":{"login":"sygilber","id":29456610,"node_id":"MDQ6VXNlcjI5NDU2NjEw","avatar_url":"https://avatars3.githubusercontent.com/u/29456610?v=4","gravatar_id":"","url":"https://api.github.com/users/sygilber","html_url":"https://github.com/sygilber","followers_url":"https://api.github.com/users/sygilber/followers","following_url":"https://api.github.com/users/sygilber/following{/other_user}","gists_url":"https://api.github.com/users/sygilber/gists{/gist_id}","starred_url":"https://api.github.com/users/sygilber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sygilber/subscriptions","organizations_url":"https://api.github.com/users/sygilber/orgs","repos_url":"https://api.github.com/users/sygilber/repos","events_url":"https://api.github.com/users/sygilber/events{/privacy}","received_events_url":"https://api.github.com/users/sygilber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-22T20:03:48Z","updated_at":"2018-07-24T17:24:14Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/IBM-Security/ibmsecurity/pulls/109","html_url":"https://github.com/IBM-Security/ibmsecurity/pull/109","diff_url":"https://github.com/IBM-Security/ibmsecurity/pull/109.diff","patch_url":"https://github.com/IBM-Security/ibmsecurity/pull/109.patch"},"body":"-Add logic on method update() to perform inspection on API definition oidcConfig and oidcEncConfig sub-structures\r\n-Should they contain 'None' value, remove them before performing comparison of old&ew values\r\n\r\nThis resolve idempotency behavior when updates were always turning out as HTTP PUT to the appliance although no changes were pushed by playbook.  Because this particular code has complexdata structure, I am putting here a sample YML contant:\r\n\r\n\r\n    - role: set_oauth_definition ( ***** role to be submitted/updated eventually after this PR is reviewed and merged ***** )\r\n      oauth_definition_file: \"{{ ansible_env.ISAM_TEMPLATES_HOME }}/isam/aac/{{ fact_serverassetinfo_environment }}/api_protection/{{ set_oauth_definition_name }}.properties\"\r\n      set_oauth_definition_grantTypes: [\"AUTHORIZATION_CODE\"]\r\n      set_oauth_definition_tcmBehavior: \"NEVER_PROMPT\"\r\n      set_oauth_definition_accessTokenLifetime: 1500\r\n      set_oauth_definition_enforceSingleAccessTokenPerGrant: True\r\n      set_oauth_definition_enforceSingleUseAuthorizationGrant: True\r\n      set_oauth_definition_refreshTokenLength: 500\r\n      set_oauth_definition_maxAuthorizationGrantLifetime: 15552000\r\n      oauth_definition_oidc_web_host: \"{{ lookup('ini', 'add_oauth_definition_oidc_web_host type=properties file={{ oauth_definition_file }}') }}\"\r\n      oauth_definition_oidc_iss: \"https://{{ oauth_definition_oidc_web_host }}\"\r\n      oauth_definition_oidc_poc: \"https://{{ oauth_definition_oidc_web_host }}/isam\"\r\n      oauth_definition_oidc_lifetime: 1500\r\n      oauth_definition_oidc_db: \"{{ lookup('ini', 'add_oauth_definition_oidc_db type=properties file={{ oauth_definition_file }}') }}\"\r\n      oauth_definition_oidc_cert: \"{{ lookup('ini', 'add_oauth_definition_oidc_cert type=properties file={{ oauth_definition_file }}') }}\"\r\n      oauth_definition_oidc_attrs: [{ \"attributeName\":\"test1\", \"attributeSourceId\":\"1\" },{ \"attributeName\":\"test2\", \"attributeSourceId\":\"1\" }]\r\n      set_oauth_definition_oidc: { \"enabled\": True, \"alg\": \"RS256\", \"db\": \"{{ oauth_definition_oidc_db }}\", \"cert\": \"{{ oauth_definition_oidc_cert}}\", \"iss\": \"{{ oauth_definition_oidc_iss }}\", \"poc\": \"{{ oauth_definition_oidc_poc }}\", \"lifetime\": \"{{ oauth_definition_oidc_lifetime }}\", \"enc\":{ \"enabled\":False }, \"attributeSources\": \"{{ oauth_definition_oidc_attrs }}\" }\r\n"},"comment":{"url":"https://api.github.com/repos/IBM-Security/ibmsecurity/issues/comments/407485656","html_url":"https://github.com/IBM-Security/ibmsecurity/pull/109#issuecomment-407485656","issue_url":"https://api.github.com/repos/IBM-Security/ibmsecurity/issues/109","id":407485656,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzQ4NTY1Ng==","user":{"login":"ram-ibm","id":26349037,"node_id":"MDQ6VXNlcjI2MzQ5MDM3","avatar_url":"https://avatars2.githubusercontent.com/u/26349037?v=4","gravatar_id":"","url":"https://api.github.com/users/ram-ibm","html_url":"https://github.com/ram-ibm","followers_url":"https://api.github.com/users/ram-ibm/followers","following_url":"https://api.github.com/users/ram-ibm/following{/other_user}","gists_url":"https://api.github.com/users/ram-ibm/gists{/gist_id}","starred_url":"https://api.github.com/users/ram-ibm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ram-ibm/subscriptions","organizations_url":"https://api.github.com/users/ram-ibm/orgs","repos_url":"https://api.github.com/users/ram-ibm/repos","events_url":"https://api.github.com/users/ram-ibm/events{/privacy}","received_events_url":"https://api.github.com/users/ram-ibm/received_events","type":"User","site_admin":false},"created_at":"2018-07-24T17:24:14Z","updated_at":"2018-07-24T17:24:14Z","author_association":"COLLABORATOR","body":"Good changes - I am thinking I need a utility function to replace None with spaces or vice versa using a recursive function. That will enable us to compare JSON's better. No need to specifically look for values to change. Maybe we recursively change None/null values to a blank value and then compare..."}}
{"actor":{"display_login":"ram-ibm"}}