Any API examples you can give that show session and payload

If you really wanted to use the “Default Admin” user (e.g. Identity which has attribute “isDefaultAdmin” == true), then you could certainly do that with the default updb authenticator that is created as follows:

function edge_management_cert_login {                                                                                                                                             
    curl -sSL \                                                                                                                                                               
        --request POST \
        --header 'Content-Type: application/json' \
        --url https://"$controller_ip":"$controller_port"/edge/management/v1/authenticate?method=password \
        --data '{"username": "admin", "password": [password]"}'
}

To be clear, I prefer not to use the default admin user, but instead create a new user with admin priviledges (will have attribute "isAdmin": true, but "isDefaultAdmin": false visible in GET /identitites). To create these, run:

ziti edge create identity user [my_admin] --admin --jwt-output-file my_admin_enrollment.jwt

By default, these create a cert based authenticator, not a updb based one.

If you wanted to still use updb insetad in this fashion, do:

ziti edge create identity user [my_admin] --admin  --updb [my_admin] --jwt-output-file my_admin_enrollment.jwt

# You can use -p to pass the password, but you will be prompted otherwise
ziti edge enroll ./my_admin_enrollment.jwt
2 Likes