Documentation
¶
Index ¶
- Variables
- func DefaultDeleteCore(ctx context.Context, in *Core, db *gorm.DB) error
- func DefaultDeleteCoreSet(ctx context.Context, in []*Core, db *gorm.DB) error
- func DefaultDeleteLogin(ctx context.Context, in *Login, db *gorm.DB) error
- func DefaultDeleteLoginSet(ctx context.Context, in []*Login, db *gorm.DB) error
- func DefaultDeletePrivate(ctx context.Context, in *Private, db *gorm.DB) error
- func DefaultDeletePrivateSet(ctx context.Context, in []*Private, db *gorm.DB) error
- func DefaultDeletePublic(ctx context.Context, in *Public, db *gorm.DB) error
- func DefaultDeletePublicSet(ctx context.Context, in []*Public, db *gorm.DB) error
- func DefaultDeleteRealm(ctx context.Context, in *Realm, db *gorm.DB) error
- func DefaultDeleteRealmSet(ctx context.Context, in []*Realm, db *gorm.DB) error
- type Core
- func DefaultApplyFieldMaskCore(ctx context.Context, patchee *Core, patcher *Core, ...) (*Core, error)
- func DefaultCreateCore(ctx context.Context, in *Core, db *gorm.DB) (*Core, error)
- func DefaultListCore(ctx context.Context, db *gorm.DB) ([]*Core, error)
- func DefaultPatchCore(ctx context.Context, in *Core, updateMask *field_mask.FieldMask, db *gorm.DB) (*Core, error)
- func DefaultPatchSetCore(ctx context.Context, objects []*Core, updateMasks []*field_mask.FieldMask, ...) ([]*Core, error)
- func DefaultReadCore(ctx context.Context, in *Core, db *gorm.DB) (*Core, error)
- func DefaultStrictUpdateCore(ctx context.Context, in *Core, db *gorm.DB) (*Core, error)
- func (*Core) Descriptor() ([]byte, []int)deprecated
- func (x *Core) GetCreatedAt() *timestamppb.Timestamp
- func (x *Core) GetId() string
- func (x *Core) GetLoginsCount() int32
- func (x *Core) GetPrivate() *Private
- func (x *Core) GetPublic() *Public
- func (x *Core) GetRealm() *Realm
- func (x *Core) GetSources() []*pb.Source
- func (x *Core) GetUpdatedAt() *timestamppb.Timestamp
- func (*Core) ProtoMessage()
- func (x *Core) ProtoReflect() protoreflect.Message
- func (x *Core) Reset()
- func (x *Core) String() string
- func (m *Core) ToORM(ctx context.Context) (CoreORM, error)
- type CoreORM
- type CoreORMWithAfterCreate_
- type CoreORMWithAfterDeleteSet
- type CoreORMWithAfterDelete_
- type CoreORMWithAfterListFind
- type CoreORMWithAfterReadFind
- type CoreORMWithAfterStrictUpdateSave
- type CoreORMWithBeforeCreate_
- type CoreORMWithBeforeDeleteSet
- type CoreORMWithBeforeDelete_
- type CoreORMWithBeforeListApplyQuery
- type CoreORMWithBeforeListFind
- type CoreORMWithBeforeReadApplyQuery
- type CoreORMWithBeforeReadFind
- type CoreORMWithBeforeStrictUpdateCleanup
- type CoreORMWithBeforeStrictUpdateSave
- type CoreWithAfterPatchSave
- type CoreWithAfterToORM
- type CoreWithAfterToPB
- type CoreWithBeforePatchApplyFieldMask
- type CoreWithBeforePatchRead
- type CoreWithBeforePatchSave
- type CoreWithBeforeToORM
- type CoreWithBeforeToPB
- type Login
- func DefaultApplyFieldMaskLogin(ctx context.Context, patchee *Login, patcher *Login, ...) (*Login, error)
- func DefaultCreateLogin(ctx context.Context, in *Login, db *gorm.DB) (*Login, error)
- func DefaultListLogin(ctx context.Context, db *gorm.DB) ([]*Login, error)
- func DefaultPatchLogin(ctx context.Context, in *Login, updateMask *field_mask.FieldMask, db *gorm.DB) (*Login, error)
- func DefaultPatchSetLogin(ctx context.Context, objects []*Login, updateMasks []*field_mask.FieldMask, ...) ([]*Login, error)
- func DefaultReadLogin(ctx context.Context, in *Login, db *gorm.DB) (*Login, error)
- func DefaultStrictUpdateLogin(ctx context.Context, in *Login, db *gorm.DB) (*Login, error)
- func (*Login) Descriptor() ([]byte, []int)deprecated
- func (x *Login) GetAccessLevel() string
- func (x *Login) GetCore() *Core
- func (x *Login) GetCreatedAt() *timestamppb.Timestamp
- func (x *Login) GetHostId() string
- func (x *Login) GetId() string
- func (x *Login) GetLastAttemptedAt() *timestamppb.Timestamp
- func (x *Login) GetService() *pb.Service
- func (x *Login) GetSources() []*pb1.Source
- func (x *Login) GetStatus() LoginStatus
- func (x *Login) GetUpdatedAt() *timestamppb.Timestamp
- func (*Login) ProtoMessage()
- func (x *Login) ProtoReflect() protoreflect.Message
- func (x *Login) Reset()
- func (x *Login) String() string
- func (m *Login) ToORM(ctx context.Context) (LoginORM, error)
- type LoginORM
- type LoginORMWithAfterCreate_
- type LoginORMWithAfterDeleteSet
- type LoginORMWithAfterDelete_
- type LoginORMWithAfterListFind
- type LoginORMWithAfterReadFind
- type LoginORMWithAfterStrictUpdateSave
- type LoginORMWithBeforeCreate_
- type LoginORMWithBeforeDeleteSet
- type LoginORMWithBeforeDelete_
- type LoginORMWithBeforeListApplyQuery
- type LoginORMWithBeforeListFind
- type LoginORMWithBeforeReadApplyQuery
- type LoginORMWithBeforeReadFind
- type LoginORMWithBeforeStrictUpdateCleanup
- type LoginORMWithBeforeStrictUpdateSave
- type LoginStatus
- func (LoginStatus) Descriptor() protoreflect.EnumDescriptor
- func (x LoginStatus) Enum() *LoginStatus
- func (LoginStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x LoginStatus) Number() protoreflect.EnumNumber
- func (x LoginStatus) String() string
- func (LoginStatus) Type() protoreflect.EnumType
- type LoginWithAfterPatchSave
- type LoginWithAfterToORM
- type LoginWithAfterToPB
- type LoginWithBeforePatchApplyFieldMask
- type LoginWithBeforePatchRead
- type LoginWithBeforePatchSave
- type LoginWithBeforeToORM
- type LoginWithBeforeToPB
- type Private
- func DefaultApplyFieldMaskPrivate(ctx context.Context, patchee *Private, patcher *Private, ...) (*Private, error)
- func DefaultCreatePrivate(ctx context.Context, in *Private, db *gorm.DB) (*Private, error)
- func DefaultListPrivate(ctx context.Context, db *gorm.DB) ([]*Private, error)
- func DefaultPatchPrivate(ctx context.Context, in *Private, updateMask *field_mask.FieldMask, ...) (*Private, error)
- func DefaultPatchSetPrivate(ctx context.Context, objects []*Private, updateMasks []*field_mask.FieldMask, ...) ([]*Private, error)
- func DefaultReadPrivate(ctx context.Context, in *Private, db *gorm.DB) (*Private, error)
- func DefaultStrictUpdatePrivate(ctx context.Context, in *Private, db *gorm.DB) (*Private, error)
- func (*Private) Descriptor() ([]byte, []int)deprecated
- func (x *Private) GetCreatedAt() *timestamppb.Timestamp
- func (x *Private) GetData() string
- func (x *Private) GetId() string
- func (x *Private) GetJTRFormat() string
- func (x *Private) GetType() PrivateType
- func (x *Private) GetUpdatedAt() *timestamppb.Timestamp
- func (*Private) ProtoMessage()
- func (x *Private) ProtoReflect() protoreflect.Message
- func (x *Private) Reset()
- func (x *Private) String() string
- func (m *Private) ToORM(ctx context.Context) (PrivateORM, error)
- type PrivateORM
- type PrivateORMWithAfterCreate_
- type PrivateORMWithAfterDeleteSet
- type PrivateORMWithAfterDelete_
- type PrivateORMWithAfterListFind
- type PrivateORMWithAfterReadFind
- type PrivateORMWithAfterStrictUpdateSave
- type PrivateORMWithBeforeCreate_
- type PrivateORMWithBeforeDeleteSet
- type PrivateORMWithBeforeDelete_
- type PrivateORMWithBeforeListApplyQuery
- type PrivateORMWithBeforeListFind
- type PrivateORMWithBeforeReadApplyQuery
- type PrivateORMWithBeforeReadFind
- type PrivateORMWithBeforeStrictUpdateCleanup
- type PrivateORMWithBeforeStrictUpdateSave
- type PrivateType
- func (PrivateType) Descriptor() protoreflect.EnumDescriptor
- func (x PrivateType) Enum() *PrivateType
- func (PrivateType) EnumDescriptor() ([]byte, []int)deprecated
- func (x PrivateType) Number() protoreflect.EnumNumber
- func (x PrivateType) String() string
- func (PrivateType) Type() protoreflect.EnumType
- type PrivateWithAfterPatchSave
- type PrivateWithAfterToORM
- type PrivateWithAfterToPB
- type PrivateWithBeforePatchApplyFieldMask
- type PrivateWithBeforePatchRead
- type PrivateWithBeforePatchSave
- type PrivateWithBeforeToORM
- type PrivateWithBeforeToPB
- type Public
- func DefaultApplyFieldMaskPublic(ctx context.Context, patchee *Public, patcher *Public, ...) (*Public, error)
- func DefaultCreatePublic(ctx context.Context, in *Public, db *gorm.DB) (*Public, error)
- func DefaultListPublic(ctx context.Context, db *gorm.DB) ([]*Public, error)
- func DefaultPatchPublic(ctx context.Context, in *Public, updateMask *field_mask.FieldMask, db *gorm.DB) (*Public, error)
- func DefaultPatchSetPublic(ctx context.Context, objects []*Public, updateMasks []*field_mask.FieldMask, ...) ([]*Public, error)
- func DefaultReadPublic(ctx context.Context, in *Public, db *gorm.DB) (*Public, error)
- func DefaultStrictUpdatePublic(ctx context.Context, in *Public, db *gorm.DB) (*Public, error)
- func (*Public) Descriptor() ([]byte, []int)deprecated
- func (x *Public) GetClaims() string
- func (x *Public) GetCreatedAt() *timestamppb.Timestamp
- func (x *Public) GetData() string
- func (x *Public) GetId() string
- func (x *Public) GetType() PublicType
- func (x *Public) GetUpdatedAt() *timestamppb.Timestamp
- func (x *Public) GetUsername() string
- func (*Public) ProtoMessage()
- func (x *Public) ProtoReflect() protoreflect.Message
- func (x *Public) Reset()
- func (x *Public) String() string
- func (m *Public) ToORM(ctx context.Context) (PublicORM, error)
- type PublicORM
- type PublicORMWithAfterCreate_
- type PublicORMWithAfterDeleteSet
- type PublicORMWithAfterDelete_
- type PublicORMWithAfterListFind
- type PublicORMWithAfterReadFind
- type PublicORMWithAfterStrictUpdateSave
- type PublicORMWithBeforeCreate_
- type PublicORMWithBeforeDeleteSet
- type PublicORMWithBeforeDelete_
- type PublicORMWithBeforeListApplyQuery
- type PublicORMWithBeforeListFind
- type PublicORMWithBeforeReadApplyQuery
- type PublicORMWithBeforeReadFind
- type PublicORMWithBeforeStrictUpdateCleanup
- type PublicORMWithBeforeStrictUpdateSave
- type PublicType
- type PublicWithAfterPatchSave
- type PublicWithAfterToORM
- type PublicWithAfterToPB
- type PublicWithBeforePatchApplyFieldMask
- type PublicWithBeforePatchRead
- type PublicWithBeforePatchSave
- type PublicWithBeforeToORM
- type PublicWithBeforeToPB
- type Realm
- func DefaultApplyFieldMaskRealm(ctx context.Context, patchee *Realm, patcher *Realm, ...) (*Realm, error)
- func DefaultCreateRealm(ctx context.Context, in *Realm, db *gorm.DB) (*Realm, error)
- func DefaultListRealm(ctx context.Context, db *gorm.DB) ([]*Realm, error)
- func DefaultPatchRealm(ctx context.Context, in *Realm, updateMask *field_mask.FieldMask, db *gorm.DB) (*Realm, error)
- func DefaultPatchSetRealm(ctx context.Context, objects []*Realm, updateMasks []*field_mask.FieldMask, ...) ([]*Realm, error)
- func DefaultReadRealm(ctx context.Context, in *Realm, db *gorm.DB) (*Realm, error)
- func DefaultStrictUpdateRealm(ctx context.Context, in *Realm, db *gorm.DB) (*Realm, error)
- func (*Realm) Descriptor() ([]byte, []int)deprecated
- func (x *Realm) GetCreatedAt() *timestamppb.Timestamp
- func (x *Realm) GetId() string
- func (x *Realm) GetKey() string
- func (x *Realm) GetUpdatedAt() *timestamppb.Timestamp
- func (x *Realm) GetValue() string
- func (*Realm) ProtoMessage()
- func (x *Realm) ProtoReflect() protoreflect.Message
- func (x *Realm) Reset()
- func (x *Realm) String() string
- func (m *Realm) ToORM(ctx context.Context) (RealmORM, error)
- type RealmORM
- type RealmORMWithAfterCreate_
- type RealmORMWithAfterDeleteSet
- type RealmORMWithAfterDelete_
- type RealmORMWithAfterListFind
- type RealmORMWithAfterReadFind
- type RealmORMWithAfterStrictUpdateSave
- type RealmORMWithBeforeCreate_
- type RealmORMWithBeforeDeleteSet
- type RealmORMWithBeforeDelete_
- type RealmORMWithBeforeListApplyQuery
- type RealmORMWithBeforeListFind
- type RealmORMWithBeforeReadApplyQuery
- type RealmORMWithBeforeReadFind
- type RealmORMWithBeforeStrictUpdateCleanup
- type RealmORMWithBeforeStrictUpdateSave
- type RealmWithAfterPatchSave
- type RealmWithAfterToORM
- type RealmWithAfterToPB
- type RealmWithBeforePatchApplyFieldMask
- type RealmWithBeforePatchRead
- type RealmWithBeforePatchSave
- type RealmWithBeforeToORM
- type RealmWithBeforeToPB
Constants ¶
This section is empty.
Variables ¶
var ( LoginStatus_name = map[int32]string{ 0: "Untried", 1: "DeniedAccess", 2: "Disabled", 3: "LockedOut", 4: "Sucessful", 5: "UnableToConnect", } LoginStatus_value = map[string]int32{ "Untried": 0, "DeniedAccess": 1, "Disabled": 2, "LockedOut": 3, "Sucessful": 4, "UnableToConnect": 5, } )
Enum value maps for LoginStatus.
var ( PrivateType_name = map[int32]string{ 0: "Password", 1: "BlankPassword", 2: "ReplayableHash", 3: "NonReplayableHash", 4: "NTLMHash", 5: "PostgresMD5", 6: "Key", 7: "JWT", } PrivateType_value = map[string]int32{ "Password": 0, "BlankPassword": 1, "ReplayableHash": 2, "NonReplayableHash": 3, "NTLMHash": 4, "PostgresMD5": 5, "Key": 6, "JWT": 7, } )
Enum value maps for PrivateType.
var ( PublicType_name = map[int32]string{ 0: "Username", 1: "BlankUsername", 3: "PublicKey", 4: "Certificate", } PublicType_value = map[string]int32{ "Username": 0, "BlankUsername": 1, "PublicKey": 3, "Certificate": 4, } )
Enum value maps for PublicType.
var File_credential_pb_core_proto protoreflect.FileDescriptor
var File_credential_pb_login_proto protoreflect.FileDescriptor
var File_credential_pb_private_proto protoreflect.FileDescriptor
var File_credential_pb_public_proto protoreflect.FileDescriptor
var File_credential_pb_realm_proto protoreflect.FileDescriptor
Functions ¶
func DefaultDeleteCoreSet ¶
func DefaultDeleteLogin ¶
func DefaultDeleteLoginSet ¶
func DefaultDeletePrivate ¶
func DefaultDeletePrivateSet ¶
func DefaultDeletePublic ¶
func DefaultDeletePublicSet ¶
func DefaultDeleteRealm ¶
Types ¶
type Core ¶
type Core struct {
Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"`
// Sources - The provenance of this credential (its origin). Replaces the former
// credential.Origin: OriginType maps to SourceType (Manual/Import/Cracked/Service), and
// Cracker/Filename/SessionId/ServiceId are carried on provenance.Source. Many-to-many so
// the same credential reported by several tools accumulates their contributions.
// @gotags: display:"Sources"
Sources []*pb.Source `protobuf:"bytes,14,rep,name=Sources,proto3" json:"Sources,omitempty" display:"Sources"`
// Private - The credential.Private either gathered from Realm,
// or used to credential.ReplayableHash authenticate into the realm.
Private *Private `protobuf:"bytes,11,opt,name=Private,proto3" json:"Private,omitempty"`
// Public - The credential.Public gathered from Realm.
Public *Public `protobuf:"bytes,12,opt,name=Public,proto3" json:"Public,omitempty"`
// Realm - credential.Realm where Private and/or Public was gathered
// and/or the credential.Realm to which Private and/or Public can be
// used to authenticate.
Realm *Realm `protobuf:"bytes,13,opt,name=Realm,proto3" json:"Realm,omitempty"`
// repeated Login Logins = 14;
LoginsCount int32 `protobuf:"varint,8,opt,name=LoginsCount,proto3" json:"LoginsCount,omitempty"`
// contains filtered or unexported fields
}
Core credential that combines Private, Public, and/or Realm so that credential.Private or credential.Public that are gathered from a credential.Realm} are properly scoped when used.
A core credential must always have at least one provenance.Source (its origin — the former credential.Origin, now absorbed into the shared Source), but only needs 1 of Private, Public, or Realm set.
func DefaultApplyFieldMaskCore ¶
func DefaultApplyFieldMaskCore(ctx context.Context, patchee *Core, patcher *Core, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Core, error)
DefaultApplyFieldMaskCore patches an pbObject with patcher according to a field mask.
func DefaultCreateCore ¶
DefaultCreateCore executes a basic gorm create call
func DefaultListCore ¶
DefaultListCore executes a gorm list call
func DefaultPatchCore ¶
func DefaultPatchCore(ctx context.Context, in *Core, updateMask *field_mask.FieldMask, db *gorm.DB) (*Core, error)
DefaultPatchCore executes a basic gorm update call with patch behavior
func DefaultPatchSetCore ¶
func DefaultPatchSetCore(ctx context.Context, objects []*Core, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Core, error)
DefaultPatchSetCore executes a bulk gorm update call with patch behavior
func DefaultReadCore ¶
func DefaultStrictUpdateCore ¶
DefaultStrictUpdateCore clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*Core) Descriptor
deprecated
func (*Core) GetCreatedAt ¶
func (x *Core) GetCreatedAt() *timestamppb.Timestamp
func (*Core) GetLoginsCount ¶
func (*Core) GetPrivate ¶
func (*Core) GetSources ¶
func (*Core) GetUpdatedAt ¶
func (x *Core) GetUpdatedAt() *timestamppb.Timestamp
func (*Core) ProtoMessage ¶
func (*Core) ProtoMessage()
func (*Core) ProtoReflect ¶
func (x *Core) ProtoReflect() protoreflect.Message
type CoreORM ¶
type CoreORM struct {
CreatedAt *time.Time
Id string `gorm:"type:uuid;primaryKey"`
LoginId *string
LoginsCount int32
Private *PrivateORM `gorm:"foreignKey:CoreId;references:Id"`
Public *PublicORM `gorm:"foreignKey:CoreId;references:Id"`
Realm *RealmORM `gorm:"foreignKey:CoreId;references:Id"`
Sources []*pb.SourceORM `gorm:"foreignKey:Id;references:Id;many2many:core_sources;joinForeignKey:CoreId;joinReferences:SourceId"`
UpdatedAt *time.Time
}
func (*CoreORM) BeforeCreate ¶
BeforeCreate - GORM-specific autogenerated helpers.
type CoreORMWithAfterCreate_ ¶
type CoreORMWithAfterDelete_ ¶
type CoreWithAfterPatchSave ¶
type CoreWithAfterToORM ¶
CoreAfterToORM called after default ToORM code
type CoreWithAfterToPB ¶
CoreAfterToPB called after default ToPB code
type CoreWithBeforePatchRead ¶
type CoreWithBeforePatchSave ¶
type CoreWithBeforeToORM ¶
CoreBeforeToORM called before default ToORM code
type CoreWithBeforeToPB ¶
CoreBeforeToPB called before default ToPB code
type Login ¶
type Login struct {
Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"`
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"`
// string CoreId = 10 [(gorm.field).tag = {type:"uuid" primary_key: true}];
LastAttemptedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=LastAttemptedAt,proto3" json:"LastAttemptedAt,omitempty"`
AccessLevel string `protobuf:"bytes,20,opt,name=AccessLevel,proto3" json:"AccessLevel,omitempty"`
Status LoginStatus `protobuf:"varint,21,opt,name=Status,proto3,enum=credential.LoginStatus" json:"Status,omitempty"`
// Core - The credential.Core used to authenticate to Service
Core *Core `protobuf:"bytes,13,opt,name=Core,proto3" json:"Core,omitempty"`
// Service - The service that either accepted the credential.Core as valid, invalid,
// or on which the credential.Core should be tested to see if it is valid.
Service *pb.Service `protobuf:"bytes,22,opt,name=Service,proto3" json:"Service,omitempty"`
// The host on which Service runs
HostId string `protobuf:"bytes,23,opt,name=HostId,proto3" json:"HostId,omitempty"`
// Sources - The provenance contributions that recorded this login attempt/result.
// Unioned on merge.
// @gotags: display:"Sources"
Sources []*pb1.Source `protobuf:"bytes,24,rep,name=Sources,proto3" json:"Sources,omitempty" display:"Sources"`
// contains filtered or unexported fields
}
Login - The use of a credential.Core against a service.
func DefaultApplyFieldMaskLogin ¶
func DefaultApplyFieldMaskLogin(ctx context.Context, patchee *Login, patcher *Login, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Login, error)
DefaultApplyFieldMaskLogin patches an pbObject with patcher according to a field mask.
func DefaultCreateLogin ¶
DefaultCreateLogin executes a basic gorm create call
func DefaultListLogin ¶
DefaultListLogin executes a gorm list call
func DefaultPatchLogin ¶
func DefaultPatchLogin(ctx context.Context, in *Login, updateMask *field_mask.FieldMask, db *gorm.DB) (*Login, error)
DefaultPatchLogin executes a basic gorm update call with patch behavior
func DefaultPatchSetLogin ¶
func DefaultPatchSetLogin(ctx context.Context, objects []*Login, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Login, error)
DefaultPatchSetLogin executes a bulk gorm update call with patch behavior
func DefaultReadLogin ¶
func DefaultStrictUpdateLogin ¶
DefaultStrictUpdateLogin clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*Login) Descriptor
deprecated
func (*Login) GetAccessLevel ¶
func (*Login) GetCreatedAt ¶
func (x *Login) GetCreatedAt() *timestamppb.Timestamp
func (*Login) GetLastAttemptedAt ¶
func (x *Login) GetLastAttemptedAt() *timestamppb.Timestamp
func (*Login) GetService ¶
func (*Login) GetSources ¶
func (*Login) GetStatus ¶
func (x *Login) GetStatus() LoginStatus
func (*Login) GetUpdatedAt ¶
func (x *Login) GetUpdatedAt() *timestamppb.Timestamp
func (*Login) ProtoMessage ¶
func (*Login) ProtoMessage()
func (*Login) ProtoReflect ¶
func (x *Login) ProtoReflect() protoreflect.Message
type LoginORM ¶
type LoginORM struct {
AccessLevel string
Core *CoreORM `gorm:"not null;foreignKey:LoginId;references:Id"`
CreatedAt *time.Time
HostId string `gorm:"type:uuid;not null"`
Id string `gorm:"type:uuid;primaryKey"`
LastAttemptedAt *time.Time
Service *pb.ServiceORM `gorm:"foreignKey:ServiceId;references:Id"`
ServiceId *string
Sources []*pb1.SourceORM `gorm:"foreignKey:Id;references:Id;many2many:login_sources;joinForeignKey:LoginId;joinReferences:SourceId"`
Status int32
UpdatedAt *time.Time
}
func (*LoginORM) BeforeCreate ¶
BeforeCreate - GORM-specific autogenerated helpers.
type LoginStatus ¶
type LoginStatus int32
LoginStatus - The state of a credential.Login.
const ( LoginStatus_Untried LoginStatus = 0 LoginStatus_DeniedAccess LoginStatus = 1 LoginStatus_Disabled LoginStatus = 2 LoginStatus_LockedOut LoginStatus = 3 LoginStatus_Sucessful LoginStatus = 4 LoginStatus_UnableToConnect LoginStatus = 5 )
func (LoginStatus) Descriptor ¶
func (LoginStatus) Descriptor() protoreflect.EnumDescriptor
func (LoginStatus) Enum ¶
func (x LoginStatus) Enum() *LoginStatus
func (LoginStatus) EnumDescriptor
deprecated
func (LoginStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use LoginStatus.Descriptor instead.
func (LoginStatus) Number ¶
func (x LoginStatus) Number() protoreflect.EnumNumber
func (LoginStatus) String ¶
func (x LoginStatus) String() string
func (LoginStatus) Type ¶
func (LoginStatus) Type() protoreflect.EnumType
type LoginWithAfterPatchSave ¶
type LoginWithAfterToORM ¶
LoginAfterToORM called after default ToORM code
type LoginWithAfterToPB ¶
LoginAfterToPB called after default ToPB code
type LoginWithBeforeToORM ¶
LoginBeforeToORM called before default ToORM code
type LoginWithBeforeToPB ¶
LoginBeforeToPB called before default ToPB code
type Private ¶
type Private struct {
Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
// @gotags: display:"Created at" readonly:"true"
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty" display:"Created at" readonly:"true"`
// @gotags: display:"Updated at" readonly:"true"
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty" display:"Updated at" readonly:"true"`
// @gotags: display:"Type" readonly:"true"
Type PrivateType `protobuf:"varint,10,opt,name=Type,proto3,enum=credential.PrivateType" json:"Type,omitempty" display:"Type" readonly:"true"`
// No data passed into Maltego at this point.
Data string `protobuf:"bytes,11,opt,name=Data,proto3" json:"Data,omitempty"`
// @gotags: display:"JTR Format" readonly:"true"
JTRFormat string `protobuf:"bytes,12,opt,name=JTRFormat,proto3" json:"JTRFormat,omitempty" display:"JTR Format" readonly:"true"`
// contains filtered or unexported fields
}
Private - Any credential that should not be publicly exposed.
func DefaultApplyFieldMaskPrivate ¶
func DefaultApplyFieldMaskPrivate(ctx context.Context, patchee *Private, patcher *Private, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Private, error)
DefaultApplyFieldMaskPrivate patches an pbObject with patcher according to a field mask.
func DefaultCreatePrivate ¶
DefaultCreatePrivate executes a basic gorm create call
func DefaultListPrivate ¶
DefaultListPrivate executes a gorm list call
func DefaultPatchPrivate ¶
func DefaultPatchPrivate(ctx context.Context, in *Private, updateMask *field_mask.FieldMask, db *gorm.DB) (*Private, error)
DefaultPatchPrivate executes a basic gorm update call with patch behavior
func DefaultPatchSetPrivate ¶
func DefaultPatchSetPrivate(ctx context.Context, objects []*Private, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Private, error)
DefaultPatchSetPrivate executes a bulk gorm update call with patch behavior
func DefaultReadPrivate ¶
func DefaultStrictUpdatePrivate ¶
DefaultStrictUpdatePrivate clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*Private) Descriptor
deprecated
func (*Private) GetCreatedAt ¶
func (x *Private) GetCreatedAt() *timestamppb.Timestamp
func (*Private) GetJTRFormat ¶
func (*Private) GetType ¶
func (x *Private) GetType() PrivateType
func (*Private) GetUpdatedAt ¶
func (x *Private) GetUpdatedAt() *timestamppb.Timestamp
func (*Private) ProtoMessage ¶
func (*Private) ProtoMessage()
func (*Private) ProtoReflect ¶
func (x *Private) ProtoReflect() protoreflect.Message
type PrivateORM ¶
type PrivateORM struct {
CoreId *string
CreatedAt *time.Time
Data string
Id string `gorm:"type:uuid;primaryKey"`
JTRFormat string
Type int32
UpdatedAt *time.Time
}
func (*PrivateORM) BeforeCreate ¶
func (private *PrivateORM) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM-specific autogenerated helpers.
func (PrivateORM) TableName ¶
func (PrivateORM) TableName() string
TableName overrides the default tablename generated by GORM
type PrivateType ¶
type PrivateType int32
PrivateType - The type of a Private credential. Each of these types might trigger different validations when using fetching/creating Private in DB.
const ( // A password is the default type, such that if the Private.Data is // empty, the type will not be able to save itself in DB without // explicitely specifying either its .Type field, or by creating a // credential.BlankPassword first. PrivateType_Password PrivateType = 0 PrivateType_BlankPassword PrivateType = 1 // ReplayableHash - A credential.PasswordHash password hash that // can be replayed to authenticate to additional services. PrivateType_ReplayableHash PrivateType = 2 // NonReplayableHash - A credential.PasswordHash password hash that // cannot be replayed to authenticate to other services. Contrasts // with credential.ReplayableHash. The NonReplayableHash.Data is any // password hash, such as those recovered from `/etc/passwd` or `/etc/shadow`. PrivateType_NonReplayableHash PrivateType = 3 // NTLMHash - A credential.Private password hash that can be credential.ReplayableHash replayed // to authenticate to SMB. It is composed of two hash hex digests (where the hash bytes are // printed as a hexadecimal string where 2 characters represent a byte of the original hash with // the high nibble first): (1) {lanManagerHexDigestRegexp, the LAN Manager hash's hex digest} and // (2) {ntLanManagerHexDigestRegexp, the NTLM hash's hex digest}. PrivateType_NTLMHash PrivateType = 4 // PostgresMD5 - A credential.Private.PasswordHash password hash that can be // credential.Private.ReplayableHash replayed to authenticate to PostgreSQL // servers. It is composed of a hexadecimal string of 32 characters prepended // by the string 'md5' PrivateType_PostgresMD5 PrivateType = 5 // Key - Usually a cryptographic key. When the credential is of this // type, various validations are performed on the formatting, encoding // potential encryption of the key data, etc. // As well, various methods are provided to get cipher and fingerprints. PrivateType_Key PrivateType = 6 // JWT - When the private credential is a JSON Web Token, it is used // in conjunction with a given credential.Public to create a JWT string // stored in its .Data field. // As well, some other types (eg. credential.Core) allow you to create // JWT from their own data, like usernames, public/private key pairs, etc. PrivateType_JWT PrivateType = 7 )
func (PrivateType) Descriptor ¶
func (PrivateType) Descriptor() protoreflect.EnumDescriptor
func (PrivateType) Enum ¶
func (x PrivateType) Enum() *PrivateType
func (PrivateType) EnumDescriptor
deprecated
func (PrivateType) EnumDescriptor() ([]byte, []int)
Deprecated: Use PrivateType.Descriptor instead.
func (PrivateType) Number ¶
func (x PrivateType) Number() protoreflect.EnumNumber
func (PrivateType) String ¶
func (x PrivateType) String() string
func (PrivateType) Type ¶
func (PrivateType) Type() protoreflect.EnumType
type PrivateWithAfterToORM ¶
type PrivateWithAfterToORM interface {
AfterToORM(context.Context, *PrivateORM) error
}
PrivateAfterToORM called after default ToORM code
type PrivateWithAfterToPB ¶
PrivateAfterToPB called after default ToPB code
type PrivateWithBeforeToORM ¶
type PrivateWithBeforeToORM interface {
BeforeToORM(context.Context, *PrivateORM) error
}
PrivateBeforeToORM called before default ToORM code
type PrivateWithBeforeToPB ¶
PrivateBeforeToPB called before default ToPB code
type Public ¶
type Public struct {
Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
// @gotags: display:"Created at" readonly:"true"
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty" display:"Created at" readonly:"true"`
// @gotags: display:"Updated at" readonly:"true"
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty" display:"Updated at" readonly:"true"`
// @gotags: display:"Type" readonly:"true"
Type PublicType `protobuf:"varint,10,opt,name=Type,proto3,enum=credential.PublicType" json:"Type,omitempty" display:"Type" readonly:"true"`
// @gotags: display:"Username" readonly:"true"
Username string `protobuf:"bytes,11,opt,name=Username,proto3" json:"Username,omitempty" display:"Username" readonly:"true"`
// Data - When the Public credential is a cryptographic key/certificate
// rather than a username, the key/certificate data is stored in this field.
// @gotags: display:"Data" readonly:"true"
Data string `protobuf:"bytes,12,opt,name=Data,proto3" json:"Data,omitempty" display:"Data" readonly:"true"`
// Claims - Some public credentials, such as JSON Web Tokens,
// can bear claims, which are a list of key-value pairs. These
// claims are stored as the bytes of a JSON-marshalled map[string]interface{}
// A method is provided for credentials to get this map.
// @gotags: display:"Claims" readonly:"true"
Claims string `protobuf:"bytes,13,opt,name=Claims,proto3" json:"Claims,omitempty" display:"Claims" readonly:"true"`
// contains filtered or unexported fields
}
Public - A publicly disclosed credential (ex: username)
func DefaultApplyFieldMaskPublic ¶
func DefaultApplyFieldMaskPublic(ctx context.Context, patchee *Public, patcher *Public, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Public, error)
DefaultApplyFieldMaskPublic patches an pbObject with patcher according to a field mask.
func DefaultCreatePublic ¶
DefaultCreatePublic executes a basic gorm create call
func DefaultListPublic ¶
DefaultListPublic executes a gorm list call
func DefaultPatchPublic ¶
func DefaultPatchPublic(ctx context.Context, in *Public, updateMask *field_mask.FieldMask, db *gorm.DB) (*Public, error)
DefaultPatchPublic executes a basic gorm update call with patch behavior
func DefaultPatchSetPublic ¶
func DefaultPatchSetPublic(ctx context.Context, objects []*Public, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Public, error)
DefaultPatchSetPublic executes a bulk gorm update call with patch behavior
func DefaultReadPublic ¶
func DefaultStrictUpdatePublic ¶
DefaultStrictUpdatePublic clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*Public) Descriptor
deprecated
func (*Public) GetCreatedAt ¶
func (x *Public) GetCreatedAt() *timestamppb.Timestamp
func (*Public) GetType ¶
func (x *Public) GetType() PublicType
func (*Public) GetUpdatedAt ¶
func (x *Public) GetUpdatedAt() *timestamppb.Timestamp
func (*Public) GetUsername ¶
func (*Public) ProtoMessage ¶
func (*Public) ProtoMessage()
func (*Public) ProtoReflect ¶
func (x *Public) ProtoReflect() protoreflect.Message
type PublicORM ¶
type PublicORM struct {
Claims string
CoreId *string
CreatedAt *time.Time
Data string
Id string `gorm:"type:uuid;primaryKey"`
Type int32
UpdatedAt *time.Time
Username string
}
func (*PublicORM) BeforeCreate ¶
BeforeCreate - GORM-specific autogenerated helpers.
type PublicType ¶
type PublicType int32
PublicType - The type of a Public credential. Each of these types might trigger different validations when using fetching/creating Private in DB.
const ( // A Username is the default type, such that if the Public.Username is // empty, the type will not be able to save itself in DB without // explicitely specifying either its .Username field, or by creating a // credential.BlankUsername type first. PublicType_Username PublicType = 0 PublicType_BlankUsername PublicType = 1 // PublicKey - Some types of Public credentials are cryptographic public keys. // Regardless of their cyphers, algos and other tails, they are stored // in the .Key field of the credential.Public, and specialized "subtypes" // provide methods for manipulating the key, in/for various formats/purposes. // As well, various methods are provided to get cipher and fingerprints. PublicType_PublicKey PublicType = 3 // Certificate - An x509 certificate that can contain additional information // to an (optional) key (a certificate needs a key for encryption, but can be // empty). PublicType_Certificate PublicType = 4 )
func (PublicType) Descriptor ¶
func (PublicType) Descriptor() protoreflect.EnumDescriptor
func (PublicType) Enum ¶
func (x PublicType) Enum() *PublicType
func (PublicType) EnumDescriptor
deprecated
func (PublicType) EnumDescriptor() ([]byte, []int)
Deprecated: Use PublicType.Descriptor instead.
func (PublicType) Number ¶
func (x PublicType) Number() protoreflect.EnumNumber
func (PublicType) String ¶
func (x PublicType) String() string
func (PublicType) Type ¶
func (PublicType) Type() protoreflect.EnumType
type PublicWithAfterToORM ¶
PublicAfterToORM called after default ToORM code
type PublicWithAfterToPB ¶
PublicAfterToPB called after default ToPB code
type PublicWithBeforeToORM ¶
PublicBeforeToORM called before default ToORM code
type PublicWithBeforeToPB ¶
PublicBeforeToPB called before default ToPB code
type Realm ¶
type Realm struct {
Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
// @gotags: display:"Created at" readonly:"true"
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty" display:"Created at" readonly:"true"`
// @gotags: display:"Updated at" readonly:"true"
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty" display:"Updated at" readonly:"true"`
// @gotags: display:"Key"
Key string `protobuf:"bytes,10,opt,name=Key,proto3" json:"Key,omitempty" display:"Key"`
// @gotags: display:"Value"
Value string `protobuf:"bytes,11,opt,name=Value,proto3" json:"Value,omitempty" display:"Value"`
// contains filtered or unexported fields
}
Realm - The realm in which a CredentialPublic can be used to authenticate or from which a CredentialPrivate was looted.
func DefaultApplyFieldMaskRealm ¶
func DefaultApplyFieldMaskRealm(ctx context.Context, patchee *Realm, patcher *Realm, updateMask *field_mask.FieldMask, prefix string, db *gorm.DB) (*Realm, error)
DefaultApplyFieldMaskRealm patches an pbObject with patcher according to a field mask.
func DefaultCreateRealm ¶
DefaultCreateRealm executes a basic gorm create call
func DefaultListRealm ¶
DefaultListRealm executes a gorm list call
func DefaultPatchRealm ¶
func DefaultPatchRealm(ctx context.Context, in *Realm, updateMask *field_mask.FieldMask, db *gorm.DB) (*Realm, error)
DefaultPatchRealm executes a basic gorm update call with patch behavior
func DefaultPatchSetRealm ¶
func DefaultPatchSetRealm(ctx context.Context, objects []*Realm, updateMasks []*field_mask.FieldMask, db *gorm.DB) ([]*Realm, error)
DefaultPatchSetRealm executes a bulk gorm update call with patch behavior
func DefaultReadRealm ¶
func DefaultStrictUpdateRealm ¶
DefaultStrictUpdateRealm clears / replaces / appends first level 1:many children and then executes a gorm update call
func (*Realm) Descriptor
deprecated
func (*Realm) GetCreatedAt ¶
func (x *Realm) GetCreatedAt() *timestamppb.Timestamp
func (*Realm) GetUpdatedAt ¶
func (x *Realm) GetUpdatedAt() *timestamppb.Timestamp
func (*Realm) ProtoMessage ¶
func (*Realm) ProtoMessage()
func (*Realm) ProtoReflect ¶
func (x *Realm) ProtoReflect() protoreflect.Message
type RealmORM ¶
type RealmORM struct {
CoreId *string
CreatedAt *time.Time
Id string `gorm:"type:uuid;primaryKey"`
Key string
UpdatedAt *time.Time
Value string
}
func (*RealmORM) BeforeCreate ¶
BeforeCreate - GORM-specific autogenerated helpers.
type RealmWithAfterPatchSave ¶
type RealmWithAfterToORM ¶
RealmAfterToORM called after default ToORM code
type RealmWithAfterToPB ¶
RealmAfterToPB called after default ToPB code
type RealmWithBeforeToORM ¶
RealmBeforeToORM called before default ToORM code