Commit e5916e15 authored by Michelle Nguyen's avatar Michelle Nguyen
Browse files

Add APIKey option to GetAugmentedToken rpc

Summary:
Here is the current plan:
- Update GetAugmentedToken to take an additional API key field. Now, users can either specify a token (normal workflow) or API key (new workflow) to get the augmented token. The change to the proto is in this diff.
- In followup diff(s): Update GetAugmentedToken to use the APIKey, match it to a user, and create an augmented token for that user.

Alternatives:
- We can add a separate GetAugmentedTokenfromAPIKey rpc call if we want to separate these two flows more

Test Plan: n/a

Reviewers: zasgar, #engineering

Reviewed By: zasgar, #engineering

Differential Revision: https://phab.corp.pixielabs.ai/D6957

GitOrigin-RevId: b3bb00872339bacc81dcd2bab5a3d417627c7350
parent 713befdb
Showing with 819 additions and 138 deletions
+819 -138
......@@ -2,6 +2,7 @@ package controllers
import (
"context"
"errors"
"time"
uuid "github.com/satori/go.uuid"
......@@ -285,6 +286,11 @@ func (s *Server) createUserAndOptionallyOrg(ctx context.Context, domainName stri
return userInfo, orgID, err
}
// GetAugmentedTokenForAPIKey produces an augmented token for the user given a API key.
func (s *Server) GetAugmentedTokenForAPIKey(ctx context.Context, in *pb.GetAugmentedTokenForAPIKeyRequest) (*pb.GetAugmentedTokenForAPIKeyResponse, error) {
return nil, errors.New("Not yet implemented")
}
// GetAugmentedToken produces augmented tokens for the user based on passed in credentials.
func (s *Server) GetAugmentedToken(
ctx context.Context, in *pb.GetAugmentedAuthTokenRequest) (
......
This diff is collapsed.
......@@ -30,6 +30,9 @@ service AuthService {
// Takes an opaque identifier (from above) and produces a token with user details.
rpc GetAugmentedToken(GetAugmentedAuthTokenRequest) returns (GetAugmentedAuthTokenResponse) {}
// Takes an API key and produces a token with user details.
rpc GetAugmentedTokenForAPIKey(GetAugmentedTokenForAPIKeyRequest) returns (GetAugmentedTokenForAPIKeyResponse) {}
}
message LoginRequest {
......@@ -116,6 +119,23 @@ message GetAugmentedAuthTokenResponse {
int64 expires_at = 2;
}
message GetAugmentedTokenForAPIKeyRequest {
// An API Key that can be linked to a particular user/org.
string api_key = 1 [
(gogoproto.customname) = "APIKey"
];
}
message GetAugmentedTokenForAPIKeyResponse {
// The signed token augmented with user information. This can contain additional information about
// the user such as permissions, etc. This allows us to keep the initial token small.
// This token will have a short lifetime of ~30 mins.
string token = 1;
// When this login expires.
int64 expires_at = 2;
}
//////////////////////////////////////////////////////////////
// API Key Service
//////////////////////////////////////////////////////////////
......
......@@ -91,6 +91,24 @@ func (mr *MockAuthServiceClientMockRecorder) GetAugmentedToken(ctx, in interface
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAugmentedToken", reflect.TypeOf((*MockAuthServiceClient)(nil).GetAugmentedToken), varargs...)
}
// GetAugmentedTokenForAPIKey mocks base method
func (m *MockAuthServiceClient) GetAugmentedTokenForAPIKey(ctx context.Context, in *proto.GetAugmentedTokenForAPIKeyRequest, opts ...grpc.CallOption) (*proto.GetAugmentedTokenForAPIKeyResponse, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetAugmentedTokenForAPIKey", varargs...)
ret0, _ := ret[0].(*proto.GetAugmentedTokenForAPIKeyResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetAugmentedTokenForAPIKey indicates an expected call of GetAugmentedTokenForAPIKey
func (mr *MockAuthServiceClientMockRecorder) GetAugmentedTokenForAPIKey(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAugmentedTokenForAPIKey", reflect.TypeOf((*MockAuthServiceClient)(nil).GetAugmentedTokenForAPIKey), varargs...)
}
// MockAuthServiceServer is a mock of AuthServiceServer interface
type MockAuthServiceServer struct {
ctrl *gomock.Controller
......@@ -153,6 +171,19 @@ func (mr *MockAuthServiceServerMockRecorder) GetAugmentedToken(arg0, arg1 interf
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAugmentedToken", reflect.TypeOf((*MockAuthServiceServer)(nil).GetAugmentedToken), arg0, arg1)
}
// GetAugmentedTokenForAPIKey mocks base method
func (m *MockAuthServiceServer) GetAugmentedTokenForAPIKey(arg0 context.Context, arg1 *proto.GetAugmentedTokenForAPIKeyRequest) (*proto.GetAugmentedTokenForAPIKeyResponse, error) {
ret := m.ctrl.Call(m, "GetAugmentedTokenForAPIKey", arg0, arg1)
ret0, _ := ret[0].(*proto.GetAugmentedTokenForAPIKeyResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetAugmentedTokenForAPIKey indicates an expected call of GetAugmentedTokenForAPIKey
func (mr *MockAuthServiceServerMockRecorder) GetAugmentedTokenForAPIKey(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAugmentedTokenForAPIKey", reflect.TypeOf((*MockAuthServiceServer)(nil).GetAugmentedTokenForAPIKey), arg0, arg1)
}
// MockAPIKeyServiceClient is a mock of APIKeyServiceClient interface
type MockAPIKeyServiceClient struct {
ctrl *gomock.Controller
......
......@@ -394,6 +394,7 @@ type DeploymentSpec struct {
// *DeploymentSpec_Path
// *DeploymentSpec_Upid
// *DeploymentSpec_SharedObject_
// *DeploymentSpec_Pod
// *DeploymentSpec_PodProcess_
TargetOneof isDeploymentSpec_TargetOneof `protobuf_oneof:"target_oneof"`
}
......@@ -446,6 +447,9 @@ type DeploymentSpec_Upid struct {
type DeploymentSpec_SharedObject_ struct {
SharedObject *DeploymentSpec_SharedObject `protobuf:"bytes,8,opt,name=shared_object,json=sharedObject,proto3,oneof" json:"shared_object,omitempty"`
}
type DeploymentSpec_Pod struct {
Pod string `protobuf:"bytes,9,opt,name=pod,proto3,oneof" json:"pod,omitempty"`
}
type DeploymentSpec_PodProcess_ struct {
PodProcess *DeploymentSpec_PodProcess `protobuf:"bytes,10,opt,name=pod_process,json=podProcess,proto3,oneof" json:"pod_process,omitempty"`
}
......@@ -453,6 +457,7 @@ type DeploymentSpec_PodProcess_ struct {
func (*DeploymentSpec_Path) isDeploymentSpec_TargetOneof() {}
func (*DeploymentSpec_Upid) isDeploymentSpec_TargetOneof() {}
func (*DeploymentSpec_SharedObject_) isDeploymentSpec_TargetOneof() {}
func (*DeploymentSpec_Pod) isDeploymentSpec_TargetOneof() {}
func (*DeploymentSpec_PodProcess_) isDeploymentSpec_TargetOneof() {}
func (m *DeploymentSpec) GetTargetOneof() isDeploymentSpec_TargetOneof {
......@@ -483,6 +488,13 @@ func (m *DeploymentSpec) GetSharedObject() *DeploymentSpec_SharedObject {
return nil
}
func (m *DeploymentSpec) GetPod() string {
if x, ok := m.GetTargetOneof().(*DeploymentSpec_Pod); ok {
return x.Pod
}
return ""
}
func (m *DeploymentSpec) GetPodProcess() *DeploymentSpec_PodProcess {
if x, ok := m.GetTargetOneof().(*DeploymentSpec_PodProcess_); ok {
return x.PodProcess
......@@ -496,6 +508,7 @@ func (*DeploymentSpec) XXX_OneofWrappers() []interface{} {
(*DeploymentSpec_Path)(nil),
(*DeploymentSpec_Upid)(nil),
(*DeploymentSpec_SharedObject_)(nil),
(*DeploymentSpec_Pod)(nil),
(*DeploymentSpec_PodProcess_)(nil),
}
}
......@@ -957,76 +970,77 @@ func init() {
}
var fileDescriptor_b26f0b8c46516e82 = []byte{
// 1098 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6f, 0x1b, 0x45,
0x14, 0xdf, 0x2f, 0x7f, 0x3d, 0x3b, 0xce, 0x30, 0x45, 0xc8, 0x8a, 0xd0, 0x92, 0x5a, 0x42, 0x8a,
0x82, 0xe4, 0xa8, 0x49, 0x89, 0x2a, 0x2e, 0xc1, 0x5f, 0xb1, 0x97, 0x38, 0xbb, 0x66, 0xbc, 0x0e,
0x0a, 0x97, 0xd5, 0x7a, 0x3d, 0x4d, 0x97, 0x38, 0xbb, 0xab, 0xdd, 0x75, 0x55, 0x5f, 0x10, 0x07,
0xc4, 0x89,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0xdd, 0x2a,
0x13, 0x52, 0x3e, 0x46, 0xff, 0xa4, 0x30, 0x82, 0x6c, 0xc7, 0x24, 0xdd, 0xaa, 0x69, 0x55, 0x5a,
0x46, 0x05, 0x3d, 0x4c, 0x57, 0x86, 0xe7, 0x17, 0xaa, 0xf0, 0xe8, 0x42, 0x15, 0x9e, 0x5c, 0xa8,
0xe2, 0x27, 0x63, 0x55, 0xfc, 0x72, 0xac, 0x8a, 0x0f, 0xc6, 0xaa, 0x78, 0x3e, 0x56, 0xc5, 0xbf,
0xc7, 0xaa, 0xf8, 0x78, 0xac, 0x0a, 0x4f, 0xc6, 0xaa, 0x78, 0xff, 0x52, 0x15, 0xce, 0x2f, 0x55,
0xe1, 0xd1, 0xa5, 0x2a, 0x7c, 0xb8, 0x17, 0xb8, 0xf7, 0x5c, 0x3a, 0xb0, 0x7b, 0x51, 0xc9, 0x76,
0xb7, 0xe6, 0x64, 0x6b, 0xd9, 0x7f, 0x8a, 0x5e, 0x92, 0xff, 0x4d, 0xec, 0xfc, 0x1f, 0x00, 0x00,
0xff, 0xff, 0x54, 0x30, 0xfc, 0x76, 0x86, 0x08, 0x00, 0x00,
// 1112 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6f, 0x1b, 0xc5,
0x1b, 0xde, 0x2f, 0x7f, 0xec, 0x6b, 0xc7, 0x99, 0xdf, 0xf4, 0x27, 0x64, 0x55, 0x68, 0x49, 0x2d,
0x21, 0x45, 0x41, 0x72, 0xd4, 0xa4, 0x44, 0x15, 0x97, 0xe2, 0xaf, 0xda, 0x4b, 0x9c, 0x5d, 0x33,
0x5e, 0x07, 0x85, 0xcb, 0x6a, 0xbd, 0x9e, 0xa6, 0x4b, 0x9c, 0xdd, 0xd5, 0xee, 0xba, 0xaa, 0x2f,
0x88, 0x03, 0x47, 0x0e, 0xe5, 0xca, 0x5f, 0xc0, 0x81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0x49, 0x06, 0xaf, 0x03, 0x54, 0x8f, 0xac, 0x86, 0x5d, 0x21, 0xa4, 0x72,
0x84, 0xfe, 0xc8, 0x60, 0x04, 0xb9, 0xae, 0x45, 0x7a, 0x35, 0xcb, 0xae, 0xb6, 0xcd, 0x2a, 0x7a,
0x94, 0xad, 0x8e, 0xce, 0xce, 0x35, 0xe1, 0xf1, 0xb9, 0x26, 0x3c, 0x3d, 0xd7, 0xc4, 0x0f, 0x26,
0x9a, 0xf8, 0xe9, 0x44, 0x13, 0x1f, 0x4e, 0x34, 0xf1, 0x6c, 0xa2, 0x89, 0xbf, 0x4f, 0x34, 0xf1,
0xc9, 0x44, 0x13, 0x9e, 0x4e, 0x34, 0xf1, 0xc1, 0x85, 0x26, 0x9c, 0x5d, 0x68, 0xc2, 0xe3, 0x0b,
0x4d, 0x78, 0xf7, 0x56, 0xe8, 0xdd, 0xf7, 0xe8, 0xd0, 0xe9, 0xc7, 0x65, 0xc7, 0xdb, 0x5e, 0x90,
0xed, 0x55, 0xff, 0x33, 0xfa, 0x69, 0xfe, 0x87, 0xb1, 0xfb, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff,
0xdf, 0xbe, 0x1d, 0x13, 0x9a, 0x08, 0x00, 0x00,
}
func (x Language) String() string {
......@@ -1258,6 +1272,30 @@ func (this *DeploymentSpec_SharedObject_) Equal(that interface{}) bool {
}
return true
}
func (this *DeploymentSpec_Pod) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*DeploymentSpec_Pod)
if !ok {
that2, ok := that.(DeploymentSpec_Pod)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Pod != that1.Pod {
return false
}
return true
}
func (this *DeploymentSpec_PodProcess_) Equal(that interface{}) bool {
if that == nil {
return this == nil
......@@ -1622,7 +1660,7 @@ func (this *DeploymentSpec) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 8)
s := make([]string, 0, 9)
s = append(s, "&sharedpb.DeploymentSpec{")
if this.TargetOneof != nil {
s = append(s, "TargetOneof: "+fmt.Sprintf("%#v", this.TargetOneof)+",\n")
......@@ -1654,6 +1692,14 @@ func (this *DeploymentSpec_SharedObject_) GoString() string {
`SharedObject:` + fmt.Sprintf("%#v", this.SharedObject) + `}`}, ", ")
return s
}
func (this *DeploymentSpec_Pod) GoString() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&sharedpb.DeploymentSpec_Pod{` +
`Pod:` + fmt.Sprintf("%#v", this.Pod) + `}`}, ", ")
return s
}
func (this *DeploymentSpec_PodProcess_) GoString() string {
if this == nil {
return "nil"
......@@ -2000,6 +2046,20 @@ func (m *DeploymentSpec_SharedObject_) MarshalToSizedBuffer(dAtA []byte) (int, e
}
return len(dAtA) - i, nil
}
func (m *DeploymentSpec_Pod) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *DeploymentSpec_Pod) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
i -= len(m.Pod)
copy(dAtA[i:], m.Pod)
i = encodeVarintShared(dAtA, i, uint64(len(m.Pod)))
i--
dAtA[i] = 0x4a
return len(dAtA) - i, nil
}
func (m *DeploymentSpec_PodProcess_) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
......@@ -2460,6 +2520,16 @@ func (m *DeploymentSpec_SharedObject_) Size() (n int) {
}
return n
}
func (m *DeploymentSpec_Pod) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Pod)
n += 1 + l + sovShared(uint64(l))
return n
}
func (m *DeploymentSpec_PodProcess_) Size() (n int) {
if m == nil {
return 0
......@@ -2706,6 +2776,16 @@ func (this *DeploymentSpec_SharedObject_) String() string {
}, "")
return s
}
func (this *DeploymentSpec_Pod) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&DeploymentSpec_Pod{`,
`Pod:` + fmt.Sprintf("%v", this.Pod) + `,`,
`}`,
}, "")
return s
}
func (this *DeploymentSpec_PodProcess_) String() string {
if this == nil {
return "nil"
......@@ -3338,6 +3418,38 @@ func (m *DeploymentSpec) Unmarshal(dAtA []byte) error {
}
m.TargetOneof = &DeploymentSpec_SharedObject_{v}
iNdEx = postIndex
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Pod", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowShared
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthShared
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthShared
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.TargetOneof = &DeploymentSpec_Pod{string(dAtA[iNdEx:postIndex])}
iNdEx = postIndex
case 10:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PodProcess", wireType)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment