Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.2.0 #1355

Open
wants to merge 873 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
873 commits
Select commit Hold shift + click to select a range
44b80cd
add/rename vars for docker rel
Jul 24, 2023
368ee81
pass through stanchion_utils:save_user errors
Jul 24, 2023
933deb8
make wait_for_process wait for a more meaningful process
Jul 24, 2023
4c8dc26
bump deps in rebar.docker.config, too
Jul 24, 2023
6c76926
upgrade to rebar3.22
Jul 24, 2023
2c7c97b
upgrade to rebar3.22
Jul 24, 2023
92a8d03
make it clear we do USE_NODETOOL (to have io:format do its job via rpc)
Jul 25, 2023
a2a4daa
mind those booleans in get_usage
Jul 25, 2023
72552d6
Merge branch 'hmmr/develop/saml' of github.com:TI-Tokyo/riak_cs into …
Jul 25, 2023
f2b48af
upgrade to rebar3.22, again
Jul 25, 2023
df232c1
update rebar.lock
Jul 25, 2023
a242e46
convert access/storage stats to use arn for key & to use jsx
Jul 25, 2023
5111259
fixups
Jul 26, 2023
45d2827
don't 500 at anon requests
Jul 26, 2023
3220b52
export get_cs_user
Jul 26, 2023
e04ae5c
eradicating traces of riak_cs_gc:timestamp
Jul 26, 2023
4690e03
mochijson2 stragglers
Jul 27, 2023
74b2f56
misc fixes of lesser importance
Jul 27, 2023
f1b2331
fix aws_response:error_resource for curl requests (to /riak-cs/thing)
Jul 27, 2023
fb89006
bring back rcx_web_context.admin_access, unbreak wm_usage
Jul 30, 2023
4e86a63
traces of dtrace
Jul 30, 2023
5c838a6
due diligence when doing policy eval in bucket_access_authorize_helper
Jul 31, 2023
26e4b6f
fetch_and_cache_admin_creds now correctly finds user by key_id
Jul 31, 2023
a4175a2
explicitly grant access when bucket has no policies to a user who has…
Jul 31, 2023
d5b0123
incorporate riak_cs_multibag app
Jul 31, 2023
0fe101f
spell bucket_versioning correctly; register with make_s3_action
Aug 1, 2023
64cf62b
Merge branch 'hmmr/develop/saml' of github.com:TI-Tokyo/riak_cs into …
Aug 1, 2023
06974bd
drop unused get/save_user fromm riak_client
Aug 1, 2023
e49c234
make riak-cs stop print "ok", like riak does
Aug 1, 2023
4b1f9cf
mention riak_cs_multibag in relx apps
Aug 1, 2023
e894d68
pkg touch-ups
Aug 1, 2023
8aa3844
use riak_cs_riak_client:get_bucket, for precious side effects in mult…
Aug 1, 2023
7df10ed
don't double-check for multibag setup
Aug 1, 2023
92d6752
explicit exit 0 in riak-cs-supercluster on reaching end of script
Aug 1, 2023
c9e8f75
tweak stanchion migration checks
Aug 2, 2023
4c237f0
merge acl.hrl into aws_api.hrl
Aug 3, 2023
0db58e5
accept all valid principals
Aug 3, 2023
cbbeb38
try to make policy vs iam_policy distinction clearer & rename some re…
Aug 3, 2023
7412f8e
fix eunit tests complile errors
Aug 3, 2023
86a225a
fixups for previous commits
Aug 3, 2023
de9d806
drop test for list_objects_fsm (deleted, in favor of _fsm_v2)
Aug 3, 2023
4b62026
declutter policy_from_json
Aug 3, 2023
8031d88
debug logging tweaks
Aug 3, 2023
7c64e97
brushing up unit tests wip
Aug 7, 2023
d249144
all eunit tests great again
Aug 7, 2023
4b877c1
more accurate treatment of ACLs with ID and Email
Aug 7, 2023
abbdd05
even more accurate treatment of ACLs with ID and Email
Aug 7, 2023
2a45741
use jsx to prettify json instead of own code
Aug 8, 2023
08f7009
thank you dialyzer
Aug 9, 2023
2520d19
ensure compatibility, in part
Aug 10, 2023
0697931
try to read 3.1 user by KeyId
Aug 10, 2023
918c4e7
emend RELEASE-NOTES
Aug 10, 2023
ef2bc40
let's go erlang:25 in our Dockerfile
Aug 10, 2023
3143b19
prepare for packaging
Aug 10, 2023
5ac03cb
extra work to ensure upgradability
Aug 11, 2023
e3d99e8
s/canonical_id/id/ in rcs_user_v3
Aug 12, 2023
9c7bfc7
update records more carefully when reading objects written by 3.1
Aug 12, 2023
48ae98c
when readin admin user saved by 3.1, try getting it by key_id
Aug 12, 2023
544d35b
when reading pre-3.2 admin user, convert and save, with policy
Aug 13, 2023
ece5ed7
pre-3.2 object upgrade regressions big and small
Aug 14, 2023
dfcff2b
when reading 3.1 admin, create and attach admin policy
Aug 14, 2023
96ee072
more explicitly allow admin to access objects
Aug 14, 2023
84b281e
clean up tmp dirs after eunit test
Aug 14, 2023
da7861b
canonical_id -> id in tests
Aug 15, 2023
a438a3e
remove a dtrace survivor
Aug 15, 2023
391ccae
try to look up 3.1 user's RObj in stanchion_utils:update_user`
Aug 15, 2023
4f8a844
run resolve_buckets on updated user
Aug 15, 2023
8939933
list_to_binary hiccup in update_bucket
Aug 15, 2023
330de44
one case where access_log_handler wasn't called
Aug 15, 2023
2b2193a
always convert to calendar universal time
Aug 15, 2023
93942f9
dialyzer says so but it's debatable
Aug 15, 2023
31b449a
fix up 96ee07233d7c7
Aug 15, 2023
8f03c66
fix up 93942f90f017c
Aug 15, 2023
b024a68
fix up 4f8a8449916a3
Aug 15, 2023
2c3b4fd
more record upgrade fixups
Aug 16, 2023
848621b
use modern sup_flags and child_specs
Aug 16, 2023
2d26e99
complete 8f03c66bb37d4
Aug 16, 2023
46a863e
multipart maifests need to be upgraded, too
Aug 16, 2023
ebd082d
multipart maifests need to be upgraded, too
Aug 16, 2023
c651119
spelling fix
Aug 17, 2023
2c2a89b
upgrade_acl_record where it should be
Aug 18, 2023
f940e5a
misc enhancements and trivia
Aug 18, 2023
0250228
Merge branch 'hmmr/develop/saml' of github.com:TI-Tokyo/riak_cs into …
Aug 19, 2023
242a1b1
case of two User variables borking the matching pattern
Aug 19, 2023
69581b5
use in schema, like in riak
Aug 21, 2023
b6381be
explicitly use python3 in create-admin
Aug 21, 2023
69695fd
Revert "use in schema, like in riak"
Aug 21, 2023
612c418
crash hard if no riak connection at startup
Aug 21, 2023
d4e2a59
Merge branch 'hmmr/develop/saml' of github.com:TI-Tokyo/riak_cs into …
Aug 21, 2023
c73fe0b
update GH CI (drop erlang22, 23, add 25)
Aug 22, 2023
c557027
update RELEASE-NOTES
Aug 22, 2023
7c66636
squelch warning abt unreachable stanchion, harmless, occurs on startup
Aug 22, 2023
2473537
have riak-cs-debug write outfile to /home/dev/src/riak_cs
Aug 24, 2023
a6b2d53
fix formatting in RELEASE-NOTES
Aug 26, 2023
37d6d3c
make it build on otp-26
Aug 26, 2023
4a50ba2
set default log level to info for standard release
Aug 27, 2023
4426684
ensure temp sessions properly expire after rcs restart
Aug 29, 2023
6ae4a35
check email and name are present in json posted to /riak-cs/users
Aug 29, 2023
fcef7a3
tweak log messages
Aug 29, 2023
2e151e2
update RELEASE-NOTES for 3.2.1
Aug 30, 2023
ca80f8f
bump release vsn in rebar.config, too
Aug 31, 2023
471bd9e
add rel/pkg/alpine README.md
Sep 1, 2023
5b978a4
Merge tag '3.2.1' into develop
Sep 6, 2023
eaec711
initial import of Elm-based control_ui
Sep 12, 2023
323c122
wip
Sep 13, 2023
a4e3628
purge riak_cs_config of aborted early attempts at SAML integration
Sep 14, 2023
abb2932
pass cs_host and creds as flags, as temp solution (will need to come …
Sep 14, 2023
ecafb20
wip
Sep 14, 2023
26c3ee8
wip
Sep 17, 2023
e7d06e8
elm sources compiled
Sep 18, 2023
4de5af3
no, rcsc should still be a separate project
Sep 19, 2023
bbf4f5e
specs on local functions
Sep 27, 2023
b881c8e
raise log level of unmatched sigs message
Sep 27, 2023
fa16a08
allow all direct calls to our endpoints (not just /riak-cs)
Sep 27, 2023
14448de
rm riak_cs_wm_control.erl, a left-over
Sep 27, 2023
1a7c822
instruct prepare-riak-for-cs to add_paths
Sep 27, 2023
29190be
skip auth for OPTIONS requests
Sep 27, 2023
df0e9f0
housekeeping
Sep 30, 2023
999b607
add options callbacks, for XHR preflight requests, and set CORS headers
Sep 30, 2023
15c2da1
make create-user more user-friendly
Sep 30, 2023
912ccba
shreds of rscs integration
Oct 2, 2023
c9a5d73
add Access-Control-Allow-Methods to cors_heades/0
Oct 2, 2023
fe1b5a1
postprocess jason:encode results to fix "" occurrences where [] is meant
Oct 4, 2023
8ad2554
specs tidy-up
Oct 4, 2023
0f3d88e
forgot to include permissions_binary in XML export of rcs_user()
Oct 4, 2023
9ca2517
actually attach admin policy in tools/create-admin
Oct 4, 2023
d0b0e0a
specs and log strings
Oct 5, 2023
f87f6af
armor Arn param in DELETE request to stanchion
Oct 5, 2023
bb0b869
DELETE method for wm_user
Oct 8, 2023
7c4ead7
raise log level of handle_validation_response failures
Oct 8, 2023
f0a0af7
wm_iam: no need for makformed_request; don't dup wm_utils facilities
Oct 9, 2023
0c2555e
fix boolean xml value for IsAttachable in Policy
Oct 10, 2023
a109e45
differentiate PUT and POST in wm_user (for update and create, resp)
Oct 11, 2023
a8d03b0
allow PUT in cors headers
Oct 11, 2023
0a6003a
fix postprocessing of user_list result
Oct 12, 2023
1935b9f
unbreak updating user's email
Oct 12, 2023
eb1e791
Dockerfile: use ENTRYPOINT instead of CMD.
pataquets Oct 13, 2023
5e42ff7
Dockerfile: allow specifying build's Erlang version via ARG parameter.
pataquets Oct 13, 2023
31b96ad
dedup forbidden/2 in wm_iam and wm_sts; fix an admin sig check oops
Oct 14, 2023
3833a09
thank you dialyzer for fixing wm_user:accept_xml
Oct 14, 2023
afce44d
more accurate check_required_fields in PUT/POST on /riak-cs/user
Oct 14, 2023
cdf769d
Merge pull request #12 from pataquets/dockerfile--base-image-as-arg
hmmr Oct 14, 2023
d4b3228
fix up 31b96ad3995e
Oct 14, 2023
480bdc8
comment out some debug logging
Oct 17, 2023
2da2243
rename misnamed arg
Oct 17, 2023
7515f03
deal with missing optional Description in IAM calls
Oct 17, 2023
ceca03b
make sure attachment_count is 0 before deleting policy
Oct 18, 2023
0ca65a0
restore 3.2.0 behavior allowing admin to execute IAM calls w/out poli…
Oct 18, 2023
ab096ee
Merge branch 'develop' into hmmr/develop/rcsc-integration
Oct 18, 2023
cb3fcc9
bump next release version
Oct 21, 2023
b0c80dc
/riak-cs/info
Oct 21, 2023
17902e1
thanks dialyzer
Oct 22, 2023
e90097a
update RELEASE-NOTES for 3.2.2
Oct 22, 2023
4e83bad
update internal version to 030202 in pkg/*
Oct 22, 2023
d9e2a4e
update release version in rebar.config, too
Oct 22, 2023
ebbb0b1
update release in rebar.config, too
Oct 22, 2023
82847cd
fix prepare-riak-for-cs to work in both /usr/lib and /usr/lib64 distros
Oct 24, 2023
7ce6a5d
add create-admin etc to lib/riak-cs/bin
Oct 24, 2023
5f71d1d
update RELEASE-NOTES with mention of create-admin
Oct 24, 2023
2d124a4
Merge branch 'hmmr/develop/rcsc-integration' of github.com:TI-Tokyo/r…
Oct 24, 2023
e14356f
rework tools/create-admin as riak-cs admin create-admin-user
Oct 24, 2023
e2c5814
offer to sed the new admin key_id into riak-cs.conf
Oct 25, 2023
3e1c25e
squelch one spurious warning when parsing AssumeRoleWithSAML parameters
Oct 26, 2023
f0398ed
use bash explicitly in riak-cs-admin
Oct 26, 2023
eefdf5e
unbreak installing relx hook in specfile
Oct 27, 2023
261ba1b
mind your quotes when sedding KeyId into riak-cs.conf
Oct 27, 2023
e9b3f5c
does debian bash even handle [[ ?
Oct 27, 2023
5a4239d
refinements to riak-cs admin create-admin-user
Oct 28, 2023
1bfd6b2
don't assume stanchion_server is running when collecting stats
Oct 28, 2023
05d4454
include system_version in /riak-cs/info response
Oct 28, 2023
ba0e67c
eunit test fix
Oct 29, 2023
5512747
enable cors for wm_objects and wm_usage
Nov 14, 2023
c83019b
don't update stats for options requests
Nov 14, 2023
d3a8d6b
add quotes around some entites in logs
Nov 14, 2023
94b379c
add SAMLMetadataDocument in GetSAMLProvider response
Nov 22, 2023
a0a5f46
don't respond with 500 when CreateSAMLProvider comes without tags
Nov 22, 2023
75826fa
cors for /riak-cs/stats
Nov 22, 2023
d1436a2
prevent federated users from creating buckets
Nov 23, 2023
66ad001
fix ListBucket for federated users with appropriate policy
Nov 23, 2023
8477b8c
apply policies_to_verdice to object access path, too
Nov 26, 2023
77be06f
move mapred functions into own module & groundwork for ListTempSessions
Nov 27, 2023
fb45c96
filter out expired temp sessions early
Nov 28, 2023
e5ee318
fix temp session expiration calculation
Nov 28, 2023
cb82669
wm_temp_sessions fixups
Nov 28, 2023
5bdd344
properly export SessionPolicies field in TempSessionList
Nov 29, 2023
6955ca0
ListAttachedRolePolicies
Dec 1, 2023
3d07e7e
fix listing of policies in ListAttachedRolePolicies
Dec 3, 2023
481bb45
prevent double base64 encoding of json fields when updating role
Dec 3, 2023
7f20585
app-level lock-for-update, for AttachRolePolicy & friends
Dec 4, 2023
79a0881
anon user policy eval fixups
Dec 6, 2023
5cc3dd9
correctly interpret handle_bucket_policy_response for Deny
Dec 7, 2023
e336b1f
ensure created users also have unique name (not just email)
Dec 7, 2023
13a5f3d
missing word in an error message
Dec 7, 2023
ecec361
fix the case of AttachedPolicies == [] in ListAttached*PoliciesResponse
Dec 7, 2023
acbc3d0
fix the case of AttachedPolicies /= [] in ListAttached*PoliciesResponse
Dec 9, 2023
8944b04
explicitly allow admin to delete users via /riak-cs/user
Dec 9, 2023
29d51f4
spell out policy/permissions boundary verdict calculation
Dec 11, 2023
d8b9d37
non-owners can indeed touch objects, policy permitting
Dec 11, 2023
64d4145
deny access by disabled user
Dec 12, 2023
aec0221
restore pre-3.2 behaviour, fix xml path, of update_user
Dec 12, 2023
f1e3e26
some log entries, to aid debugging of auth flows
Dec 12, 2023
e549ed7
post-debug clean up
Dec 12, 2023
202ec0b
sneaky typo
Dec 13, 2023
68c424d
explicitly, separately check permissions on src and dst in copy_put
Dec 14, 2023
83b422d
fix rewriting for plain /bucket/key style
Dec 14, 2023
d38ea16
debug logging tweaks
Dec 15, 2023
d229af3
locking fixups
Dec 17, 2023
b17b7ca
Merge branch 'hmmr/develop/disk-usage' of github.com:TI-Tokyo/riak_cs…
Dec 17, 2023
57c3ee0
another rewriting fixup for direct requests
Dec 18, 2023
40b43c6
prepare 3.2.3
Dec 18, 2023
35f1aa9
spell 'notfound' correctly
Dec 29, 2023
025ef45
AssumeRolePolicyDocument is a required parameter to CreateRole
Dec 31, 2023
f43356e
correctly apply PathPrefix when listing objects
Dec 31, 2023
305c0b1
default to PathPrefix = "" when calling List*
Dec 31, 2023
2d3ca4c
tentative groundwork for df call
Jan 6, 2024
f7c3c9c
make prepare-riak-for-cs a little more enterprisey
Jan 11, 2024
475c3c8
generate SBOM
Jan 12, 2024
1439df5
basic df at /riak-cs/info
Jan 13, 2024
3c35b34
extend riak_cs_utils:get_storage_info; update release notes for 3.2.4
Jan 17, 2024
9f635bc
thank you dialyzer
Jan 18, 2024
2d66ef9
update deps and rebar (to 3.22.1); bump version to 3.3.0
Jan 23, 2024
6009942
drop solaris packaging bits
Jan 23, 2024
25c4a75
drop lingering dtrace defines
Jan 29, 2024
0eaba1e
update rebar.lock
Jan 29, 2024
0e191f2
incrementally unclutter and decruft Makefile
Feb 3, 2024
ed40a40
drop gc_paginated_indexes config parameter
Feb 4, 2024
b9229d0
drop 'put_fsm_buffer_size_max' env var that is never used
Feb 27, 2024
22ed72f
drop spec from a local function
Feb 27, 2024
bda7215
complete ed40a40ee1a3
Feb 27, 2024
933ff39
unembrace new features, for compatibility with otp-22
Apr 26, 2024
6f2c890
workaround for passing rpc args on otp-22
Apr 27, 2024
bd97abe
rebar 3.23
Apr 27, 2024
69c0fbe
update release vsn
Apr 27, 2024
f6ac243
Merge branch 'hmmr/develop/3.3.0' into hmmr/3.2.4/otp-22
Apr 27, 2024
fd40803
complete bda72156
Apr 27, 2024
54a5780
speak correct bashese
Apr 27, 2024
e5e2879
update RELEASE-NOTES
Apr 27, 2024
9cd0cd8
prepare-riak-for-cs: always cp cs modules to RIAK_EBIN
Apr 28, 2024
2cc15df
fix list_attached_*_policies wrt PathPrefix == <<>>
Apr 29, 2024
13b18f4
make it 3.2.5
Apr 29, 2024
286f656
typo in prepare-riak-for-cs
Apr 29, 2024
2410187
bash tweaks
Apr 29, 2024
fc3625b
glitch in Makefile
Apr 29, 2024
16d31f3
bump webmachine to otp-27-proofed 1.11.3
May 6, 2024
210b8f9
continue to remove gc_paginated_indexes paramteter
May 6, 2024
e01d7e0
extend continuation type index_opt (in riakc_pb_socket.erl)
May 6, 2024
1efe771
update rebar.lock
May 6, 2024
a948970
explicitly set riak_cs_multibag vsn
May 6, 2024
9a37ac4
add otp 22 and 26 to github CI
May 6, 2024
032d094
touch up RELEASE-NOTES
May 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
even more accurate treatment of ACLs with ID and Email
  • Loading branch information
Andriy Zavada committed Aug 7, 2023
commit abbdd059628f8698b12a58c4a48e4ff00fe00b87
40 changes: 23 additions & 17 deletions apps/riak_cs/src/riak_cs_acl_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ canned_acl(HeaderVal, Owner, BucketOwner) ->
HeaderValue :: string()}],
riak_client()) ->
{ok, acl()} |
{error, invalid_argument} |
{error, unresolved_grant_email}.
{error, invalid_argument | unresolved_grant_email | unresolved_grant_canonical_id}.
specific_acl_grant(Owner, Headers, RcPid) ->
%% TODO: this function is getting a bit long and confusing
Grants = [{HeaderName, parse_grant_header_value(GrantString)}
Expand All @@ -109,7 +108,7 @@ specific_acl_grant(Owner, Headers, RcPid) ->
{ok, ?ACL{owner = Owner,
grants = AclGrants}
};
{error, invalid_argument} = E ->
{error, _} = E ->
E
end
end
Expand All @@ -123,7 +122,7 @@ valid_headers_to_grants(Pairs, RcPid) ->
case promote_failure(MaybeGrants) of
{ok, Grants} ->
{ok, lists:foldl(fun add_grant/2, [], lists:flatten(Grants))};
{error, invalid_argument}=E ->
{error, _} = E ->
E
end.

Expand All @@ -137,7 +136,7 @@ header_to_acl_grants(HeaderName, Grants, RcPid) ->
case promote_failure(MaybeGrantList) of
{ok, GrantList} ->
{ok, lists:foldl(fun add_grant/2, [], GrantList)};
{error, invalid_argument} = E ->
{error, _} = E ->
E
end.

Expand All @@ -148,7 +147,7 @@ header_to_grant(Permission, {id, ID}, RcPid) ->
case name_for_canonical(ID, RcPid) of
{ok, DisplayName} ->
{ok, {{DisplayName, ID}, [Permission]}};
{error, invalid_argument}=E ->
{error, _} = E ->
E
end;
header_to_grant(Permission, {uri, URI}, _RcPid) ->
Expand All @@ -166,8 +165,7 @@ header_to_grant(Permission, {uri, URI}, _RcPid) ->
-type grant_user_identifier() :: 'emailAddress' | 'id' | 'uri'.
-spec parse_grant_header_value(string()) ->
{ok, [{grant_user_identifier(), string()}]} |
{error, invalid_argument} |
{error, unresolved_grant_email}.
{error, invalid_argument | unresolved_grant_email | unresolved_grant_canonical_id}.
parse_grant_header_value(HeaderValue) ->
Mappings = split_header_values_and_strip(HeaderValue),
promote_failure(lists:map(fun parse_mapping/1, Mappings)).
Expand Down Expand Up @@ -443,12 +441,12 @@ name_for_canonical(Id, RcPid) ->
{ok, User?RCS_USER.display_name};
{error, Reason} ->
logger:notice("Failed to find user with canonical_id ~s: ~p", [Id, Reason]),
{error, unresolved_grant_display_name}
{error, unresolved_grant_canonical_id}
end.

user_details_for_canonical(Id, RcPid) ->
{ok, Pbc} = riak_cs_riak_client:master_pbc(RcPid),
case riak_cs_iam:find_user(#{canonical_id => list_to_binary(Id)}, Pbc) of
case riak_cs_iam:find_user(#{canonical_id => Id}, Pbc) of
{ok, {?RCS_USER{email = Email, display_name = DisplayName}, _}} ->
{ok, {Email, DisplayName}};
{error, Reason} ->
Expand Down Expand Up @@ -585,7 +583,7 @@ process_grant([#xmlText{}|RestElements], Grant, Owner, RcPid) ->

%% @doc Process an XML element containing information about
%% an ACL permission grantee.
process_grantee([], G0 = ?ACL_GRANT{grantee = Gee0}, _, RcPid) ->
process_grantee([], G0 = ?ACL_GRANT{grantee = Gee0}, AclOwner, RcPid) ->
case Gee0 of
#{email := Email,
canonical_id := CanonicalId,
Expand Down Expand Up @@ -613,13 +611,21 @@ process_grantee([], G0 = ?ACL_GRANT{grantee = Gee0}, _, RcPid) ->
ER
end;
#{canonical_id := CanonicalId} ->
case user_details_for_canonical(CanonicalId, RcPid) of
{ok, {Email, DisplayName}} ->
G0?ACL_GRANT{grantee = Gee0#{email => Email,
case AclOwner of
#{display_name := DisplayName} = M ->
G0?ACL_GRANT{grantee = Gee0#{email => maps:get(email, M, undefined),
display_name => DisplayName}};
ER ->
ER
end
_ ->
case user_details_for_canonical(CanonicalId, RcPid) of
{ok, {Email, DisplayName}} ->
G0?ACL_GRANT{grantee = Gee0#{email => Email,
display_name => DisplayName}};
ER ->
ER
end
end;
_GroupGrantee when is_atom(_GroupGrantee) ->
G0
end;
process_grantee([#xmlElement{content = [Content],
name = ElementName} |
Expand Down
5 changes: 4 additions & 1 deletion apps/riak_cs/src/riak_cs_aws_response.erl
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ error_message(invalid_argument) -> "Invalid Argument";
error_message({invalid_argument, "x-amz-metadata-directive"}) ->
"Unknown metadata directive.";
error_message(unresolved_grant_email) -> "The e-mail address you provided does not match any account on record.";
error_message(unresolved_grant_canonical_id) -> "The Canonical Id you provided does not match any account on record.";
error_message(invalid_range) -> "The requested range is not satisfiable";
error_message(invalid_bucket_name) -> "The specified bucket is not valid.";
error_message(invalid_part_number) -> "Part number must be an integer between 1 and 10000, inclusive";
Expand Down Expand Up @@ -175,6 +176,7 @@ error_code(invalid_range) -> "InvalidRange";
error_code(invalid_bucket_name) -> "InvalidBucketName";
error_code(invalid_part_number) -> "InvalidArgument";
error_code(unresolved_grant_email) -> "UnresolvableGrantByEmailAddress";
error_code(unresolved_grant_canonical_id) -> "UnresolvableGrantByCanonicalId";
error_code(unexpected_content) -> "UnexpectedContent";
error_code(conflicting_grantee_canonical_id) -> "ConflictingGranteeCanonicalId";
error_code(canned_acl_and_header_grant) -> "InvalidRequest";
Expand Down Expand Up @@ -247,7 +249,8 @@ status_code(no_such_upload) -> 404;
status_code(invalid_digest) -> 400;
status_code(bad_request) -> 400;
status_code(invalid_argument) -> 400;
status_code(unresolved_grant_email) -> 400;
status_code(unresolved_grant_canonical_id) -> 400;
status_code(unresolved_grant_display_name) -> 400;
status_code(invalid_range) -> 416;
status_code(invalid_bucket_name) -> 400;
status_code(invalid_part_number) -> 400;
Expand Down