| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- syntax = "proto3";
- package smartbotic.proto;
- option cc_enable_arenas = true;
- // Credential service for runners to fetch authentication headers
- service CredentialService {
- // Get HTTP authentication header for a credential
- rpc GetCredentialAuth(GetCredentialAuthRequest) returns (GetCredentialAuthResponse);
- // Get IMAP credentials for a credential
- rpc GetImapCredentials(GetImapCredentialsRequest) returns (GetImapCredentialsResponse);
- // List available credentials (metadata only)
- rpc ListCredentials(ListCredentialsRequest) returns (ListCredentialsResponse);
- }
- // Request to get credential auth header
- message GetCredentialAuthRequest {
- string credential_id = 1;
- string workflow_id = 2; // For access control verification
- }
- // Response with auth header
- message GetCredentialAuthResponse {
- bool success = 1;
- string header_name = 2; // e.g., "Authorization"
- string header_value = 3; // e.g., "Bearer token123"
- string error = 4; // Error message if success is false
- }
- // Credential info (metadata only, no secrets)
- message CredentialInfo {
- string id = 1;
- string name = 2;
- string type = 3; // "basic", "bearer", "api_key", "oauth2", "imap"
- string description = 4;
- }
- // Request to get IMAP credentials
- message GetImapCredentialsRequest {
- string credential_id = 1;
- string workflow_id = 2; // For access control verification
- }
- // Response with IMAP credentials
- message GetImapCredentialsResponse {
- bool success = 1;
- string host = 2;
- int32 port = 3;
- string username = 4;
- string password = 5;
- bool use_ssl = 6;
- string error = 7; // Error message if success is false
- }
- // Request to list credentials
- message ListCredentialsRequest {
- string workflow_id = 1; // Optional: filter by workflow access
- }
- // Response with credential list
- message ListCredentialsResponse {
- repeated CredentialInfo credentials = 1;
- }
|