Projet

Général

Profil

0001-check_hobos-set-idp-session-cookie-name-42878.patch

Serghei Mihai, 14 mai 2020 21:39

Télécharger (1,49 ko)

Voir les différences:

Subject: [PATCH] check_hobos: set idp session cookie name (#42878)

 tests/test_hobo.py     | 1 +
 wcs/ctl/check_hobos.py | 2 ++
 2 files changed, 3 insertions(+)
tests/test_hobo.py
357 357
    assert pub.cfg['sp']['idp-manage-user-attributes']
358 358
    assert pub.cfg['sp']['idp-manage-roles']
359 359
    assert pub.get_site_option('idp_account_url', 'variables').endswith('/accounts/')
360
    assert pub.get_site_option('idp_session_cookie_name') ==  'a2-opened-session-5aef2f'
360 361

  
361 362

  
362 363
def test_deploy():
wcs/ctl/check_hobos.py
409 409
                variables['idp_account_url'] = service_url + 'accounts/'
410 410
                variables['idp_api_url'] = service_url + 'api/'
411 411
                variables['idp_registration_url'] = service_url + 'accounts/register/'
412
                idp_hash = hashlib.md5(force_bytes(service_url)).hexdigest()[:6]
413
                config.set('options', 'idp_session_cookie_name', 'a2-opened-session-%s' % idp_hash)
412 414

  
413 415
            if service.get('secondary'):
414 416
                continue
415
-