deploy/ansible/roles-sap/0.1-bom-validator/tasks/sap_sso_authentication.yaml [104:152]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  ansible.builtin.lineinfile:
    state:                              present
    create:                             true
    path:                               cookie_jar
    mode:                               0644
    regexp:                             ^#.*?_({{ url | regex_replace('[.]', '[.]') }}).*?\s({{ (item.split('=', 1))[0] | trim | regex_replace('[.]', '[.]') }})\s
    line:                               "
                                        {#-  -#}
                                        {% set _cookie = {  'cookie_name':  '',
                                                            'cookie_value': '',
                                                            'Expires':      '0',
                                                            'Max-age':      '',
                                                            'Url':          '',
                                                            'Domain':       'FALSE',
                                                            'Path':         '',
                                                            'Secure':       '',
                                                            'HttpOnly':     'FALSE',
                                                            'SameSite':     '' }
                                                                                                       -%}
                                        {% for element in item.split(';')                              -%}
                                        {%   if loop.index == 1                                        -%}
                                        {%     set sub = element.split('=', 1)                         -%}
                                        {%     set _ = _cookie.update({'cookie_name': sub[0] | trim})   -%}
                                        {%     set _ = _cookie.update({'cookie_value': sub[1] | trim})   -%}
                                        {%   elif 'PATH' in element.split('=', 1) | trim | upper           -%}
                                        {%     set sub = element.split('=', 1)                         -%}
                                        {%     set _ = _cookie.update({'Path':         sub[1] | trim})   -%}
                                        {%   elif 'HTTPONLY' in element | trim | upper                     -%}
                                        {%     set _ = _cookie.update({'HttpOnly':     'TRUE'})        -%}
                                        {%   elif 'DOMAIN' in element.split('=', 1) | trim | upper         -%}
                                        {%     set sub = element.split('=', 1)                         -%}
                                        {%     set _ = _cookie.update({'Domain':       'TRUE'})        -%}
                                        {%     set _ = _cookie.update({'Url':          '.' + sub[1] | trim | regex_search('^[.]?(?P<hostname>.*)$', '\\g<hostname>') | join}) -%}
                                        {%   endif                                                     -%}
                                        {% endfor                                                      -%}
                                        {% if not _cookie.Url                                          -%}
                                        {%   set _ = _cookie.update({'Url':            url})           -%}
                                        {% endif                                                       -%}
                                        #HttpOnly_\
                                        {{ _cookie.Url }}\t\
                                        {{ _cookie.Domain }}\t\
                                        {{ _cookie.Path }}\t\
                                        {{ _cookie.HttpOnly }}\t\
                                        {{ _cookie.Expires }}\t\
                                        {{ _cookie.cookie_name }}\t\
                                        {{ _cookie.cookie_value }}
                                        "
  loop:                                 "{{ set_cookie_string_filtered.split(',') }}"
  vars:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



deploy/ansible/roles-sap/0.1-bom-validator/tasks/sap_sso_authentication.yaml [464:512]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ansible.builtin.lineinfile:
        state:                              present
        create:                             true
        path:                               cookie_jar
        mode:                               0644
        regexp:                             ^#.*?_({{ url | regex_replace('[.]', '[.]') }}).*?\s({{ (item.split('=', 1))[0] | trim | regex_replace('[.]', '[.]') }})\s
        line:                               "
                                            {#-  -#}
                                            {% set _cookie = {  'cookie_name':  '',
                                                                'cookie_value': '',
                                                                'Expires':      '0',
                                                                'Max-age':      '',
                                                                'Url':          '',
                                                                'Domain':       'FALSE',
                                                                'Path':         '',
                                                                'Secure':       '',
                                                                'HttpOnly':     'FALSE',
                                                                'SameSite':     '' }
                                                                                                          -%}
                                            {% for element in item.split(';')                              -%}
                                            {%   if loop.index == 1                                        -%}
                                            {%     set sub = element.split('=', 1)                         -%}
                                            {%     set _ = _cookie.update({'cookie_name':  sub[0] | trim})   -%}
                                            {%     set _ = _cookie.update({'cookie_value': sub[1] | trim})   -%}
                                            {%   elif 'PATH' in element.split('=', 1) | trim | upper           -%}
                                            {%     set sub = element.split('=', 1)                         -%}
                                            {%     set _ = _cookie.update({'Path':         sub[1] | trim})   -%}
                                            {%   elif 'HTTPONLY' in element | trim | upper                     -%}
                                            {%     set _ = _cookie.update({'HttpOnly':     'TRUE'})        -%}
                                            {%   elif 'DOMAIN' in element.split('=', 1) | trim | upper         -%}
                                            {%     set sub = element.split('=', 1)                         -%}
                                            {%     set _ = _cookie.update({'Domain':       'TRUE'})        -%}
                                            {%     set _ = _cookie.update({'Url':          '.' + sub[1] | trim | regex_search('^[.]?(?P<hostname>.*)$', '\\g<hostname>') | join}) -%}
                                            {%   endif                                                     -%}
                                            {% endfor                                                      -%}
                                            {% if not _cookie.Url                                          -%}
                                            {%   set _ = _cookie.update({'Url':            url})           -%}
                                            {% endif                                                       -%}
                                            #HttpOnly_\
                                            {{ _cookie.Url }}\t\
                                            {{ _cookie.Domain }}\t\
                                            {{ _cookie.Path }}\t\
                                            {{ _cookie.HttpOnly }}\t\
                                            {{ _cookie.Expires }}\t\
                                            {{ _cookie.cookie_name }}\t\
                                            {{ _cookie.cookie_value }}
                                            "
      loop:                                 "{{ set_cookie_string_filtered.split(',') }}"
      vars:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



