Commit 9c828e44 authored by jan.koester's avatar jan.koester
Browse files

test

parent ee11e728
Loading
Loading
Loading
Loading
+12 −0
Changes for tools/proxyplus-bootstrap.cpp: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -142,6 +142,18 @@ int main(int argc, char **argv) {
    std::cerr << "created service client '" << serviceClientName << "' (id=" << clientId << ")"
              << std::endl;

    // GPOadd/addGroup/listGroups/existsGPO are all gated server-side on a client-connection
    // session (see authdb/src/api.cpp's "if (curcon)" block), which is separate from the user
    // session UserAuth() established above. Without this, those calls silently no-op server-side
    // (curcon stays null, their handlers never run) and every one fails with a generic
    // "no id returned" -- there's no error to surface because nothing ran at all.
    con.setClientName(serviceClientName);
    con.setClientSecret(serviceClientSecret);
    if (!admin.ClientAuth()) {
        std::cerr << "ClientAuth failed for service client '" << serviceClientName << "'" << std::endl;
        return 1;
    }

    // Create the standard-role groups (idempotent: addGroup's id-match fast-path in
    // authdb's api.cpp returns success if a group with this id already exists).
    for (const auto &g : kGroups) {