Skip to content

Create gRPC service to be used by the CLI #855

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

Merged
merged 3 commits into from
May 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
697 changes: 251 additions & 446 deletions internal/proto/authd/authd.pb.go

Large diffs are not rendered by default.

71 changes: 26 additions & 45 deletions internal/proto/authd/authd.proto
Original file line number Diff line number Diff line change
Expand Up @@ -126,72 +126,53 @@ message ESRequest {
string session_id = 1;
}

service NSS {
rpc GetPasswdByName(GetPasswdByNameRequest) returns (PasswdEntry);
rpc GetPasswdByUID(GetByIDRequest) returns (PasswdEntry);
rpc GetPasswdEntries(Empty) returns (PasswdEntries);

rpc GetGroupByName(GetGroupByNameRequest) returns (GroupEntry);
rpc GetGroupByGID(GetByIDRequest) returns (GroupEntry);
rpc GetGroupEntries(Empty) returns (GroupEntries);

rpc GetShadowByName(GetShadowByNameRequest) returns (ShadowEntry);
rpc GetShadowEntries(Empty) returns (ShadowEntries);
service UserService {
rpc GetUserByName(GetUserByNameRequest) returns (User);
rpc GetUserByID(GetUserByIDRequest) returns (User);
rpc ListUsers(Empty) returns (Users);
rpc GetGroupByName(GetGroupByNameRequest) returns (Group);
rpc GetGroupByID(GetGroupByIDRequest) returns (Group);
rpc ListGroups(Empty) returns (Groups);
}

message GetPasswdByNameRequest{
message GetUserByNameRequest{
string name = 1;
bool shouldPreCheck = 2;
}

message GetGroupByNameRequest{
string name = 1;
}

message GetShadowByNameRequest{
string name = 1;
}

message GetByIDRequest{
message GetUserByIDRequest{
uint32 id = 1;
}

message PasswdEntry {
message GetGroupByNameRequest{
string name = 1;
string passwd = 2;
uint32 uid = 3;
uint32 gid = 4;
string gecos = 5;
string homedir = 6;
string shell = 7;
}

message PasswdEntries {
repeated PasswdEntry entries = 1;
message GetGroupByIDRequest{
uint32 id = 1;
}

message GroupEntry {
message User {
string name = 1;
string passwd = 2;
uint32 uid = 2;
uint32 gid = 3;
repeated string members = 4;
string gecos = 4;
string homedir = 5;
string shell = 6;
}

message GroupEntries {
repeated GroupEntry entries = 1;
message Users {
repeated User users = 1;
}

message ShadowEntry {
message Group {
string name = 1;
string passwd = 2;
int32 last_change = 3;
int32 change_min_days = 4;
int32 change_max_days = 5;
int32 change_warn_days = 6;
int32 change_inactive_days = 7;
int32 expire_date = 8;
uint32 gid = 2;
repeated string members = 3;
// TODO: Rename this to tmpID
string passwd = 4;
}

message ShadowEntries {
repeated ShadowEntry entries = 1;
message Groups {
repeated Group groups = 1;
}
Loading
Loading