authd

package module
v0.0.0-...-d8cb2d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

README

Welcome to Authentication daemon for external Broker

Code quality License Code coverage User Documentation Reference documentation Go Report Card

This is the code repository for authd*, an authentication daemon for external Broker.

TODO: More general description about the project.

For general details, including [installation](TODO link to installation instruction) and [Getting started](TODO link to getting started instructions) guides, head over to our [PROJECT_TODO documentation](link to project documentation).

How to debug

TODO: Add details on how to debug this project, where to increase verbosity, how to find logs, how to run in debug mode.

Get involved

This is an open source project and we warmly welcome community contributions, suggestions, and constructive feedback. If you're interested in contributing, please take a look at our Contribution guidelines first.

  • to report an issue, please file a bug report against our repository, using a bug template.
  • for suggestions and constructive feedback, report a feature request bug report, using the proposed template.

Get in touch

We're friendly! We have a community forum at https://discourse.ubuntu.com where we discuss feature plans, development news, issues, updates and troubleshooting.

For news and updates, follow the Ubuntu twitter account and on Facebook.

Documentation

Overview

Package authd contains the autogenerated GRPC API between the modules and daemon.

Index

Constants

View Source
const (
	PAM_AvailableBrokers_FullMethodName         = "/PAM/AvailableBrokers"
	PAM_SelectBroker_FullMethodName             = "/PAM/SelectBroker"
	PAM_SelectAuthenticationMode_FullMethodName = "/PAM/SelectAuthenticationMode"
	PAM_IsAuthorized_FullMethodName             = "/PAM/IsAuthorized"
	PAM_SetDefaultBrokerForUser_FullMethodName  = "/PAM/SetDefaultBrokerForUser"
)
View Source
const (
	NSS_TestNSS_FullMethodName = "/NSS/TestNSS"
)

Variables

View Source
var File_authd_proto protoreflect.FileDescriptor
View Source
var NSS_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "NSS",
	HandlerType: (*NSSServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "TestNSS",
			Handler:    _NSS_TestNSS_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "authd.proto",
}

NSS_ServiceDesc is the grpc.ServiceDesc for NSS service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var PAM_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "PAM",
	HandlerType: (*PAMServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AvailableBrokers",
			Handler:    _PAM_AvailableBrokers_Handler,
		},
		{
			MethodName: "SelectBroker",
			Handler:    _PAM_SelectBroker_Handler,
		},
		{
			MethodName: "SelectAuthenticationMode",
			Handler:    _PAM_SelectAuthenticationMode_Handler,
		},
		{
			MethodName: "IsAuthorized",
			Handler:    _PAM_IsAuthorized_Handler,
		},
		{
			MethodName: "SetDefaultBrokerForUser",
			Handler:    _PAM_SetDefaultBrokerForUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "authd.proto",
}

PAM_ServiceDesc is the grpc.ServiceDesc for PAM service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterNSSServer

func RegisterNSSServer(s grpc.ServiceRegistrar, srv NSSServer)

func RegisterPAMServer

func RegisterPAMServer(s grpc.ServiceRegistrar, srv PAMServer)

Types

type ABRequest

type ABRequest struct {
	UserName *string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3,oneof" json:"user_name,omitempty"`
	// contains filtered or unexported fields
}

func (*ABRequest) Descriptor deprecated

func (*ABRequest) Descriptor() ([]byte, []int)

Deprecated: Use ABRequest.ProtoReflect.Descriptor instead.

func (*ABRequest) GetUserName

func (x *ABRequest) GetUserName() string

func (*ABRequest) ProtoMessage

func (*ABRequest) ProtoMessage()

func (*ABRequest) ProtoReflect

func (x *ABRequest) ProtoReflect() protoreflect.Message

func (*ABRequest) Reset

func (x *ABRequest) Reset()

func (*ABRequest) String

func (x *ABRequest) String() string

type ABResponse

type ABResponse struct {
	BrokersInfos   []*ABResponse_BrokerInfo `protobuf:"bytes,1,rep,name=brokers_infos,json=brokersInfos,proto3" json:"brokers_infos,omitempty"`
	PreviousBroker *string                  `protobuf:"bytes,2,opt,name=previous_broker,json=previousBroker,proto3,oneof" json:"previous_broker,omitempty"`
	// contains filtered or unexported fields
}

func (*ABResponse) Descriptor deprecated

func (*ABResponse) Descriptor() ([]byte, []int)

Deprecated: Use ABResponse.ProtoReflect.Descriptor instead.

func (*ABResponse) GetBrokersInfos

func (x *ABResponse) GetBrokersInfos() []*ABResponse_BrokerInfo

func (*ABResponse) GetPreviousBroker

func (x *ABResponse) GetPreviousBroker() string

func (*ABResponse) ProtoMessage

func (*ABResponse) ProtoMessage()

func (*ABResponse) ProtoReflect

func (x *ABResponse) ProtoReflect() protoreflect.Message

func (*ABResponse) Reset

func (x *ABResponse) Reset()

func (*ABResponse) String

func (x *ABResponse) String() string

type ABResponse_BrokerInfo

type ABResponse_BrokerInfo struct {
	Id        string  `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name      string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	BrandIcon *string `protobuf:"bytes,3,opt,name=brand_icon,json=brandIcon,proto3,oneof" json:"brand_icon,omitempty"`
	// contains filtered or unexported fields
}

func (*ABResponse_BrokerInfo) Descriptor deprecated

func (*ABResponse_BrokerInfo) Descriptor() ([]byte, []int)

Deprecated: Use ABResponse_BrokerInfo.ProtoReflect.Descriptor instead.

func (*ABResponse_BrokerInfo) GetBrandIcon

func (x *ABResponse_BrokerInfo) GetBrandIcon() string

func (*ABResponse_BrokerInfo) GetId

func (x *ABResponse_BrokerInfo) GetId() string

func (*ABResponse_BrokerInfo) GetName

func (x *ABResponse_BrokerInfo) GetName() string

func (*ABResponse_BrokerInfo) ProtoMessage

func (*ABResponse_BrokerInfo) ProtoMessage()

func (*ABResponse_BrokerInfo) ProtoReflect

func (x *ABResponse_BrokerInfo) ProtoReflect() protoreflect.Message

func (*ABResponse_BrokerInfo) Reset

func (x *ABResponse_BrokerInfo) Reset()

func (*ABResponse_BrokerInfo) String

func (x *ABResponse_BrokerInfo) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type IARequest

type IARequest struct {
	SessionId          string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	AuthenticationData string `protobuf:"bytes,2,opt,name=authentication_data,json=authenticationData,proto3" json:"authentication_data,omitempty"`
	// contains filtered or unexported fields
}

func (*IARequest) Descriptor deprecated

func (*IARequest) Descriptor() ([]byte, []int)

Deprecated: Use IARequest.ProtoReflect.Descriptor instead.

func (*IARequest) GetAuthenticationData

func (x *IARequest) GetAuthenticationData() string

func (*IARequest) GetSessionId

func (x *IARequest) GetSessionId() string

func (*IARequest) ProtoMessage

func (*IARequest) ProtoMessage()

func (*IARequest) ProtoReflect

func (x *IARequest) ProtoReflect() protoreflect.Message

func (*IARequest) Reset

func (x *IARequest) Reset()

func (*IARequest) String

func (x *IARequest) String() string

type IAResponse

type IAResponse struct {
	Access   string `protobuf:"bytes,1,opt,name=access,proto3" json:"access,omitempty"`
	UserInfo string `protobuf:"bytes,2,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"`
	// contains filtered or unexported fields
}

func (*IAResponse) Descriptor deprecated

func (*IAResponse) Descriptor() ([]byte, []int)

Deprecated: Use IAResponse.ProtoReflect.Descriptor instead.

func (*IAResponse) GetAccess

func (x *IAResponse) GetAccess() string

func (*IAResponse) GetUserInfo

func (x *IAResponse) GetUserInfo() string

func (*IAResponse) ProtoMessage

func (*IAResponse) ProtoMessage()

func (*IAResponse) ProtoReflect

func (x *IAResponse) ProtoReflect() protoreflect.Message

func (*IAResponse) Reset

func (x *IAResponse) Reset()

func (*IAResponse) String

func (x *IAResponse) String() string

type NSSClient

type NSSClient interface {
	TestNSS(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*StringResponse, error)
}

NSSClient is the client API for NSS service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewNSSClient

func NewNSSClient(cc grpc.ClientConnInterface) NSSClient

type NSSServer

type NSSServer interface {
	TestNSS(context.Context, *Empty) (*StringResponse, error)
	// contains filtered or unexported methods
}

NSSServer is the server API for NSS service. All implementations must embed UnimplementedNSSServer for forward compatibility

type PAMClient

type PAMClient interface {
	AvailableBrokers(ctx context.Context, in *ABRequest, opts ...grpc.CallOption) (*ABResponse, error)
	SelectBroker(ctx context.Context, in *SBRequest, opts ...grpc.CallOption) (*SBResponse, error)
	SelectAuthenticationMode(ctx context.Context, in *SAMRequest, opts ...grpc.CallOption) (*SAMResponse, error)
	IsAuthorized(ctx context.Context, in *IARequest, opts ...grpc.CallOption) (*IAResponse, error)
	SetDefaultBrokerForUser(ctx context.Context, in *SDBFURequest, opts ...grpc.CallOption) (*Empty, error)
}

PAMClient is the client API for PAM service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewPAMClient

func NewPAMClient(cc grpc.ClientConnInterface) PAMClient

type PAMServer

type PAMServer interface {
	AvailableBrokers(context.Context, *ABRequest) (*ABResponse, error)
	SelectBroker(context.Context, *SBRequest) (*SBResponse, error)
	SelectAuthenticationMode(context.Context, *SAMRequest) (*SAMResponse, error)
	IsAuthorized(context.Context, *IARequest) (*IAResponse, error)
	SetDefaultBrokerForUser(context.Context, *SDBFURequest) (*Empty, error)
	// contains filtered or unexported methods
}

PAMServer is the server API for PAM service. All implementations must embed UnimplementedPAMServer for forward compatibility

type SAMRequest

type SAMRequest struct {
	SessionId              string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	AuthenticationModeName string `` /* 129-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*SAMRequest) Descriptor deprecated

func (*SAMRequest) Descriptor() ([]byte, []int)

Deprecated: Use SAMRequest.ProtoReflect.Descriptor instead.

func (*SAMRequest) GetAuthenticationModeName

func (x *SAMRequest) GetAuthenticationModeName() string

func (*SAMRequest) GetSessionId

func (x *SAMRequest) GetSessionId() string

func (*SAMRequest) ProtoMessage

func (*SAMRequest) ProtoMessage()

func (*SAMRequest) ProtoReflect

func (x *SAMRequest) ProtoReflect() protoreflect.Message

func (*SAMRequest) Reset

func (x *SAMRequest) Reset()

func (*SAMRequest) String

func (x *SAMRequest) String() string

type SAMResponse

type SAMResponse struct {
	UiLayoutInfo *UILayout `protobuf:"bytes,1,opt,name=ui_layout_info,json=uiLayoutInfo,proto3" json:"ui_layout_info,omitempty"`
	// contains filtered or unexported fields
}

func (*SAMResponse) Descriptor deprecated

func (*SAMResponse) Descriptor() ([]byte, []int)

Deprecated: Use SAMResponse.ProtoReflect.Descriptor instead.

func (*SAMResponse) GetUiLayoutInfo

func (x *SAMResponse) GetUiLayoutInfo() *UILayout

func (*SAMResponse) ProtoMessage

func (*SAMResponse) ProtoMessage()

func (*SAMResponse) ProtoReflect

func (x *SAMResponse) ProtoReflect() protoreflect.Message

func (*SAMResponse) Reset

func (x *SAMResponse) Reset()

func (*SAMResponse) String

func (x *SAMResponse) String() string

type SBRequest

type SBRequest struct {
	BrokerId           string      `protobuf:"bytes,1,opt,name=broker_id,json=brokerId,proto3" json:"broker_id,omitempty"`
	Username           string      `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Lang               string      `protobuf:"bytes,3,opt,name=lang,proto3" json:"lang,omitempty"`
	SupportedUiLayouts []*UILayout `protobuf:"bytes,4,rep,name=supported_ui_layouts,json=supportedUiLayouts,proto3" json:"supported_ui_layouts,omitempty"`
	// contains filtered or unexported fields
}

func (*SBRequest) Descriptor deprecated

func (*SBRequest) Descriptor() ([]byte, []int)

Deprecated: Use SBRequest.ProtoReflect.Descriptor instead.

func (*SBRequest) GetBrokerId

func (x *SBRequest) GetBrokerId() string

func (*SBRequest) GetLang

func (x *SBRequest) GetLang() string

func (*SBRequest) GetSupportedUiLayouts

func (x *SBRequest) GetSupportedUiLayouts() []*UILayout

func (*SBRequest) GetUsername

func (x *SBRequest) GetUsername() string

func (*SBRequest) ProtoMessage

func (*SBRequest) ProtoMessage()

func (*SBRequest) ProtoReflect

func (x *SBRequest) ProtoReflect() protoreflect.Message

func (*SBRequest) Reset

func (x *SBRequest) Reset()

func (*SBRequest) String

func (x *SBRequest) String() string

type SBResponse

type SBResponse struct {
	SessionId           string                           `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	EncryptionKey       string                           `protobuf:"bytes,2,opt,name=encryption_key,json=encryptionKey,proto3" json:"encryption_key,omitempty"`
	AuthenticationModes []*SBResponse_AuthenticationMode `protobuf:"bytes,3,rep,name=authentication_modes,json=authenticationModes,proto3" json:"authentication_modes,omitempty"`
	// contains filtered or unexported fields
}

func (*SBResponse) Descriptor deprecated

func (*SBResponse) Descriptor() ([]byte, []int)

Deprecated: Use SBResponse.ProtoReflect.Descriptor instead.

func (*SBResponse) GetAuthenticationModes

func (x *SBResponse) GetAuthenticationModes() []*SBResponse_AuthenticationMode

func (*SBResponse) GetEncryptionKey

func (x *SBResponse) GetEncryptionKey() string

func (*SBResponse) GetSessionId

func (x *SBResponse) GetSessionId() string

func (*SBResponse) ProtoMessage

func (*SBResponse) ProtoMessage()

func (*SBResponse) ProtoReflect

func (x *SBResponse) ProtoReflect() protoreflect.Message

func (*SBResponse) Reset

func (x *SBResponse) Reset()

func (*SBResponse) String

func (x *SBResponse) String() string

type SBResponse_AuthenticationMode

type SBResponse_AuthenticationMode struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
	// contains filtered or unexported fields
}

func (*SBResponse_AuthenticationMode) Descriptor deprecated

func (*SBResponse_AuthenticationMode) Descriptor() ([]byte, []int)

Deprecated: Use SBResponse_AuthenticationMode.ProtoReflect.Descriptor instead.

func (*SBResponse_AuthenticationMode) GetLabel

func (x *SBResponse_AuthenticationMode) GetLabel() string

func (*SBResponse_AuthenticationMode) GetName

func (*SBResponse_AuthenticationMode) ProtoMessage

func (*SBResponse_AuthenticationMode) ProtoMessage()

func (*SBResponse_AuthenticationMode) ProtoReflect

func (*SBResponse_AuthenticationMode) Reset

func (x *SBResponse_AuthenticationMode) Reset()

func (*SBResponse_AuthenticationMode) String

type SDBFURequest

type SDBFURequest struct {
	SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	Username  string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*SDBFURequest) Descriptor deprecated

func (*SDBFURequest) Descriptor() ([]byte, []int)

Deprecated: Use SDBFURequest.ProtoReflect.Descriptor instead.

func (*SDBFURequest) GetSessionId

func (x *SDBFURequest) GetSessionId() string

func (*SDBFURequest) GetUsername

func (x *SDBFURequest) GetUsername() string

func (*SDBFURequest) ProtoMessage

func (*SDBFURequest) ProtoMessage()

func (*SDBFURequest) ProtoReflect

func (x *SDBFURequest) ProtoReflect() protoreflect.Message

func (*SDBFURequest) Reset

func (x *SDBFURequest) Reset()

func (*SDBFURequest) String

func (x *SDBFURequest) String() string

type StringResponse

type StringResponse struct {
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*StringResponse) Descriptor deprecated

func (*StringResponse) Descriptor() ([]byte, []int)

Deprecated: Use StringResponse.ProtoReflect.Descriptor instead.

func (*StringResponse) GetMsg

func (x *StringResponse) GetMsg() string

func (*StringResponse) ProtoMessage

func (*StringResponse) ProtoMessage()

func (*StringResponse) ProtoReflect

func (x *StringResponse) ProtoReflect() protoreflect.Message

func (*StringResponse) Reset

func (x *StringResponse) Reset()

func (*StringResponse) String

func (x *StringResponse) String() string

type UILayout

type UILayout struct {
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// common components.
	Label  *string `protobuf:"bytes,2,opt,name=label,proto3,oneof" json:"label,omitempty"`
	Button *string `protobuf:"bytes,3,opt,name=button,proto3,oneof" json:"button,omitempty"`
	Wait   *string `protobuf:"bytes,4,opt,name=wait,proto3,oneof" json:"wait,omitempty"`
	// form only.
	Entry *string `protobuf:"bytes,5,opt,name=entry,proto3,oneof" json:"entry,omitempty"`
	// qr code only.
	Content *string `protobuf:"bytes,6,opt,name=content,proto3,oneof" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*UILayout) Descriptor deprecated

func (*UILayout) Descriptor() ([]byte, []int)

Deprecated: Use UILayout.ProtoReflect.Descriptor instead.

func (*UILayout) GetButton

func (x *UILayout) GetButton() string

func (*UILayout) GetContent

func (x *UILayout) GetContent() string

func (*UILayout) GetEntry

func (x *UILayout) GetEntry() string

func (*UILayout) GetLabel

func (x *UILayout) GetLabel() string

func (*UILayout) GetType

func (x *UILayout) GetType() string

func (*UILayout) GetWait

func (x *UILayout) GetWait() string

func (*UILayout) ProtoMessage

func (*UILayout) ProtoMessage()

func (*UILayout) ProtoReflect

func (x *UILayout) ProtoReflect() protoreflect.Message

func (*UILayout) Reset

func (x *UILayout) Reset()

func (*UILayout) String

func (x *UILayout) String() string

type UnimplementedNSSServer

type UnimplementedNSSServer struct {
}

UnimplementedNSSServer must be embedded to have forward compatible implementations.

func (UnimplementedNSSServer) TestNSS

type UnimplementedPAMServer

type UnimplementedPAMServer struct {
}

UnimplementedPAMServer must be embedded to have forward compatible implementations.

func (UnimplementedPAMServer) AvailableBrokers

func (UnimplementedPAMServer) IsAuthorized

func (UnimplementedPAMServer) SelectAuthenticationMode

func (UnimplementedPAMServer) SelectAuthenticationMode(context.Context, *SAMRequest) (*SAMResponse, error)

func (UnimplementedPAMServer) SelectBroker

func (UnimplementedPAMServer) SetDefaultBrokerForUser

func (UnimplementedPAMServer) SetDefaultBrokerForUser(context.Context, *SDBFURequest) (*Empty, error)

type UnsafeNSSServer

type UnsafeNSSServer interface {
	// contains filtered or unexported methods
}

UnsafeNSSServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NSSServer will result in compilation errors.

type UnsafePAMServer

type UnsafePAMServer interface {
	// contains filtered or unexported methods
}

UnsafePAMServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PAMServer will result in compilation errors.

Directories

Path Synopsis
cmd
authd
Package main is the windows-agent entry point.
Package main is the windows-agent entry point.
authd/daemon
Package daemon represents the connection between the broker and pam/nss.
Package daemon represents the connection between the broker and pam/nss.
internal
consts
Package consts defines the constants used by the project
Package consts defines the constants used by the project
daemon
Package daemon handles the GRPC daemon with systemd support.
Package daemon handles the GRPC daemon with systemd support.
log
Package log is a temporary package until we forge our log structure.
Package log is a temporary package until we forge our log structure.
manager
Package manager mediates all the business logic of the application.
Package manager mediates all the business logic of the application.
services/nss
Package nss implements the nss grpc service protocol to the daemon.
Package nss implements the nss grpc service protocol to the daemon.
services/pam
Package pam implements the pam grpc service protocol to the daemon.
Package pam implements the pam grpc service protocol to the daemon.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL