Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem: User-Id field in zap response is not populated #1711

Merged
merged 3 commits into from
Jul 21, 2017

Commits on Jul 21, 2017

  1. problem: User-Id field in zap response is not populated.

    According to ZAP spec:
    
    user id: this MAY provide the user identity in case of a 200 status, for
    use by applications. For other statuses, it SHALL be empty.
    
    Solution:  This adds a char pointer in the zap request struct that can
    point to the the username, client_key, or principal fields.
    
    With this change zframe_meta(frame, "User-Id") returns the public key
    for a connection.  This enables a use case where you have a long lived
    connection authenticated by a key or password and want to verify that the
    user/key still exists.
    
        zframe_t *frame = zframe_recv(server);
        const char *user_id = zframe_meta(frame, "User-Id");
        if(user_id!=NULL) {
            zcert_t *c = zcertstore_lookup(store, user_id);
            if(!c)
                //Certificate no longer exists in store!
        }
    JustinAzoff committed Jul 21, 2017
    Configuration menu
    Copy the full SHA
    3073539 View commit details
    Browse the repository at this point in the history
  2. problem: zauth tests do not check User-Id metadata

    Solution: update the PLAIN and CURVE tests to fetch and verify the
    User-Id metadata set by ZAP
    JustinAzoff committed Jul 21, 2017
    Configuration menu
    Copy the full SHA
    aac8400 View commit details
    Browse the repository at this point in the history
  3. problem: Older ZAP does not populate User-Id metadata

    solution: Only run this test on newer versions of zmq
    JustinAzoff committed Jul 21, 2017
    Configuration menu
    Copy the full SHA
    69ee323 View commit details
    Browse the repository at this point in the history