syntax = "proto3";

option go_package = "storage";
option java_package = "io.stackrox.proto.storage";

package storage;

// Group is a GroupProperties : Role mapping.
message Group {
    // GroupProperties uniquely identifies a group.
    GroupProperties props = 1;

    // This is the name of the role that will apply to users in this group.
    string role_name = 3;
}

// GroupProperties defines the properties of a unique group.
// Groups apply to users when their properties match. For instance:
// If the GroupProperties on has a auth_provider_id, then that group applies to all users logged in
// with that auth provider. If it has a claim key, then it applies to all users with that auth provider
// and claim key, etc.
// This can be used to create default groups/roles for All source provider (no fields set), a specific
// auth provider (only auth_provider_id field set) etc.
message GroupProperties {
    string auth_provider_id = 1;
    string key = 2;
    string value = 3;
}
