Impersonation

Srkanoje
Srkanoje Registered Posts: 32 ✭✭✭✭

We have created 2 node design and automation we were able to move users and connection from design node to automation using the .json files.
do we have such an alternative for user impersonation as well were we can copy the details from design to automation


Operating system used: Linux

Best Answer

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,212 Dataiker
    Answer ✓

    Yes, it's possible via API/ or copying fragments of the general-settings.json we will need also, it's best to utilize regex in cases like this. Maintaining such a long list will be hard to manage, as you can see.

    import dataiku
    import dataikuapi
    local_client = dataiku.api_client()

    host = "https://design-node-url:port"
    api_key = "replace_here_generate_personal_api_key_of_admin_or_admin_api_key"
    remote_client = dataikuapi.DSSClient(host, api_key)

    settings = client.get_general_settings()
    impersonation_rules = settings.get_raw()['impersonation']
    remote_rules = remote_client.get_general_settings().get_raw()['impersonation']
    settings.get_raw()['impersonation'] = remote_rules
    settings.save()



    If you have any issues I would suggest you open a support ticket with the instance diagnostics and your security-config.ini from the design so we can provide more perspective guidance on this matter.

    Thanks

Answers

Setup Info
    Tags
      Help me…