This is the multi-page printable view of this section.
Click here to print.
Return to the regular view of this page.
Harbor login
Create a harbor session using OIDC
The plugin destroys its Harbor session on normal shutdown and checks that the
original session ID is rejected by the current-user API. Cleanup uses Harbor’s
/c/oidc/logout endpoint (available in newer Harbor releases) and does not follow
the optional identity-provider logout redirect. Unsupported endpoints, network
failures, or sessions that remain valid are reported as cleanup errors. Session
expiry remains server-controlled; forced termination cannot guarantee logout.
The session destruction behavior is defined by Harbor’s
OIDC controller.
Vault tokens created by the invocation are revoked after session cleanup.
1 - api
Proto docs for api.proto
Java
load("@rules_java//java:defs.bzl", "java_library")
java_library(
name = "name",
deps = [
"@com_alwaldend_src//tools/vault/harbor_login:api_java_library",
],
)
Golang
load("@rules_go//go:def.bzl", "go_library")
go_library(
name = "name",
deps = [
"@com_alwaldend_src//tools/vault/harbor_login:harbor_login",
],
)
Proto
syntax = "proto3";
package com.alwaldend.src.tools.vault.harbor_login.harbor_login_proto;
option go_package = "git.alwaldend.com/alwaldend/src/tools/vault/harbor_login/harbor_login_proto";
message Config {
string harbor_url = 1;
string vault_conn = 2;
string vault_auth = 3;
}