Class: Google::Apis::CloudsearchV1::SimpleSecretLabelProto
- Inherits:
-
Object
- Object
- Google::Apis::CloudsearchV1::SimpleSecretLabelProto
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudsearch_v1/classes.rb,
lib/google/apis/cloudsearch_v1/representations.rb,
lib/google/apis/cloudsearch_v1/representations.rb
Overview
SimpleSecretProto (in authenticator.proto) and SimpleSecretHolderProto (below) share the notion of a "label", which identifies a particular secret without ( hopefully) revealing the secret. Note that a SimpleSecretLabel only disambiguates between secrets used to get access to some particular object. Two different secrets that apply to two different objects could have the same label. For example, in the common sharing model, each object has no more than one "auth key". Therefore, the label for an auth key simply has type = AUTH_KEY with no additional information. In theory, we could add some sort of resource ID to SimpleSecretLabel to make it more explicit. However, in practice, this is never really needed. A SimpleSecret for one object is never used to authorize a request on some other object, so there is no ambiguity. Also, since SimpleSecrets must obviously be unguessable, there is no risk that a SimpleSecret intended for one object will accidentally grant access to another.
Instance Attribute Summary collapse
-
#capability_id ⇒ Fixnum
**DEPRECATED (3-Oct-2011) ** This field should be deleted when code stops using CAP_TOKEN labels.
-
#generic_label ⇒ String
Used when type = GENERIC_SECRET Corresponds to the JSON property
genericLabelNOTE: Values are automatically base64 encoded/decoded in the client library. -
#invite_id ⇒ Fixnum
Used when type == INVITE.
-
#type ⇒ String
This is optional because required enums cannot be extended.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SimpleSecretLabelProto
constructor
A new instance of SimpleSecretLabelProto.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ SimpleSecretLabelProto
Returns a new instance of SimpleSecretLabelProto.
18228 18229 18230 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 18228 def initialize(**args) update!(**args) end |
Instance Attribute Details
#capability_id ⇒ Fixnum
**DEPRECATED (3-Oct-2011) ** This field should be deleted when code stops
using CAP_TOKEN labels. Used when type = CAP_TOKEN. When a CAP_TOKEN label
appears in a SimpleSecretHolder Principal, |capability_id| must be filled in
to identify one of the capabilities on the ACL. When a CAP_TOKEN label appears
in a SimpleSecret Authenticator, it is NOT necessary to fill in |capability_id|
-- ACL Service will find the ID by searching all capabilities on the ACL for
one associated with the token given by the SimpleSecret's secret data. If |
capability_id| is specified, though, then the Authenticator will only be
accepted if it actually matches that particular token ID.
Corresponds to the JSON property capabilityId
18210 18211 18212 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 18210 def capability_id @capability_id end |
#generic_label ⇒ String
Used when type = GENERIC_SECRET
Corresponds to the JSON property genericLabel
NOTE: Values are automatically base64 encoded/decoded in the client library.
18216 18217 18218 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 18216 def generic_label @generic_label end |
#invite_id ⇒ Fixnum
Used when type == INVITE.
Corresponds to the JSON property inviteId
18221 18222 18223 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 18221 def invite_id @invite_id end |
#type ⇒ String
This is optional because required enums cannot be extended.
Corresponds to the JSON property type
18226 18227 18228 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 18226 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
18233 18234 18235 18236 18237 18238 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 18233 def update!(**args) @capability_id = args[:capability_id] if args.key?(:capability_id) @generic_label = args[:generic_label] if args.key?(:generic_label) @invite_id = args[:invite_id] if args.key?(:invite_id) @type = args[:type] if args.key?(:type) end |