aws-sdk-verifiedpermissions 1.18.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-verifiedpermissions/client.rb +151 -13
- data/lib/aws-sdk-verifiedpermissions/client_api.rb +45 -0
- data/lib/aws-sdk-verifiedpermissions/endpoints.rb +14 -0
- data/lib/aws-sdk-verifiedpermissions/plugins/endpoints.rb +2 -0
- data/lib/aws-sdk-verifiedpermissions/types.rb +170 -29
- data/lib/aws-sdk-verifiedpermissions.rb +1 -1
- data/sig/client.rbs +45 -0
- data/sig/types.rbs +30 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41ef019fc552dd6626faca87c604b2cd2cd0b13692e009f58e9de726acef3ef3
|
4
|
+
data.tar.gz: 76e66a78cfd4c1b5b5b74a38bddbaa1e2a189135e8f1946d903b3667fcb8fdf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acaaa4a7d0b3f7e070f2c4698ca8a01d05eed0e24895a31986988b91e774c92dee3699be18d1b05715c57e9ccc5ae61c26affe541dc511885116b714105cfae7
|
7
|
+
data.tar.gz: 45e7982d0a52044b48edfd68082997fab982e3b5a236ac9aed1aaf4e0b84c86935fc32e5cf809ebec0403e4c0e559a59cb06eaba5919a6c0571cc4fa80b5f300
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.19.0 (2024-04-05)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Adding BatchIsAuthorizedWithToken API which supports multiple authorization requests against a PolicyStore given a bearer token.
|
8
|
+
|
4
9
|
1.18.0 (2024-04-04)
|
5
10
|
------------------
|
6
11
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.19.0
|
@@ -518,6 +518,152 @@ module Aws::VerifiedPermissions
|
|
518
518
|
req.send_request(options)
|
519
519
|
end
|
520
520
|
|
521
|
+
# Makes a series of decisions about multiple authorization requests for
|
522
|
+
# one token. The principal in this request comes from an external
|
523
|
+
# identity source in the form of an identity or access token, formatted
|
524
|
+
# as a [JSON web token (JWT)][1]. The information in the parameters can
|
525
|
+
# also define additional context that Verified Permissions can include
|
526
|
+
# in the evaluations.
|
527
|
+
#
|
528
|
+
# The request is evaluated against all policies in the specified policy
|
529
|
+
# store that match the entities that you provide in the entities
|
530
|
+
# declaration and in the token. The result of the decisions is a series
|
531
|
+
# of `Allow` or `Deny` responses, along with the IDs of the policies
|
532
|
+
# that produced each decision.
|
533
|
+
#
|
534
|
+
# The `entities` of a `BatchIsAuthorizedWithToken` API request can
|
535
|
+
# contain up to 100 resources and up to 99 user groups. The `requests`
|
536
|
+
# of a `BatchIsAuthorizedWithToken` API request can contain up to 30
|
537
|
+
# requests.
|
538
|
+
#
|
539
|
+
# <note markdown="1"> The `BatchIsAuthorizedWithToken` operation doesn't have its own IAM
|
540
|
+
# permission. To authorize this operation for Amazon Web Services
|
541
|
+
# principals, include the permission
|
542
|
+
# `verifiedpermissions:IsAuthorizedWithToken` in their IAM policies.
|
543
|
+
#
|
544
|
+
# </note>
|
545
|
+
#
|
546
|
+
#
|
547
|
+
#
|
548
|
+
# [1]: https://wikipedia.org/wiki/JSON_Web_Token
|
549
|
+
#
|
550
|
+
# @option params [required, String] :policy_store_id
|
551
|
+
# Specifies the ID of the policy store. Policies in this policy store
|
552
|
+
# will be used to make an authorization decision for the input.
|
553
|
+
#
|
554
|
+
# @option params [String] :identity_token
|
555
|
+
# Specifies an identity (ID) token for the principal that you want to
|
556
|
+
# authorize in each request. This token is provided to you by the
|
557
|
+
# identity provider (IdP) associated with the specified identity source.
|
558
|
+
# You must specify either an `accessToken`, an `identityToken`, or both.
|
559
|
+
#
|
560
|
+
# Must be an ID token. Verified Permissions returns an error if the
|
561
|
+
# `token_use` claim in the submitted token isn't `id`.
|
562
|
+
#
|
563
|
+
# @option params [String] :access_token
|
564
|
+
# Specifies an access token for the principal that you want to authorize
|
565
|
+
# in each request. This token is provided to you by the identity
|
566
|
+
# provider (IdP) associated with the specified identity source. You must
|
567
|
+
# specify either an `accessToken`, an `identityToken`, or both.
|
568
|
+
#
|
569
|
+
# Must be an access token. Verified Permissions returns an error if the
|
570
|
+
# `token_use` claim in the submitted token isn't `access`.
|
571
|
+
#
|
572
|
+
# @option params [Types::EntitiesDefinition] :entities
|
573
|
+
# Specifies the list of resources and their associated attributes that
|
574
|
+
# Verified Permissions can examine when evaluating the policies.
|
575
|
+
#
|
576
|
+
# You can't include principals in this parameter, only resource and
|
577
|
+
# action entities. This parameter can't include any entities of a type
|
578
|
+
# that matches the user or group entity types that you defined in your
|
579
|
+
# identity source.
|
580
|
+
#
|
581
|
+
# * The `BatchIsAuthorizedWithToken` operation takes principal
|
582
|
+
# attributes from <b> <i>only</i> </b> the `identityToken` or
|
583
|
+
# `accessToken` passed to the operation.
|
584
|
+
#
|
585
|
+
# * For action entities, you can include only their `Identifier` and
|
586
|
+
# `EntityType`.
|
587
|
+
#
|
588
|
+
# @option params [required, Array<Types::BatchIsAuthorizedWithTokenInputItem>] :requests
|
589
|
+
# An array of up to 30 requests that you want Verified Permissions to
|
590
|
+
# evaluate.
|
591
|
+
#
|
592
|
+
# @return [Types::BatchIsAuthorizedWithTokenOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
593
|
+
#
|
594
|
+
# * {Types::BatchIsAuthorizedWithTokenOutput#principal #principal} => Types::EntityIdentifier
|
595
|
+
# * {Types::BatchIsAuthorizedWithTokenOutput#results #results} => Array<Types::BatchIsAuthorizedWithTokenOutputItem>
|
596
|
+
#
|
597
|
+
# @example Request syntax with placeholder values
|
598
|
+
#
|
599
|
+
# resp = client.batch_is_authorized_with_token({
|
600
|
+
# policy_store_id: "PolicyStoreId", # required
|
601
|
+
# identity_token: "Token",
|
602
|
+
# access_token: "Token",
|
603
|
+
# entities: {
|
604
|
+
# entity_list: [
|
605
|
+
# {
|
606
|
+
# identifier: { # required
|
607
|
+
# entity_type: "EntityType", # required
|
608
|
+
# entity_id: "EntityId", # required
|
609
|
+
# },
|
610
|
+
# attributes: {
|
611
|
+
# "String" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
|
612
|
+
# },
|
613
|
+
# parents: [
|
614
|
+
# {
|
615
|
+
# entity_type: "EntityType", # required
|
616
|
+
# entity_id: "EntityId", # required
|
617
|
+
# },
|
618
|
+
# ],
|
619
|
+
# },
|
620
|
+
# ],
|
621
|
+
# },
|
622
|
+
# requests: [ # required
|
623
|
+
# {
|
624
|
+
# action: {
|
625
|
+
# action_type: "ActionType", # required
|
626
|
+
# action_id: "ActionId", # required
|
627
|
+
# },
|
628
|
+
# resource: {
|
629
|
+
# entity_type: "EntityType", # required
|
630
|
+
# entity_id: "EntityId", # required
|
631
|
+
# },
|
632
|
+
# context: {
|
633
|
+
# context_map: {
|
634
|
+
# "String" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
|
635
|
+
# },
|
636
|
+
# },
|
637
|
+
# },
|
638
|
+
# ],
|
639
|
+
# })
|
640
|
+
#
|
641
|
+
# @example Response structure
|
642
|
+
#
|
643
|
+
# resp.principal.entity_type #=> String
|
644
|
+
# resp.principal.entity_id #=> String
|
645
|
+
# resp.results #=> Array
|
646
|
+
# resp.results[0].request.action.action_type #=> String
|
647
|
+
# resp.results[0].request.action.action_id #=> String
|
648
|
+
# resp.results[0].request.resource.entity_type #=> String
|
649
|
+
# resp.results[0].request.resource.entity_id #=> String
|
650
|
+
# resp.results[0].request.context.context_map #=> Hash
|
651
|
+
# resp.results[0].request.context.context_map["String"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
|
652
|
+
# resp.results[0].decision #=> String, one of "ALLOW", "DENY"
|
653
|
+
# resp.results[0].determining_policies #=> Array
|
654
|
+
# resp.results[0].determining_policies[0].policy_id #=> String
|
655
|
+
# resp.results[0].errors #=> Array
|
656
|
+
# resp.results[0].errors[0].error_description #=> String
|
657
|
+
#
|
658
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/BatchIsAuthorizedWithToken AWS API Documentation
|
659
|
+
#
|
660
|
+
# @overload batch_is_authorized_with_token(params = {})
|
661
|
+
# @param [Hash] params ({})
|
662
|
+
def batch_is_authorized_with_token(params = {}, options = {})
|
663
|
+
req = build_request(:batch_is_authorized_with_token, params)
|
664
|
+
req.send_request(options)
|
665
|
+
end
|
666
|
+
|
521
667
|
# Creates a reference to an Amazon Cognito user pool as an external
|
522
668
|
# identity provider (IdP).
|
523
669
|
#
|
@@ -1421,14 +1567,6 @@ module Aws::VerifiedPermissions
|
|
1421
1567
|
# `Allow` or `Deny`, along with a list of the policies that resulted in
|
1422
1568
|
# the decision.
|
1423
1569
|
#
|
1424
|
-
# If you specify the `identityToken` parameter, then this operation
|
1425
|
-
# derives the principal from that token. You must not also include that
|
1426
|
-
# principal in the `entities` parameter or the operation fails and
|
1427
|
-
# reports a conflict between the two entity sources.
|
1428
|
-
#
|
1429
|
-
# If you provide only an `accessToken`, then you can include the entity
|
1430
|
-
# as part of the `entities` parameter to provide additional attributes.
|
1431
|
-
#
|
1432
1570
|
# At this time, Verified Permissions accepts tokens from only Amazon
|
1433
1571
|
# Cognito.
|
1434
1572
|
#
|
@@ -1482,8 +1620,10 @@ module Aws::VerifiedPermissions
|
|
1482
1620
|
# Specifies the list of resources and their associated attributes that
|
1483
1621
|
# Verified Permissions can examine when evaluating the policies.
|
1484
1622
|
#
|
1485
|
-
#
|
1486
|
-
#
|
1623
|
+
# You can't include principals in this parameter, only resource and
|
1624
|
+
# action entities. This parameter can't include any entities of a type
|
1625
|
+
# that matches the user or group entity types that you defined in your
|
1626
|
+
# identity source.
|
1487
1627
|
#
|
1488
1628
|
# * The `IsAuthorizedWithToken` operation takes principal attributes
|
1489
1629
|
# from <b> <i>only</i> </b> the `identityToken` or `accessToken`
|
@@ -1492,8 +1632,6 @@ module Aws::VerifiedPermissions
|
|
1492
1632
|
# * For action entities, you can include only their `Identifier` and
|
1493
1633
|
# `EntityType`.
|
1494
1634
|
#
|
1495
|
-
# </note>
|
1496
|
-
#
|
1497
1635
|
# @return [Types::IsAuthorizedWithTokenOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1498
1636
|
#
|
1499
1637
|
# * {Types::IsAuthorizedWithTokenOutput#decision #decision} => String
|
@@ -2256,7 +2394,7 @@ module Aws::VerifiedPermissions
|
|
2256
2394
|
params: params,
|
2257
2395
|
config: config)
|
2258
2396
|
context[:gem_name] = 'aws-sdk-verifiedpermissions'
|
2259
|
-
context[:gem_version] = '1.
|
2397
|
+
context[:gem_version] = '1.19.0'
|
2260
2398
|
Seahorse::Client::Request.new(handlers, context)
|
2261
2399
|
end
|
2262
2400
|
|
@@ -24,6 +24,12 @@ module Aws::VerifiedPermissions
|
|
24
24
|
BatchIsAuthorizedOutput = Shapes::StructureShape.new(name: 'BatchIsAuthorizedOutput')
|
25
25
|
BatchIsAuthorizedOutputItem = Shapes::StructureShape.new(name: 'BatchIsAuthorizedOutputItem')
|
26
26
|
BatchIsAuthorizedOutputList = Shapes::ListShape.new(name: 'BatchIsAuthorizedOutputList')
|
27
|
+
BatchIsAuthorizedWithTokenInput = Shapes::StructureShape.new(name: 'BatchIsAuthorizedWithTokenInput')
|
28
|
+
BatchIsAuthorizedWithTokenInputItem = Shapes::StructureShape.new(name: 'BatchIsAuthorizedWithTokenInputItem')
|
29
|
+
BatchIsAuthorizedWithTokenInputList = Shapes::ListShape.new(name: 'BatchIsAuthorizedWithTokenInputList')
|
30
|
+
BatchIsAuthorizedWithTokenOutput = Shapes::StructureShape.new(name: 'BatchIsAuthorizedWithTokenOutput')
|
31
|
+
BatchIsAuthorizedWithTokenOutputItem = Shapes::StructureShape.new(name: 'BatchIsAuthorizedWithTokenOutputItem')
|
32
|
+
BatchIsAuthorizedWithTokenOutputList = Shapes::ListShape.new(name: 'BatchIsAuthorizedWithTokenOutputList')
|
27
33
|
Boolean = Shapes::BooleanShape.new(name: 'Boolean')
|
28
34
|
BooleanAttribute = Shapes::BooleanShape.new(name: 'BooleanAttribute')
|
29
35
|
ClientId = Shapes::StringShape.new(name: 'ClientId')
|
@@ -220,6 +226,32 @@ module Aws::VerifiedPermissions
|
|
220
226
|
|
221
227
|
BatchIsAuthorizedOutputList.member = Shapes::ShapeRef.new(shape: BatchIsAuthorizedOutputItem)
|
222
228
|
|
229
|
+
BatchIsAuthorizedWithTokenInput.add_member(:policy_store_id, Shapes::ShapeRef.new(shape: PolicyStoreId, required: true, location_name: "policyStoreId"))
|
230
|
+
BatchIsAuthorizedWithTokenInput.add_member(:identity_token, Shapes::ShapeRef.new(shape: Token, location_name: "identityToken"))
|
231
|
+
BatchIsAuthorizedWithTokenInput.add_member(:access_token, Shapes::ShapeRef.new(shape: Token, location_name: "accessToken"))
|
232
|
+
BatchIsAuthorizedWithTokenInput.add_member(:entities, Shapes::ShapeRef.new(shape: EntitiesDefinition, location_name: "entities"))
|
233
|
+
BatchIsAuthorizedWithTokenInput.add_member(:requests, Shapes::ShapeRef.new(shape: BatchIsAuthorizedWithTokenInputList, required: true, location_name: "requests"))
|
234
|
+
BatchIsAuthorizedWithTokenInput.struct_class = Types::BatchIsAuthorizedWithTokenInput
|
235
|
+
|
236
|
+
BatchIsAuthorizedWithTokenInputItem.add_member(:action, Shapes::ShapeRef.new(shape: ActionIdentifier, location_name: "action"))
|
237
|
+
BatchIsAuthorizedWithTokenInputItem.add_member(:resource, Shapes::ShapeRef.new(shape: EntityIdentifier, location_name: "resource"))
|
238
|
+
BatchIsAuthorizedWithTokenInputItem.add_member(:context, Shapes::ShapeRef.new(shape: ContextDefinition, location_name: "context"))
|
239
|
+
BatchIsAuthorizedWithTokenInputItem.struct_class = Types::BatchIsAuthorizedWithTokenInputItem
|
240
|
+
|
241
|
+
BatchIsAuthorizedWithTokenInputList.member = Shapes::ShapeRef.new(shape: BatchIsAuthorizedWithTokenInputItem)
|
242
|
+
|
243
|
+
BatchIsAuthorizedWithTokenOutput.add_member(:principal, Shapes::ShapeRef.new(shape: EntityIdentifier, location_name: "principal"))
|
244
|
+
BatchIsAuthorizedWithTokenOutput.add_member(:results, Shapes::ShapeRef.new(shape: BatchIsAuthorizedWithTokenOutputList, required: true, location_name: "results"))
|
245
|
+
BatchIsAuthorizedWithTokenOutput.struct_class = Types::BatchIsAuthorizedWithTokenOutput
|
246
|
+
|
247
|
+
BatchIsAuthorizedWithTokenOutputItem.add_member(:request, Shapes::ShapeRef.new(shape: BatchIsAuthorizedWithTokenInputItem, required: true, location_name: "request"))
|
248
|
+
BatchIsAuthorizedWithTokenOutputItem.add_member(:decision, Shapes::ShapeRef.new(shape: Decision, required: true, location_name: "decision"))
|
249
|
+
BatchIsAuthorizedWithTokenOutputItem.add_member(:determining_policies, Shapes::ShapeRef.new(shape: DeterminingPolicyList, required: true, location_name: "determiningPolicies"))
|
250
|
+
BatchIsAuthorizedWithTokenOutputItem.add_member(:errors, Shapes::ShapeRef.new(shape: EvaluationErrorList, required: true, location_name: "errors"))
|
251
|
+
BatchIsAuthorizedWithTokenOutputItem.struct_class = Types::BatchIsAuthorizedWithTokenOutputItem
|
252
|
+
|
253
|
+
BatchIsAuthorizedWithTokenOutputList.member = Shapes::ShapeRef.new(shape: BatchIsAuthorizedWithTokenOutputItem)
|
254
|
+
|
223
255
|
ClientIds.member = Shapes::ShapeRef.new(shape: ClientId)
|
224
256
|
|
225
257
|
CognitoGroupConfiguration.add_member(:group_entity_type, Shapes::ShapeRef.new(shape: GroupEntityType, required: true, location_name: "groupEntityType"))
|
@@ -797,6 +829,19 @@ module Aws::VerifiedPermissions
|
|
797
829
|
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
798
830
|
end)
|
799
831
|
|
832
|
+
api.add_operation(:batch_is_authorized_with_token, Seahorse::Model::Operation.new.tap do |o|
|
833
|
+
o.name = "BatchIsAuthorizedWithToken"
|
834
|
+
o.http_method = "POST"
|
835
|
+
o.http_request_uri = "/"
|
836
|
+
o.input = Shapes::ShapeRef.new(shape: BatchIsAuthorizedWithTokenInput)
|
837
|
+
o.output = Shapes::ShapeRef.new(shape: BatchIsAuthorizedWithTokenOutput)
|
838
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
839
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
840
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
841
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
842
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
843
|
+
end)
|
844
|
+
|
800
845
|
api.add_operation(:create_identity_source, Seahorse::Model::Operation.new.tap do |o|
|
801
846
|
o.name = "CreateIdentitySource"
|
802
847
|
o.http_method = "POST"
|
@@ -26,6 +26,20 @@ module Aws::VerifiedPermissions
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
class BatchIsAuthorizedWithToken
|
30
|
+
def self.build(context)
|
31
|
+
unless context.config.regional_endpoint
|
32
|
+
endpoint = context.config.endpoint.to_s
|
33
|
+
end
|
34
|
+
Aws::VerifiedPermissions::EndpointParameters.new(
|
35
|
+
region: context.config.region,
|
36
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
37
|
+
use_fips: context.config.use_fips_endpoint,
|
38
|
+
endpoint: endpoint,
|
39
|
+
)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
29
43
|
class CreateIdentitySource
|
30
44
|
def self.build(context)
|
31
45
|
unless context.config.regional_endpoint
|
@@ -60,6 +60,8 @@ module Aws::VerifiedPermissions
|
|
60
60
|
case context.operation_name
|
61
61
|
when :batch_is_authorized
|
62
62
|
Aws::VerifiedPermissions::Endpoints::BatchIsAuthorized.build(context)
|
63
|
+
when :batch_is_authorized_with_token
|
64
|
+
Aws::VerifiedPermissions::Endpoints::BatchIsAuthorizedWithToken.build(context)
|
63
65
|
when :create_identity_source
|
64
66
|
Aws::VerifiedPermissions::Endpoints::CreateIdentitySource.build(context)
|
65
67
|
when :create_policy
|
@@ -278,8 +278,154 @@ module Aws::VerifiedPermissions
|
|
278
278
|
include Aws::Structure
|
279
279
|
end
|
280
280
|
|
281
|
-
#
|
282
|
-
#
|
281
|
+
# @!attribute [rw] policy_store_id
|
282
|
+
# Specifies the ID of the policy store. Policies in this policy store
|
283
|
+
# will be used to make an authorization decision for the input.
|
284
|
+
# @return [String]
|
285
|
+
#
|
286
|
+
# @!attribute [rw] identity_token
|
287
|
+
# Specifies an identity (ID) token for the principal that you want to
|
288
|
+
# authorize in each request. This token is provided to you by the
|
289
|
+
# identity provider (IdP) associated with the specified identity
|
290
|
+
# source. You must specify either an `accessToken`, an
|
291
|
+
# `identityToken`, or both.
|
292
|
+
#
|
293
|
+
# Must be an ID token. Verified Permissions returns an error if the
|
294
|
+
# `token_use` claim in the submitted token isn't `id`.
|
295
|
+
# @return [String]
|
296
|
+
#
|
297
|
+
# @!attribute [rw] access_token
|
298
|
+
# Specifies an access token for the principal that you want to
|
299
|
+
# authorize in each request. This token is provided to you by the
|
300
|
+
# identity provider (IdP) associated with the specified identity
|
301
|
+
# source. You must specify either an `accessToken`, an
|
302
|
+
# `identityToken`, or both.
|
303
|
+
#
|
304
|
+
# Must be an access token. Verified Permissions returns an error if
|
305
|
+
# the `token_use` claim in the submitted token isn't `access`.
|
306
|
+
# @return [String]
|
307
|
+
#
|
308
|
+
# @!attribute [rw] entities
|
309
|
+
# Specifies the list of resources and their associated attributes that
|
310
|
+
# Verified Permissions can examine when evaluating the policies.
|
311
|
+
#
|
312
|
+
# You can't include principals in this parameter, only resource and
|
313
|
+
# action entities. This parameter can't include any entities of a
|
314
|
+
# type that matches the user or group entity types that you defined in
|
315
|
+
# your identity source.
|
316
|
+
#
|
317
|
+
# * The `BatchIsAuthorizedWithToken` operation takes principal
|
318
|
+
# attributes from <b> <i>only</i> </b> the `identityToken` or
|
319
|
+
# `accessToken` passed to the operation.
|
320
|
+
#
|
321
|
+
# * For action entities, you can include only their `Identifier` and
|
322
|
+
# `EntityType`.
|
323
|
+
# @return [Types::EntitiesDefinition]
|
324
|
+
#
|
325
|
+
# @!attribute [rw] requests
|
326
|
+
# An array of up to 30 requests that you want Verified Permissions to
|
327
|
+
# evaluate.
|
328
|
+
# @return [Array<Types::BatchIsAuthorizedWithTokenInputItem>]
|
329
|
+
#
|
330
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/BatchIsAuthorizedWithTokenInput AWS API Documentation
|
331
|
+
#
|
332
|
+
class BatchIsAuthorizedWithTokenInput < Struct.new(
|
333
|
+
:policy_store_id,
|
334
|
+
:identity_token,
|
335
|
+
:access_token,
|
336
|
+
:entities,
|
337
|
+
:requests)
|
338
|
+
SENSITIVE = [:identity_token, :access_token]
|
339
|
+
include Aws::Structure
|
340
|
+
end
|
341
|
+
|
342
|
+
# An authorization request that you include in a
|
343
|
+
# `BatchIsAuthorizedWithToken` API request.
|
344
|
+
#
|
345
|
+
# @!attribute [rw] action
|
346
|
+
# Specifies the requested action to be authorized. For example,
|
347
|
+
# `PhotoFlash::ReadPhoto`.
|
348
|
+
# @return [Types::ActionIdentifier]
|
349
|
+
#
|
350
|
+
# @!attribute [rw] resource
|
351
|
+
# Specifies the resource that you want an authorization decision for.
|
352
|
+
# For example, `PhotoFlash::Photo`.
|
353
|
+
# @return [Types::EntityIdentifier]
|
354
|
+
#
|
355
|
+
# @!attribute [rw] context
|
356
|
+
# Specifies additional context that can be used to make more granular
|
357
|
+
# authorization decisions.
|
358
|
+
# @return [Types::ContextDefinition]
|
359
|
+
#
|
360
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/BatchIsAuthorizedWithTokenInputItem AWS API Documentation
|
361
|
+
#
|
362
|
+
class BatchIsAuthorizedWithTokenInputItem < Struct.new(
|
363
|
+
:action,
|
364
|
+
:resource,
|
365
|
+
:context)
|
366
|
+
SENSITIVE = []
|
367
|
+
include Aws::Structure
|
368
|
+
end
|
369
|
+
|
370
|
+
# @!attribute [rw] principal
|
371
|
+
# The identifier of the principal in the ID or access token.
|
372
|
+
# @return [Types::EntityIdentifier]
|
373
|
+
#
|
374
|
+
# @!attribute [rw] results
|
375
|
+
# A series of `Allow` or `Deny` decisions for each request, and the
|
376
|
+
# policies that produced them.
|
377
|
+
# @return [Array<Types::BatchIsAuthorizedWithTokenOutputItem>]
|
378
|
+
#
|
379
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/BatchIsAuthorizedWithTokenOutput AWS API Documentation
|
380
|
+
#
|
381
|
+
class BatchIsAuthorizedWithTokenOutput < Struct.new(
|
382
|
+
:principal,
|
383
|
+
:results)
|
384
|
+
SENSITIVE = []
|
385
|
+
include Aws::Structure
|
386
|
+
end
|
387
|
+
|
388
|
+
# The decision, based on policy evaluation, from an individual
|
389
|
+
# authorization request in a `BatchIsAuthorizedWithToken` API request.
|
390
|
+
#
|
391
|
+
# @!attribute [rw] request
|
392
|
+
# The authorization request that initiated the decision.
|
393
|
+
# @return [Types::BatchIsAuthorizedWithTokenInputItem]
|
394
|
+
#
|
395
|
+
# @!attribute [rw] decision
|
396
|
+
# An authorization decision that indicates if the authorization
|
397
|
+
# request should be allowed or denied.
|
398
|
+
# @return [String]
|
399
|
+
#
|
400
|
+
# @!attribute [rw] determining_policies
|
401
|
+
# The list of determining policies used to make the authorization
|
402
|
+
# decision. For example, if there are two matching policies, where one
|
403
|
+
# is a forbid and the other is a permit, then the forbid policy will
|
404
|
+
# be the determining policy. In the case of multiple matching permit
|
405
|
+
# policies then there would be multiple determining policies. In the
|
406
|
+
# case that no policies match, and hence the response is DENY, there
|
407
|
+
# would be no determining policies.
|
408
|
+
# @return [Array<Types::DeterminingPolicyItem>]
|
409
|
+
#
|
410
|
+
# @!attribute [rw] errors
|
411
|
+
# Errors that occurred while making an authorization decision. For
|
412
|
+
# example, a policy might reference an entity or attribute that
|
413
|
+
# doesn't exist in the request.
|
414
|
+
# @return [Array<Types::EvaluationErrorItem>]
|
415
|
+
#
|
416
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/BatchIsAuthorizedWithTokenOutputItem AWS API Documentation
|
417
|
+
#
|
418
|
+
class BatchIsAuthorizedWithTokenOutputItem < Struct.new(
|
419
|
+
:request,
|
420
|
+
:decision,
|
421
|
+
:determining_policies,
|
422
|
+
:errors)
|
423
|
+
SENSITIVE = []
|
424
|
+
include Aws::Structure
|
425
|
+
end
|
426
|
+
|
427
|
+
# A list of user groups and entities from an Amazon Cognito user pool
|
428
|
+
# identity source.
|
283
429
|
#
|
284
430
|
# This data type is part of a [CognitoUserPoolConfiguration][1]
|
285
431
|
# structure and is a request parameter in [CreateIdentitySource][2].
|
@@ -302,8 +448,8 @@ module Aws::VerifiedPermissions
|
|
302
448
|
include Aws::Structure
|
303
449
|
end
|
304
450
|
|
305
|
-
#
|
306
|
-
#
|
451
|
+
# A list of user groups and entities from an Amazon Cognito user pool
|
452
|
+
# identity source.
|
307
453
|
#
|
308
454
|
# This data type is part of an [CognitoUserPoolConfigurationDetail][1]
|
309
455
|
# structure and is a response parameter to [GetIdentitySource][2].
|
@@ -326,8 +472,8 @@ module Aws::VerifiedPermissions
|
|
326
472
|
include Aws::Structure
|
327
473
|
end
|
328
474
|
|
329
|
-
#
|
330
|
-
#
|
475
|
+
# A list of user groups and entities from an Amazon Cognito user pool
|
476
|
+
# identity source.
|
331
477
|
#
|
332
478
|
# This data type is part of an [CognitoUserPoolConfigurationItem][1]
|
333
479
|
# structure and is a response parameter to [ListIdentitySources][2].
|
@@ -359,8 +505,7 @@ module Aws::VerifiedPermissions
|
|
359
505
|
# [CreateIdentitySource][2].
|
360
506
|
#
|
361
507
|
# Example:`"CognitoUserPoolConfiguration":\{"UserPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","ClientIds":
|
362
|
-
# ["a1b2c3d4e5f6g7h8i9j0kalbmc"]
|
363
|
-
# \{"groupEntityType": "MyCorp::Group"\}\}`
|
508
|
+
# ["a1b2c3d4e5f6g7h8i9j0kalbmc"]\}`
|
364
509
|
#
|
365
510
|
#
|
366
511
|
#
|
@@ -387,8 +532,8 @@ module Aws::VerifiedPermissions
|
|
387
532
|
# @return [Array<String>]
|
388
533
|
#
|
389
534
|
# @!attribute [rw] group_configuration
|
390
|
-
# The
|
391
|
-
#
|
535
|
+
# The configuration of the user groups from an Amazon Cognito user
|
536
|
+
# pool identity source.
|
392
537
|
# @return [Types::CognitoGroupConfiguration]
|
393
538
|
#
|
394
539
|
# @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/CognitoUserPoolConfiguration AWS API Documentation
|
@@ -410,8 +555,7 @@ module Aws::VerifiedPermissions
|
|
410
555
|
# [GetIdentitySource][2].
|
411
556
|
#
|
412
557
|
# Example:`"CognitoUserPoolConfiguration":\{"UserPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","ClientIds":
|
413
|
-
# ["a1b2c3d4e5f6g7h8i9j0kalbmc"]
|
414
|
-
# \{"groupEntityType": "MyCorp::Group"\}\}`
|
558
|
+
# ["a1b2c3d4e5f6g7h8i9j0kalbmc"]\}`
|
415
559
|
#
|
416
560
|
#
|
417
561
|
#
|
@@ -446,8 +590,8 @@ module Aws::VerifiedPermissions
|
|
446
590
|
# @return [String]
|
447
591
|
#
|
448
592
|
# @!attribute [rw] group_configuration
|
449
|
-
# The
|
450
|
-
#
|
593
|
+
# The configuration of the user groups from an Amazon Cognito user
|
594
|
+
# pool identity source.
|
451
595
|
# @return [Types::CognitoGroupConfigurationDetail]
|
452
596
|
#
|
453
597
|
# @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/CognitoUserPoolConfigurationDetail AWS API Documentation
|
@@ -470,8 +614,7 @@ module Aws::VerifiedPermissions
|
|
470
614
|
# [ListIdentitySources][2].
|
471
615
|
#
|
472
616
|
# Example:`"CognitoUserPoolConfiguration":\{"UserPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","ClientIds":
|
473
|
-
# ["a1b2c3d4e5f6g7h8i9j0kalbmc"]
|
474
|
-
# \{"groupEntityType": "MyCorp::Group"\}\}`
|
617
|
+
# ["a1b2c3d4e5f6g7h8i9j0kalbmc"]\}`
|
475
618
|
#
|
476
619
|
#
|
477
620
|
#
|
@@ -506,8 +649,8 @@ module Aws::VerifiedPermissions
|
|
506
649
|
# @return [String]
|
507
650
|
#
|
508
651
|
# @!attribute [rw] group_configuration
|
509
|
-
# The
|
510
|
-
#
|
652
|
+
# The configuration of the user groups from an Amazon Cognito user
|
653
|
+
# pool identity source.
|
511
654
|
# @return [Types::CognitoGroupConfigurationItem]
|
512
655
|
#
|
513
656
|
# @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/CognitoUserPoolConfigurationItem AWS API Documentation
|
@@ -527,7 +670,7 @@ module Aws::VerifiedPermissions
|
|
527
670
|
# <note markdown="1"> At this time, the only valid member of this structure is a Amazon
|
528
671
|
# Cognito user pool configuration.
|
529
672
|
#
|
530
|
-
#
|
673
|
+
# You must specify a `userPoolArn`, and optionally, a `ClientId`.
|
531
674
|
#
|
532
675
|
# </note>
|
533
676
|
#
|
@@ -584,8 +727,7 @@ module Aws::VerifiedPermissions
|
|
584
727
|
# Contains configuration details of a Amazon Cognito user pool that
|
585
728
|
# Verified Permissions can use as a source of authenticated identities
|
586
729
|
# as entities. It specifies the [Amazon Resource Name (ARN)][1] of a
|
587
|
-
# Amazon Cognito user pool
|
588
|
-
# assign to user groups, and one or more application client IDs.
|
730
|
+
# Amazon Cognito user pool and one or more application client IDs.
|
589
731
|
#
|
590
732
|
# Example:
|
591
733
|
# `"configuration":\{"cognitoUserPoolConfiguration":\{"userPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","clientIds":
|
@@ -625,8 +767,7 @@ module Aws::VerifiedPermissions
|
|
625
767
|
# Contains configuration details of a Amazon Cognito user pool that
|
626
768
|
# Verified Permissions can use as a source of authenticated identities
|
627
769
|
# as entities. It specifies the [Amazon Resource Name (ARN)][1] of a
|
628
|
-
# Amazon Cognito user pool
|
629
|
-
# assign to user groups, and one or more application client IDs.
|
770
|
+
# Amazon Cognito user pool and one or more application client IDs.
|
630
771
|
#
|
631
772
|
# Example:
|
632
773
|
# `"configuration":\{"cognitoUserPoolConfiguration":\{"userPoolArn":"arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_1a2b3c4d5","clientIds":
|
@@ -1950,8 +2091,10 @@ module Aws::VerifiedPermissions
|
|
1950
2091
|
# Specifies the list of resources and their associated attributes that
|
1951
2092
|
# Verified Permissions can examine when evaluating the policies.
|
1952
2093
|
#
|
1953
|
-
#
|
1954
|
-
#
|
2094
|
+
# You can't include principals in this parameter, only resource and
|
2095
|
+
# action entities. This parameter can't include any entities of a
|
2096
|
+
# type that matches the user or group entity types that you defined in
|
2097
|
+
# your identity source.
|
1955
2098
|
#
|
1956
2099
|
# * The `IsAuthorizedWithToken` operation takes principal attributes
|
1957
2100
|
# from <b> <i>only</i> </b> the `identityToken` or `accessToken`
|
@@ -1959,8 +2102,6 @@ module Aws::VerifiedPermissions
|
|
1959
2102
|
#
|
1960
2103
|
# * For action entities, you can include only their `Identifier` and
|
1961
2104
|
# `EntityType`.
|
1962
|
-
#
|
1963
|
-
# </note>
|
1964
2105
|
# @return [Types::EntitiesDefinition]
|
1965
2106
|
#
|
1966
2107
|
# @see http://docs.aws.amazon.com/goto/WebAPI/verifiedpermissions-2021-12-01/IsAuthorizedWithTokenInput AWS API Documentation
|
@@ -2926,8 +3067,8 @@ module Aws::VerifiedPermissions
|
|
2926
3067
|
include Aws::Structure
|
2927
3068
|
end
|
2928
3069
|
|
2929
|
-
#
|
2930
|
-
# source.
|
3070
|
+
# A list of user groups and entities from an Amazon Cognito user pool
|
3071
|
+
# identity source.
|
2931
3072
|
#
|
2932
3073
|
# @!attribute [rw] group_entity_type
|
2933
3074
|
# The name of the schema entity type that's mapped to the user pool
|
data/sig/client.rbs
CHANGED
@@ -119,6 +119,51 @@ module Aws
|
|
119
119
|
) -> _BatchIsAuthorizedResponseSuccess
|
120
120
|
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _BatchIsAuthorizedResponseSuccess
|
121
121
|
|
122
|
+
interface _BatchIsAuthorizedWithTokenResponseSuccess
|
123
|
+
include ::Seahorse::Client::_ResponseSuccess[Types::BatchIsAuthorizedWithTokenOutput]
|
124
|
+
def principal: () -> Types::EntityIdentifier
|
125
|
+
def results: () -> ::Array[Types::BatchIsAuthorizedWithTokenOutputItem]
|
126
|
+
end
|
127
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/VerifiedPermissions/Client.html#batch_is_authorized_with_token-instance_method
|
128
|
+
def batch_is_authorized_with_token: (
|
129
|
+
policy_store_id: ::String,
|
130
|
+
?identity_token: ::String,
|
131
|
+
?access_token: ::String,
|
132
|
+
?entities: {
|
133
|
+
entity_list: Array[
|
134
|
+
{
|
135
|
+
identifier: {
|
136
|
+
entity_type: ::String,
|
137
|
+
entity_id: ::String
|
138
|
+
},
|
139
|
+
attributes: Hash[::String, untyped]?,
|
140
|
+
parents: Array[
|
141
|
+
{
|
142
|
+
entity_type: ::String,
|
143
|
+
entity_id: ::String
|
144
|
+
},
|
145
|
+
]?
|
146
|
+
},
|
147
|
+
]?
|
148
|
+
},
|
149
|
+
requests: Array[
|
150
|
+
{
|
151
|
+
action: {
|
152
|
+
action_type: ::String,
|
153
|
+
action_id: ::String
|
154
|
+
}?,
|
155
|
+
resource: {
|
156
|
+
entity_type: ::String,
|
157
|
+
entity_id: ::String
|
158
|
+
}?,
|
159
|
+
context: {
|
160
|
+
context_map: Hash[::String, untyped]?
|
161
|
+
}?
|
162
|
+
},
|
163
|
+
]
|
164
|
+
) -> _BatchIsAuthorizedWithTokenResponseSuccess
|
165
|
+
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _BatchIsAuthorizedWithTokenResponseSuccess
|
166
|
+
|
122
167
|
interface _CreateIdentitySourceResponseSuccess
|
123
168
|
include ::Seahorse::Client::_ResponseSuccess[Types::CreateIdentitySourceOutput]
|
124
169
|
def created_date: () -> ::Time
|
data/sig/types.rbs
CHANGED
@@ -73,6 +73,36 @@ module Aws::VerifiedPermissions
|
|
73
73
|
SENSITIVE: []
|
74
74
|
end
|
75
75
|
|
76
|
+
class BatchIsAuthorizedWithTokenInput
|
77
|
+
attr_accessor policy_store_id: ::String
|
78
|
+
attr_accessor identity_token: ::String
|
79
|
+
attr_accessor access_token: ::String
|
80
|
+
attr_accessor entities: Types::EntitiesDefinition
|
81
|
+
attr_accessor requests: ::Array[Types::BatchIsAuthorizedWithTokenInputItem]
|
82
|
+
SENSITIVE: [:identity_token, :access_token]
|
83
|
+
end
|
84
|
+
|
85
|
+
class BatchIsAuthorizedWithTokenInputItem
|
86
|
+
attr_accessor action: Types::ActionIdentifier
|
87
|
+
attr_accessor resource: Types::EntityIdentifier
|
88
|
+
attr_accessor context: Types::ContextDefinition
|
89
|
+
SENSITIVE: []
|
90
|
+
end
|
91
|
+
|
92
|
+
class BatchIsAuthorizedWithTokenOutput
|
93
|
+
attr_accessor principal: Types::EntityIdentifier
|
94
|
+
attr_accessor results: ::Array[Types::BatchIsAuthorizedWithTokenOutputItem]
|
95
|
+
SENSITIVE: []
|
96
|
+
end
|
97
|
+
|
98
|
+
class BatchIsAuthorizedWithTokenOutputItem
|
99
|
+
attr_accessor request: Types::BatchIsAuthorizedWithTokenInputItem
|
100
|
+
attr_accessor decision: ("ALLOW" | "DENY")
|
101
|
+
attr_accessor determining_policies: ::Array[Types::DeterminingPolicyItem]
|
102
|
+
attr_accessor errors: ::Array[Types::EvaluationErrorItem]
|
103
|
+
SENSITIVE: []
|
104
|
+
end
|
105
|
+
|
76
106
|
class CognitoGroupConfiguration
|
77
107
|
attr_accessor group_entity_type: ::String
|
78
108
|
SENSITIVE: [:group_entity_type]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-verifiedpermissions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|