Projet

Général

Profil

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

Serghei Mihai, 14 mai 2020 15:08

Télécharger (1,54 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', 'variables') ==  'a2-opened-session-5aef2f'
360 361

  
361 362

  
362 363
def test_deploy():
wcs/ctl/check_hobos.py
406 406

  
407 407
            if service.get('service-id') == 'authentic':
408 408
                variables['idp_url'] = service_url
409
                idp_hash = hashlib.md5(force_bytes(service_url)).hexdigest()[:6]
410
                variables['idp_session_cookie_name'] = 'a2-opened-session-%s' % idp_hash
409 411
                variables['idp_account_url'] = service_url + 'accounts/'
410 412
                variables['idp_api_url'] = service_url + 'api/'
411 413
                variables['idp_registration_url'] = service_url + 'accounts/register/'
412
-