Ecs 362 Dataaccess
Ecs 362 Dataaccess
March 2023
Rev. 1.2
Contents
Chapter 1: S3................................................................................................................................ 8
Amazon S3 API support in ECS........................................................................................................................................8
S3 API supported and unsupported features............................................................................................................... 8
Behavior where bucket already exists..................................................................................................................... 11
Bucket policy support....................................................................................................................................................... 12
Creating, Assigning, and Managing Bucket Policies............................................................................................ 13
General Xrefs used from all books........................................................................................................................... 13
General Xrefs used from all books........................................................................................................................... 14
Bucket policy scenarios.............................................................................................................................................. 14
Supported bucket policy operations........................................................................................................................15
Supported bucket policy conditions........................................................................................................................ 16
General Xrefs used from all books........................................................................................................................... 17
Object Tagging................................................................................................................................................................... 18
Additional information about Object Tagging........................................................................................................18
Object Tagging operations.........................................................................................................................................19
Manage Object Tagging.............................................................................................................................................20
S3 Object Lock................................................................................................................................................................... 21
Managing Object Lock................................................................................................................................................ 21
Object lifecycle management......................................................................................................................................... 23
S3 Extensions.....................................................................................................................................................................29
Byte range extensions................................................................................................................................................29
Retention....................................................................................................................................................................... 33
File system enabled.....................................................................................................................................................34
S3A support.................................................................................................................................................................. 38
Geo-replication status................................................................................................................................................ 38
Configuring throttle limit during bucket creation................................................................................................ 38
Metadata Search............................................................................................................................................................... 38
Assign metadata index values to a bucket............................................................................................................ 39
Using encryption with metadata search................................................................................................................. 41
Assign metadata to objects using the S3 protocol.............................................................................................. 41
Use metadata search queries................................................................................................................................... 42
Using Metadata Search from the ECS Java SDK .............................................................................................. 46
ECS system metadata and optional attributes..................................................................................................... 47
Metadata search with Tokenization........................................................................................................................47
S3 and Swift Interoperability.......................................................................................................................................... 48
Create and manage secret keys.................................................................................................................................... 49
Create a key for an object user............................................................................................................................... 50
Create an S3 secret key: self-service.................................................................................................................... 50
Authenticating with the S3 service.............................................................................................................................. 53
Authenticating using Signature V2..........................................................................................................................53
Authenticating using Signature V4..........................................................................................................................53
Using s3curl with ECS......................................................................................................................................................54
Use SDKs to access the S3 service..............................................................................................................................54
Using the Java Amazon SDK.................................................................................................................................... 54
ECS Java SDK..............................................................................................................................................................59
2 Contents
ECS S3 error codes........................................................................................................................................................... 61
Hadoop S3A for ECS........................................................................................................................................................ 67
Enabling data2 IP in ECS S3...........................................................................................................................................69
Contents 3
Create Swift users in the ECS Portal.................................................................................................................... 116
OpenStack Version 1 authentication .....................................................................................................................116
OpenStack Version 2 authentication..................................................................................................................... 117
Authentication using ECS Keystone V3 integration...........................................................................................119
Authorization on Container............................................................................................................................................ 121
ECS Swift error codes....................................................................................................................................................122
4 Contents
Accessing the bucket as a file system..................................................................................................................160
Bucket Custom Group ACLs and Default Group.................................................................................................161
Hadoop superuser and supergroup........................................................................................................................ 161
Multi-protocol (cross-head) access......................................................................................................................162
Proxy user....................................................................................................................................................................162
Equivalence user........................................................................................................................................................ 162
Migration from a simple to a Kerberos Hadoop cluster..........................................................................................162
Hadoop Kerberos authentication mode................................................................................................................163
File system interaction................................................................................................................................................... 163
Supported Hadoop applications................................................................................................................................... 163
Integrate a simple Hadoop cluster with ECS HDFS................................................................................................ 164
Install Hortonworks HDP using Ambari.................................................................................................................164
Create a bucket for HDFS using the ECS Portal............................................................................................... 164
Plan the ECS HDFS and Hadoop integration...................................................................................................... 168
Obtain the ECS HDFS installation and support package................................................................................. 168
Deploy the ECS HDFS Client Library.................................................................................................................... 169
Configure ECS client properties.............................................................................................................................169
Set up Hive.................................................................................................................................................................. 170
Verify Hadoop access to ECS..................................................................................................................................171
Secure the bucket......................................................................................................................................................172
Relocate the default file system from HDFS to an ECS bucket.....................................................................172
Integrate a secure Hadoop cluster with ECS HDFS ...............................................................................................173
Plan migration from a simple to a Kerberos cluster...........................................................................................174
Map group names...................................................................................................................................................... 174
Configure ECS nodes with the ECS service principal....................................................................................... 174
Enable Kerberos using Ambari.................................................................................................................................177
Secure the ECS bucket using metadata...............................................................................................................177
Reconfigure ECS client properties........................................................................................................................ 180
Start Hadoop services and verify Hadoop access to ECS.............................................................................. 180
Contents 5
Appendix D: Hadoop core-site xml properties.............................................................................195
Hadoop core-site.xml properties for ECS HDFS......................................................................................................195
Sample core-site.xml for simple authentication mode...................................................................................... 197
Hadoop core-site.xml properties for ECS S3............................................................................................................198
Sample core-site.xml for ECS S3...........................................................................................................................199
6 Contents
Notes, cautions, and warnings
NOTE: A NOTE indicates important information that helps you make better use of your product.
CAUTION: A CAUTION indicates either potential damage to hardware or loss of data and tells you how to avoid
the problem.
WARNING: A WARNING indicates a potential for property damage, personal injury, or death.
© 2023 Dell Inc. or its subsidiaries. All rights reserved. Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries. Other
trademarks may be trademarks of their respective owners.
1
S3
ECS supports the S3 API and the extension, this section provides information about authenticating with the service, and using
the Software Development Kit (SDK) to develop clients to access the service.
Some aspects of bucket addressing and authentication are specific to ECS. To configure an existing application to talk to ECS,
or develop a new application that uses the S3 API to talk to ECS, see the ECS Administration Guide https://www.dell.com/
support/.
Topics:
• Amazon S3 API support in ECS
• S3 API supported and unsupported features
• Bucket policy support
• Object Tagging
• S3 Object Lock
• Object lifecycle management
• S3 Extensions
• Metadata Search
• S3 and Swift Interoperability
• Create and manage secret keys
• Authenticating with the S3 service
• Using s3curl with ECS
• Use SDKs to access the S3 service
• ECS S3 error codes
• Hadoop S3A for ECS
• Enabling data2 IP in ECS S3
8 S3
Supported S3 APIs
Table 2. Supported S3 APIs
Feature Notes
GET Service ECS supports marker and max-keys parameters to enable paging of bucket list.
GET /?marker=<bucket>&limit=<num>
For example:
GET /?marker=mybucket&limit=40
DELETE Bucket -
DELETE Bucket cors -
DELETE Bucket life cycle Only the expiration part is supported in life cycle. Policies that are related to archiving (AWS
Glacier) are not supported. Lifecycle is not supported on file system-enabled buckets.
DELETE Bucket policy -
GET Bucket (List Objects) ● For file system-enabled buckets, / is the only supported delimiter when listing objects in
the bucket.
● ECS returns the list results in UTF-16 binary order.
GET Bucket (List Objects) ● For file system-enabled buckets, / is the only supported delimiter when listing objects in
Version 2 the bucket.
● ECS returns the list results in UTF-16 binary order.
GET Bucket cors -
GET Bucket acl -
GET Bucket life cycle Only the expiration part is supported in life cycle. Policies that are related to archiving (AWS
Glacier) are not supported. Lifecycle is not supported on file system-enabled buckets.
GET Bucket policy -
GET Bucket Object versions -
GET Bucket versioning -
HEAD Bucket -
List Multipart Uploads -
PUT Bucket Where PUT is performed on an existing bucket, refer to Behavior where bucket already exists.
S3 9
Table 2. Supported S3 APIs (continued)
Feature Notes
PUT Object Supports chunked PUT
OPTIONS object -
GET Object tagging -
PUT Object tagging -
DELETE Object tagging -
Initiate Multipart Upload -
Upload Part -
Upload Part - Copy -
Complete Multipart Upload ECS returns an ETag of 00 for this request, which differs from the Amazon S3 response.
Abort Multipart Upload -
List Parts -
PUT Bucket Object Lock -
GET Bucket Object Lock -
NOTE:
● Creation of buckets using names with fewer than three characters fails with 400 Bad Request,
InvalidBucketName.
● When creating a bucket or object with empty content, ECS returns 400 invalid content-length value, which
differs from AWS which returns 400 Bad Request.
● Copying an object to another bucket that indexes the same user metadata index key but with a different datatype is not
supported and fails with 500 Server Error.
● When listing the objects in a bucket, if you use a prefix and delimiter but supply an invalid marker, ECS throws 500
Server Error, or 400 Bad Request for a file system-enabled bucket. However, AWS returns 200 OK and the objects are
not listed.
● For versioning enabled buckets, ECS does not create a delete marker when a deleted object is deleted again. This is
different from AWS, which always inserts delete marker for deleting deleted objects in versioning enabled buckets. This
change in behavior is only applicable when the deleted object is deleted again from owner zone.
10 S3
Table 3. Additional features (continued)
Feature Notes
Chunked PUT PUT operation can be used to upload objects in chunks, which enable content to be sent
before the total size of the payload is known. Chunked transfer uses the Transfer-Encoding
header (Transfer-Encoding: chunked) to specify that content is transmitted in chunks.
Unsupported S3 APIs
Table 4. Unsupported S3 APIs
Feature Notes
DELETE Bucket tagging -
DELETE Bucket website -
GET Bucket location ECS is only aware of a single Virtual Data Center (VDC).
GET Bucket logging -
GET Bucket notification Notification is only defined for reduced redundancy feature in S3. ECS does not support
notifications.
GET Bucket tagging -
GET Bucket requestPayment ECS uses its own model for payments.
GET Bucket website -
PUT Bucket logging -
PUT Bucket notification Notification is only defined for the reduced redundancy feature in S3. ECS does not support
notifications.
PUT Bucket tagging -
PUT Bucket requestPayment ECS uses its own model for payments.
PUT Bucket website -
Object APIs
GET Object torrent -
POST Object -
POST Object restore The POST Object restore operation is related to AWS Glacier, which is not supported in ECS.
SELECT Object Content -
S3 11
Bucket policy support
ECS supports the setting of S3 bucket access policies. Unlike ACLs, which either permit all actions or none, access policies
provides specific users, or all users, conditional and granular permissions for specific actions. Policy conditions can be used to
assign permissions for a range of objects that match the condition and can be used to automatically assign permissions to newly
uploaded objects.
How access to resources is managed when using the S3 protocol is described in https://docs.aws.amazon.com/AmazonS3/
latest/dev/s3-access-control.html and you can use the information as the basis for understanding and using S3 bucket policies
in ECS. This section provides basic information about the use of bucket policies, and to identify the differences when using
bucket policies with ECS.
The following provides an example of an ECS bucket policy:
{
"Version": "2012-10-17",
"Id": "S3PolicyIdNew2",
"Statement":[
{
"Sid":"Granting PutObject permission to user2 ",
"Effect":"Allow",
"Principal": "user_n2",
"Action":["s3:PutObject"],
"Resource":["PolicyBuck1/*"],
"Condition": {
"StringEquals": {"s3:x-amz-server-side-encryption": [ "AES256"]}
}
}
]
}
Each policy is a JavaScript Object Notation (JSON) document that includes a version, an identifier, and one or more statements.
Version The Version field specifies the policy language version and can be either 2012-10-17 or 2008-10-17.
If the version is not specified, 2008-10-17 is automatically inserted.
It is good practice to set the policy language for a new policy to the latest version, 2012-10-17.
Resources The bucket or object that is the subject of the statement. The resource can be associated with a
Resource or NotResource statement.
The resource name is the bucket and key name and is specified differently depending on whether you are
using virtual host style addressing or path style addressing, as shown:
bucketname/*
Actions The set of operations that you want to assign permissions to (enable or deny). The supported operations
are listed in Supported bucket policy operations.
The operation can be associated with an Action or NotAction statement.
Effect Can be set to Allow or Deny to determine whether you want to enable or deny the specified actions.
12 S3
Principal The ECS object user who is enabled or denied the specified actions.
To grant permissions to everyone, as anonymous access, you can set the principal value to a wildcard,
"*", as shown:
"Principal":"*"
Conditions The condition under which the policy is in effect. The condition expression is used to match a condition
that is provided in the policy with a condition that is provided in the request.
The following condition operators are not supported: Binary, ARN, IfExists, Check Key Exists. The
supported condition keys are listed in Supported bucket policy conditions.
NOTE: ECS bucket policies do not support federated users, nor do they support Amazon IAM users and roles.
More information about the elements that you can use in a policy are described in the Amazon S3 documentation, https://
docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html.
To set a policy using the S3 API you must be the bucket owner.
Details of these APIs can be found in the ECS API Reference.
S3 13
General Xrefs used from all books
You can insert xrefs into your topics using these links. Although there are two or three (conditionalized) versions of each entry,
you must only include one of them - it is suggested that you use the first phrase element that has the ID that you want.
{
"Version": "2012-10-17",
"Id": "S3PolicyId1",
"Statement": [
{
"Sid": "Grant permission to user1",
"Effect": "Allow",
"Principal": ["user1"],
"Action": [ "s3:PutObject","s3:GetObject" ],
"Resource":[ "mybucket/*" ]
}
]
}
You can also add conditions. For example, if you only want the user to read and write object when accessing the bucket from a
specific IP address, add a IpAddress condition as shown in the following policy:
{
"Version": "2012-10-17",
"Id": "S3PolicyId1",
"Statement": [
{
"Sid": "Grant permission ",
"Effect": "Allow",
"Principal": ["user1"],
14 S3
"Action": [ "s3:PutObject","s3:GetObject" ],
"Resource":[ "mybucket/*" ]
"Condition": {"IpAddress": {"aws:SourceIp": "<Ip address>"}
}
]
}
{
"Version": "2012-10-17",
"Id": "S3PolicyId2",
"Statement": [
{
"Sid": "statement2",
"Effect": "Allow",
"Principal": ["*"],
"Action": [ "s3:GetObject" ],
"Resource":[ "mybucket/*" ]
}
]
}
{
"Version": "2012-10-17",
"Id": "S3PolicyId3",
"Statement": [
{
"Sid": "statement3",
"Effect": "Allow",
"Principal": ["user1", "user2"],
"Action": [ "s3:PutObject, s3:PutObjectAcl" ],
"Resource":[ "mybucket/*" ]
"Condition":{"StringEquals":{"s3:x-amz-acl":["public-read"]}}
}
]
}
S3 15
Table 5. Permissions for Object Operations (continued)
Permission keyword Supported S3 operations
s3:PutObject PUT Object, POST Object, Initiate Multipart Upload, Upload Part, Complete Multipart Upload
PUT Object - Copy
s3:GetObjectAcl GET Object ACL
s3:GetObjectVersionAcl GET ACL (for a Specific Version of the Object)
s3:PutObjectAcl PUT Object ACL
s3:PutObjectVersionAcl PUT Object (for a Specific Version of the Object)
s3:DeleteObject DELETE Object
s3:DeleteObjectVersion DELETE Object (a Specific Version of the Object)
s3:ListMultipartUploadParts List Parts
s3:AbortMultipartUpload Abort Multipart Upload
16 S3
Table 8. Supported generic AWS condition keys (continued)
Key name Description Applicable operators
aws:principalType Used to check the type of principal (user, account, federated user, etc.) String operator
for the current request.
aws:SourceIp Used to check the requester's IP address. String operator
aws:UserAgent Used to check the requester's client application. String operator
aws:username Used to check the requester's user name. String operator
S3 17
ECS Community: Developer Resources
ECS API Reference
Object Tagging
Object Tagging allows you to categorize the objects by assigning tags to the individual objects. A single object can have multiple
tags that are associated with it, enabling multidimensional categorization.
A tag could describe some sort of sensitive information like a health record, or you can tag an object. to a certain product that
can be categorized as confidential. Tagging is a subresource of an object that has a life-cycle, integrated with object operations.
You can add tags to new objects when you upload them, or add tags to existing objects. It is acceptable to use tags to label
objects containing confidential data, such as Personally Identifiable Information (PII) or Protected Health Information (PHI). The
tags must not contain any confidential information, as tags can be viewed without having the read permission to an object.
WARNING: Object Tagging does not support file system-enabled buckets with S3 protocol.
Tag A tag is a key-value pair where both the key and the value are represented as a string.
Tag set A set of tags associated with an object. Tags that are associated with an object must have unique tag
keys. You can associate up to 10 tags with an object. However, the additional storage overhead is about 4
kb in UTF-8 and sixteen kb in UTF-32.
NOTE:
● A single tag would require about 384 bytes on disk if stored in UTF-8 encoding or about 1.5 kb if stored as UTF-32.
● Allowed characters are letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : /
@
● A tag key can be up to 128 Unicode characters in length, and tag values can be up to 256 Unicode characters in length.
● The key and values are case-sensitive.
● Object Tagging API support is available from ECS 3.5 and later versions. For more information about Object Tagging
APIs, see Manage Object Tagging.
Object Tagging in The key function of Object Tagging as categorization system comes when it is integrated with Polices
IAM from IAM. This allows you to configure specific permissions for the users. For example, You can add
a policy that allows everyone to access objects with a specified tag or you can configure and grant
permissions to users, who can manage the tags on specific objects. The other key aspect with Object
Tagging is how and where the tags would be persisted. This is important because, it has a direct impact
on various aspects of the system.
Object Tagging Object Tagging allows you to categorize the objects, also tagging gets integrated with various policies.
with bucket Lifecycle management policy allows you to configure at a bucket level. Earlier versions of ECS support
policies Expiration, Abort Incomplete Uploads, and Deletion of Expired Delete Marker. The filter could include
multiple conditions including a tag-based condition. Each tag in the filter condition must match the key
and the value.
Object Tagging Object Tagging is another entry set in system metadata, no special handling is required during TSO/PSO.
during TSO/PSO There is a set limit on the number of tags that are allowed to be associated with each object, size of
system metadata along with Object Tagging is well with in the memory limits.
18 S3
Object Tagging Object Tagging is part of system metadata and handled simultaneously with system metadata handling,
during object during lifecycle management. The Expiration Logic and Lifecycle Delete Scanner requires to understand
lifecycle tag-based policies. Object tags enable fine-grained object lifecycle management in which you can specify
Management a tag-based filter, in addition to a key name prefix, in a lifecycle rule.
The object operations with tagging include existing object operations that can perform tag related actions such as, assigning the
tags at the time of object creation or during the copy operation.
Add or extend internal APIs to support tagging. The table defines the S3 APIs to manipulate the tags.
S3 19
Table 13. S3 APIs
API support Action Description
updateObjectTags() s3:PutObjectTagging Add or replace set of tags to an existing
object.
updateObjectVersionTags() s3:PutObjectVersionTagging Add or replace set of tags to an existing
version of an object.
getObjectTags() s3:GetObjectTagging Retrieve all tags associated with current
version of an object.
getObjectVersionTags() s3:GetObjectVersionTagging Retrieve all tags associated with specified
version of an object.
deleteObjectTags() s3:DeleteObjectTagging Delete all tags associated with current
version of an object.
deleteObjectVersionTags() s3:DeleteObjectVersionTaggin Delete all tags associated with specified
g version of an object.
NOTE:
● If you send this request with an empty tag set, it deletes the existing tags for an object with objectInfo.
● Use the DELETE Object Tagging request to delete all the tags for an object.
20 S3
S3 Object Lock
ECS allows you to store objects using a write-once-read-many (WORM) model through S3 Object Lock. This feature prevents
objects from being deleted or overwritten for a specified time or indefinitely. Also, S3 Object Lock helps to meet WORM storage
related regulatory requirements and adds a protection layer against object modifications and deletion.
NOTE:
● ECS S3 Object Lock feature supports only the versioning enabled buckets.
● There is no ECS user interface for Object Lock. It can be accessed through ECS Object Lock APIs. For the Object
Lock API examples, see Object Lock API Examples and for the list of supported S3 APIs, see S3 API supported and
unsupported features.
● The locked objects are protected from lifecycle deletions.
Retention mode
Retention modes provide additional protection to your object version that is protected by Object Lock.
S3 21
ECS S3 Object Lock permissions
ECS S3 Object Lock permissions allow you to manage retention period and legal hold that are specified in objects.
Permissions Operations
s3:PutBucketObjectLockConfiguration PUT Bucket Object Lock configuration
s3:GetBucketObjectLockConfiguration GET Bucket Object Lock configuration
s3:PutObjectLegalHold PUT Object Legal Hold, PUT Object
s3:GetObjectLegalHold GET Object Legal Hold, GET Object
s3:PutObjectRetention PUT Object Retention, PUT Object
s3:GetObjectRetention Get Object Retention, GET Object
s3:BypassGovernanceRetention PUT Object Retention, DELETE Object, DELETE Objects
s3:EnableObjectLock Enable object lock for existing buckets
<Rule><DefaultRetention><Mode>GOVERNANCE</Mode><Days>1</Days></
DefaultRetention></Rule></ObjectLockConfiguration>"
Get retention
s3curl.pl --id=ecsflex -- http://${s3ip}/my-bucket/obj?retention
22 S3
Operation API request examples
Put retention on create
s3curl.pl --id=ecsflex --put=/root/100b.file -- http://${s3ip}/
my-bucket/obj -H "x-amz-object-lock-mode: GOVERNANCE" -H "x-amz-
object-lock-retain-until-date: 2030-01-01T00:00:00.000Z"
S3 23
Expiring objects after a certain # of days (versioning and non-versioning enabled buckets)
Expiring NoncurrentVersions of objects after a certain # of days (versioning enabled buckets only)
Expire all non-current versions, dmarkers and incomplete MPU's after 1 day
24 S3
PUT lifecycle
Troubleshooting LDS:
Enabling debug logging for LDS
LDS log is in resourcesvc-log4j2.xml
<Logger name="com.emc.storageos.data.object.impl.resource.LifeCycleDeleteScanner"
level="DEBUG"/>
dataheadsvc-log4j2.xml
S3 25
<Logger name="com.emc.storageos.data.object.RESTAccess.ObjectListingHelper"
level="DEBUG"/>
GET lifecycle
26 S3
Table 15. Supported lifecycle configuration elements (continued)
Name Description Required
Expiration ● This action specifies a period in an object's Yes, if no other action is present in the Rule.
lifetime when S3 should take the appropriate
expiration action. The action S3 takes
depends on whether the bucket is versioning-
enabled.
● If versioning has never been enabled on
the bucket, S3 deletes the only copy of
the object permanently. Otherwise, if your
bucket is versioning-enabled (or versioning is
suspended), the action applies only to the
current version of the object. A versioning-
enabled bucket can have many versions of
the same object, one current version, and
zero or more noncurrent versions.
● Instead of deleting the current version, S3
makes it a noncurrent version by adding a
delete marker as the new current version.
NOTE:
○ If your bucket state is versioning-
suspended, S3 creates a delete marker
with version ID null. If you have a
version with version ID null, then S3
overwrites that version.
○ To set expiration for noncurrent
objects, you must use the
NoncurrentVersionExpiration
action.
● Type: Container
● Children: Days or Date
● Ancestor: Rule
Filter ● Container for elements that describe the filter Yes
identifying a subset of objects to which the
lifecycle rule applies. If you specify an empty
filter (<Filter></Filter>), the rule applies to all
objects in the bucket.
● Type: String
● Children: Prefix, Tag
● Ancestor: Rule
ID ● Unique identifier for the rule. The value No
cannot be longer than 255 characters.
● Type: String
● Ancestor: Rule
Key ● Specifies the key of a tag. A tag key can be Yes, if <Tag> parent is specified.
up to 128 Unicode characters in length.
● Tag keys that you specify in a lifecycle rule
filter must be unique.
● Type: String
● Ancestor: Tag
LifecycleConfigur ● Container for lifecycle rules. You can add as Yes
ation many as 1,000 rules.
● Type: Container
● Children: Rule
● Ancestor: None
S3 27
Table 15. Supported lifecycle configuration elements (continued)
Name Description Required
ExpiredObjectDele ● On a versioned bucket (versioning-enabled or Yes, if Date and Days are absent.
teMarker versioning-suspended bucket), you can add
this element in the lifecycle configuration
to direct S3 to delete expired object delete
markers. On a nonversioned bucket, adding
this element in a policy is meaningless
because you cannot have delete markers and
the element does not do anything.
● When you specify this lifecycle action, the
rule cannot specify a tag-based filter.
● Type: String
● Valid values: true | false (the value false is
allowed, but it is no-op and S3 does not take
action if the value is false)
● Ancestor: Expiration
NoncurrentDays ● Specifies the number of days an object Yes
is noncurrent before S3 can perform the
associated action.
● Type: Nonnegative Integer when used
with NoncurrentVersionTransition,
Positive Integer when used with
NoncurrentVersionExpiration.
● Ancestor:
NoncurrentVersionExpiration or
NoncurrentVersionTransition
NoncurrentVersion ● Specifies when noncurrent object versions Yes, if no other action is present in the Rule.
Expiration expire. Upon expiration, S3 permanently
deletes the noncurrent object versions.
● You set this lifecycle configuration action
on a bucket that has versioning enabled
(or suspended) to request that S3 delete
noncurrent object versions at a specific
period in the object's lifetime.
● Type: Container
● Children: NoncurrentDays
● Ancestor: Rule
Prefix ● Object key prefix identifying one or more No
objects to which the rule applies. Empty
prefix (<Prefix></Prefix>) indicates there is
no filter based on key prefix.
NOTE: ECS supports <Prefix> with and
without <Filter>.
PUT Bucket lifecycle with <Filter>
<Filter>
<Prefix>value</Prefix>
</Filter>
<Prefix>value</Prefix>
28 S3
Table 15. Supported lifecycle configuration elements (continued)
Name Description Required
● Ancestor: Filter or And (if you specify multiple
filters such as a prefix and one or more tags)
Rule ● Container for a lifecycle rule. A lifecycle Yes
configuration can contain as many as 1,000
rules.
● Type: Container
● Ancestor: LifecycleConfiguration
Status ● If Enabled, S3 executes the rule as scheduled. Yes
If Disabled, S3 ignores the rule.
● Type: String
● Ancestor: Rule
● Valid values: Enabled, Disabled.
Value ● Specifies the value for a tag key. Each object Yes, if <Tag> parent is specified.
tag is a key-value pair.
● Tag value can be up to 256 Unicode
characters in length.
● Type: String
● Ancestor: Tag
For enabling 3.2.1 and higher versions, set the com.emc.ecs.resource.lifecycledeletescanner.enable parameter
value as true.
S3 Extensions
ECS supports a number of extensions to the S3 API.
The extensions and the APIs that support them are listed below.
● Byte range extensions
● Retention
● File system enabled
● Metadata Search
● S3A support
S3 29
NOTE: A byte range operation (update/append/overwrite) on a versioned object does not create a version and latest
version itself is updated.
A byte range operation (update/append/overwrite) on an old version of an object updates the latest version.
HTTP/1.1 200 OK
Date: Mon, 12 Mar 2018 20:04:40 GMT
Content-Type: application/octet-stream
Last-Modified: Mon, 12 Mar 2018 20:04:28 GMT
ETag: 6
Content-Type: application/json
Content-Length: 43
To update a specific byte range within this object, the Range header in the object data request must include the start and end
offsets of the object that you want to update.
The format is: Range: bytes=<startOffset>-<endOffset>.
In the example, the PUT request includes the Range header with the value bytes=10-14 indicating to replace the bytes
10,11,12,13,14 by the value that is sent in the request. Here, the new value green is being sent.
green
When reading the object again, the new value is now The quick green fox jumps over the lazy dog. A specific
byte range within the object is updated, replacing the word brown with the word green.
30 S3
HTTP/1.1 200 OK
Date: Mon, 12 Mar 2018 20:16:00 GMT
Content-Type: application/octet-stream
Last-Modified: Mon, 12 Mar 2018 20:15:16 GMT
ETag: 10
Content-Type: application/json
Content-Length: 43
brown cat
When the object is retrieved, part of the data is replaced at the provided starting offset (green fox is replaced with brown
cat) and the final value is: The quick brown cat jumps over the lazy dog and cat.
HTTP/1.1 200 OK
Date: Mon, 12 Mar 2018 20:51:55 GMT
Content-Type: application/octet-stream
Last-Modified: Mon, 12 Mar 2018 20:51:41 GMT
ETag: 25
Content-Type: application/json
Content-Length: 51
The quick brown cat jumps over the lazy dog and cat.
Note that when you overwrite existing parts of an object, the size and numbers of the new parts is added to the size and
numbers of the existing parts you overwrote. For example, in a bucket that has one part that is 20 KB in size, you overwrite
5 KB. When you query the bucket using GET /object/billing/buckets/{namespace}/{bucketName}/info, the
output will show total_mpu_size = 25 KB (not 20 KB) and total_mpu_parts = 2 (not 1) .
S3 31
Appending data to an object
You can use ECS extensions to the S3 protocol to append data to an object.
There may be cases where you append to an object, but determining the exact byte offset is not efficient or useful. For this
scenario, ECS provides the ability to append data to the object without specifying an offset (the correct offset is returned to
you in the response). For example, in order to append lines a log file, on Amazon or other S3 compatible platforms, you must
send the full log file again.
A Range header with the special value bytes=-1- can be used to append data to an object. In this way, the object can be
extended without knowing the existing object size. The format is: Range: bytes=-1-
A sample request showing appending to an existing object using a Range value of bytes=-1- is shown in the following
example. Here the value and cat is sent in the request.
and cat
When the object is retrieved, and cat has been appended, and you can see the full value: The quick green fox jumps
over the lazy dog and cat.
HTTP/1.1 200 OK
Date: Mon, 12 Mar 2018 20:46:56 GMT
Content-Type: application/octet-stream
Last-Modified: Mon, 12 Mar 2018 20:46:01 GMT
ETag: 24
Content-Type: application/json
Content-Length: 51
The quick green fox jumps over the lazy dog and cat.
32 S3
Content-Type: application/octet-stream
Authorization: AWS wuser1:/UQpdxNqZtyDkzGbK169GzhZmt4=
Accept-Encoding: gzip, deflate, compress
--bound04acf7f0ae3ccc
Content-Type: application/octet-stream
Content-Range: bytes 4-8/50
quick
--bound04acf7f0ae3ccc
Content-Type: application/octet-stream
Content-Range: bytes 41-44/50
lazy
--bound04acf7f0ae3ccc--
Retention
The ECS S3 head supports retention of objects to prevent them being deleted or modified for a specified period. The ECS S3 is
an ECS extension and is not available in the standard S3 API.
Retention can be set in the following ways:
Retention period Stores a retention period with the object. The retention period is set using an x-emc-retention-
on object period header on the object.
NOTE: The objects retention period can be extended. See Extending retention period on objects for
more information.
Retention policy A retention policy can be set on the object and the period that is associated with the policy can be set
on object for the namespace. The retention policy enables the retention period for a group of objects to be set to
the same value using a policy and can be changed for all objects by changing the policy. The use of a
policy provides much more flexibility than applying the retention period to an object. In addition, multiple
retention policies can be set for a namespace to allow different groups of objects to have different
retention periods.
When applying a retention policy to an object using a x-emc-retention-policy header on the
object, the policy retention period must be set. The ECS administrator must set the policy retention
period from the ECS Portal or using the ECS Management REST API.
Retention period A retention period that is stored against a bucket sets a retention period. The retention period is set for all
on bucket objects with the object level retention period or policy that is used to provide an object-specific setting,
where a longer retention is required. The retention period is set using an x-emc-retention-period
header on the bucket.
When an attempt is made to modify or delete the object, the larger of the bucket retention period or the object period is used to
determine whether the operation can be performed. The object period is set directly on the object or using the object retention
policy.
S3 buckets can also be created from the ECS Management REST API or from the ECS Portal and the retention period for a
bucket can be set from there.
S3 33
● It is possible to extend the object retention period by changing the retention_class values in the namespace or in
the bucket. The modified retention period applies to all the objects in the bucket or to all the objects that are using the
retention_class defined in namespace. It is not possible to extend an individual object retention period.
● As to extend the retention period, namespace should have retention_class with some period value, buckets should
have retention-period, and objects should have retention-period and retention_class as defined in the
namespace.
NOTE: When modifying the retention value of an object, the new value is added to the object creation time. If the retention
period value is greater than the current time, the operation will be blocked.
Example: /root/
s3curl.pl --id=<id>
-- -X PUT "http://
$ip:9020/bucket/
key1?
retentionUpdate" -H
'x-emc-retention-
period:3000'
Update retention period NOTE: s3:PutObject 200 No content
● New retention period
value can only be
increased that is, it
can be the same as
the current or greater
value.
● If the new
retention period
value is -1, infinite
retention applies on
that object. For
example: -H 'x-
emc-retention-
period:-1'
34 S3
Enabling FS access
You can enable FS access using the x-emc-file-system-access-enabled header when creating a bucket using the S3
protocol. File system access can also be enabled when creating a bucket from the ECS Portal (or using the ECS Management
REST API).
Limitation on FS support
When a bucket is FS enabled S3 life cycle management cannot be enabled.
Seal file
The seal file functionality helps to commit the file to WORM state when the file is written ignoring the remaining autocommit
period. The seal function is performed through the command: chmod ugo-w <file> on the file.
NOTE: The seal functionality does not have any effect outside the retention period.
S3 35
High-level overview
Table 17. Autocommit terms
Term Description
Autocommit period Time interval relative to the object's last modified time during which certain retention
constraints (example: file modifications, file deletions, and so on) are not applied. It does not
have any effect outside of the retention period.
Retention Start Delay Atmos head uses the start delay to indicate the autocommit period.
Autocommit configuration
The autocommit period can be set from the user interface or bucket REST API or S3 head or Atmos subtenant API.
User Interface
The user interface has the following support during bucket create and edit:
● When the File System is not enabled, no autocommit option is displayed.
● When the File System is enabled /no retention value that is specified, autocommit is displayed but disabled.
● When the File System is enabled/retention value selected/autocommit is displayed and enabled for selection.
NOTE: Maximum autocommit period is limited to the smaller of the Bucket Retention period or the default maximum period
of one day.
REST API
Create bucket REST API is modified with the new header, x-emc-autocommit-period.
S3 head
Bucket creation
36 S3
Bucket creation flow through s3 head can make use of optional request header, x-emc-auto-commit-period:seconds to
set the autocommit period. The following checks are made in this flow:
● Allow only positive integers
● Settable only for file system buckets
● Settable only when the retention value is present
Atmos
Atmos creates a subtenant request header, x-emc-retention-start-delay, captures the autocommit interval.
./atmoscurl.pl -user USER1 -action PUT -pmode TID -path / -header "x-emc-retention-
period:300" -header "x-emc-retention-start-delay:120" -include
S3 37
S3A support
The AWS S3A client is a connector for AWS S3, which enables you to run Hadoop MapReduce or Spark jobs with ECS S3. For
information about Hadoop S3A, see Hadoop S3A for ECS.
NOTE:
● ECS does not enable you to run S3A client on FS enabled buckets.
● S3A support is available on Hadoop 2.7 or later version.
Geo-replication status
The ECS S3 head supports Geo replication status of an object with replicationInfo. It API retrieves Geo replication status of an
object using replicationInfo. This automates their capacity management operations, enable site reliability operations and ensures
that the critical date is not deleted accidently.
Retrieves Geo replication status of an object by API to confirm that the object has been successfully replicated.
Request:
GET /bucket/key?replicationInfo
Response:
<ObjectReplicationInfo xmlns="http://s3.amazonaws.com/doc/
2006-03001/"
<IndexReplicated>false</IndexReplicated>
<ReplicatedDataPercentage>64.0</ReplicatedDataPercentage>
</ObjectReplicationInfo>
com.emc.ecs.common.request.throttle.enabled = true
com.emc.ecs.common.request.throttle.limit = <any postive integer value>
com.emc.ecs.common.request.throttle.type = resource:bucket
com.emc.ecs.common.request.throttle.method = PUT
NOTE: The throttle limit value must be a positive integer value. That is any value between <1 - java long range upper limit>
is valid.
Metadata Search
The ECS S3-compatible API provides a metadata search extension. The search enables objects within a bucket to be indexed
based on their metadata, and for the metadata index to be queried to find objects and their associated data.
Metadata can be associated with objects using the ECS S3 API. If you know the identity of an object, you can read an object's
metadata. Without the ECS metadata search feature, it is not possible to find an object using its metadata without iterating
through the set of object in a bucket.
Metadata can be either user metadata or system metadata. System metadata is defined and automatically written to objects by
ECS, clients write the user metadata with reference to the user requirements. Both system and user metadata can be indexed
and used as the basis for metadata searches. The number of metadata values that can be indexed is limited to 30 and must be
defined when the bucket is created.
NOTE: In the case of small objects (100KB and below), the ingest rate for data slightly reduces on increasing the number
of index keys. Performance testing data showing the impact of using metadata indexes for smaller objects is available in the
ECS Performance white paper.
38 S3
When querying objects based on their indexed metadata, the objects that match the query and the values of their indexed
metadata are returned. You can also choose to return all of the system and/or user metadata that is associated with the
returned objects. In addition to system metadata, objects also have attributes which can be returned as part of metadata search
results. The system metadata values that are available and can be indexed, and the metadata values that can optionally be
returned with search query results, are listed ECS system metadata and optional attributes.
The following topics cover the steps involves in setting up and using the metadata search feature:
● Assign metadata index values to a bucket
● Assign metatdata to objects using S3 protocol
● Use metadata search queries
<MetadataSearchList xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<IndexableKeys>
<Key>
<Name>LastModified</Name>
<Datatype>datetime</Datatype>
</Key>
S3 39
<Key>
<Name>Owner</Name>
<Datatype>string</Datatype>
</Key>
<Key>
<Name>Size</Name>
<Datatype>integer</Datatype>
</Key>
<Key>
<Name>CreateTime</Name>
<Datatype>datetime</Datatype>
</Key>
<Key>
<Name>ObjectName</Name>
<Datatype>string</Datatype>
</Key>
</IndexableKeys>
<OptionalAttributes>
<Attribute>
<Name>ContentType</Name>
<Datatype>string</Datatype>
</Attribute>
<Attribute>
<Name>Expiration</Name>
<Datatype>datetime</Datatype>
</Attribute>
<Attribute>
<Name>ContentEncoding</Name>
<Datatype>string</Datatype>
</Attribute>
<Attribute>
<Name>Expires</Name>
<Datatype>datetime</Datatype>
</Attribute>
<Attribute>
<Name>Retention</Name>
<Datatype>integer</Datatype>
</Attribute>
</OptionalAttributes>
</MetadataSearchList>
<MetadataSearchList xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<MetadataSearchEnabled>true</MetadataSearchEnabled>
<IndexableKeys>
<Key>
<Name>Size</Name>
<Datatype>integer</Datatype>
</Key>
<Key>
<Name>x-amz-meta-DAT</Name>
<Datatype>datetime</Datatype>
</Key>
</IndexableKeys>
</MetadataSearchList>
40 S3
Setting values using the S3 API
The S3 API provides methods for working with indexes that are listed in the following table and links are provided to the API
reference.
NOTE: The following characters are not accepted in S3 metadata key in ECS 3.4 and later versions: quotation marks (""),
parentheses (()), comma (,), Forward slash (/), at (@), angle brackets (<>), equal to (=), and question mark (?).
GET /{bucket}/?searchmetadata Gets the list of metadata keys that are currently being indexed for the bucket.
Example
The following example shows how to create a bucket with metadata indexes for three system metadata keys and two user
metadata keys.
NOTE: When adding an object with x-amz-meta-, values containing special characters do not have to be url-encoded.
When the metadata is indexed so that it can be used as the basis of object searches (the metadata search feature), a datatype
is assigned to the data. When writing metadata to objects, clients should write data in the appropriate format so that it can be
used correctly in searches.
The datatypes are:
String If the search index term is marked as text, the metadata string is treated as a string in all search
comparisons.
Integer If the search index term is marked as integer, the metadata string is converted to an integer in search
comparisons.
Decimal If a search index term is marked as decimal, the metadata string is converted to a decimal value so that
the "." character is treated as a decimal point.
S3 41
Datetime If the search index term is marked as datetime, the metadata string is treated as a date time with the
expected format: yyyy-MM-ddTHH:mm:ssZ If you want the string to be treated as datetime, you need
to use the format yyyy-MM-ddTHH:mm:ssZ when specifying the metadata.
Example
The example below uses the S3 API to upload an object and two user metadata values on the object.
42 S3
Table 21. API Syntax
API Syntax Response Body
<indexKey/>
</object>
<object
...
</object>
</ObjectMatches>
</BucketQueryResult>
[(]{condition1}[%20[and/or]%20{condition2}][)][%20[and/or]%20…]
{selector} {operator}
{argument},
For example:
attributes=[field Specifies any optional object attributes that should be included in the report. Attribute values will be
name,...] included in the report where that attribute is present on the object. The optional attribute values
comprise:
● ContentEncoding
● ContentType
● Retention
● Expiration
● Expires
In addition, it is possible to return the non-indexed metadata associated with objects that are returned by
the search query. The following:
ALL Lists both system and user metadata associated with the returned objects.
ALL_SMD Lists the system metadata associated with the returned objects.
ALL_UMD Lists the user metadata associated with the returned objects.
sorted=[selector] Specifies one searchable key name associated with the bucket. The key name must be a key that appears
in the expression. In the absence of &sorted=keyname, the output will be sorted according to the first key
name that appears in the query expression.
NOTE: If "or" operators are used in the expression, the sort order is indeterminate.
include-older- When S3 versioning is enabled on a bucket, setting this to true will return current and older versions of
versions=[true| objects that match the expression. Default is false.
false]
max-keys The maximum number of objects that match the query that should be returned. If there are more objects
than the max-keys, a marker will be returned that can be used to retrieve more matches.
marker The marker that was returned by a previous query and that indicates the point from which query matches
should be returned.
S3 43
Datetime queries
Datetime values in user metadata are specified in ISO-8601 format yyyy-MM-dd'T'HH:mm:ssZ and are persisted by ECS in
that format. Metadata queries also use this format. However, ECS persists datetime values for system metadata as epoch time,
the number of milliseconds since the beginning of 1970.
When a query returns results, it returns the datetime format persisted by ECS. An example of the two formats is shown below.
User metadata
upload header -H x-amz-meta-Foo:2018-03-06T12:00:00Z
example:
User and System
query expression ?query=CreateTime>2018-01-01T00:00:00Z and x-amz-meta-
Foo==2018-03-06T12:00:00Z
format:
Query results
fragment - <key>createtime</key> <value>1449081777620</value>
system metadata
Query results
fragment - user <key>x-amz-meta-Foo</key> <value>2018-03-06T12:00:00Z</value>
metadata
You can specify the maximum number of objects that will be returned by a query using the max-keys query parameter.
The example below specified a maximum number of objects as 3.
Where a query matches more objects than the max-keys that has been specified, a marker will also be returned that can be used
to return the next page objects that match the query but were not returned.
The query below specifies a marker that has been retrieved from a previous query:
When the returned objects are the final page of objects, the IsTruncated tag value is returned as false. Else, the
IsTruncated tag value is returned as True.
NOTE: Only if the IsTruncated tag value is returned as True, the NextMarker tag appears.
?query="'ab+cd<ed;ef'"
44 S3
In this case, the search value is single-quoted and that is wrapped in double quotes.
GET /bucketName/?prefix={prefix}&delimiter={delimiter}&query={queryString}
Limitations
● A prefix is always applied before the actual query.
● Custom sorting is not supported with prefixes. If sorting is specified together with a prefix, the API returns 400 Bad
Request.
● Objects are returned in lexicographical order.
● Using ObjectName in a query string together with a prefix is not allowed. It creates ambiguity as both filter objects based
on name. If both are specified, the API returns 400 Bad Request.
NOTE: Some REST clients may require that you encode "spaces" with url code %20.
<BucketQueryResult xmlns:ns2="http://s3.amazonaws.com/doc/2006-03-01/">
<Name>mybucket</Name>
<Marker/>
<IsTruncated>false</IsTruncated>
<MaxKeys>0</MaxKeys>
<ObjectMatches>
<object>
<objectName>file4</objectName>
<objectId>09998027b1b7fbb21f50e13fabb481a237ba2f60f352d437c8da3c7c1c8d7589</
objectId>
<versionId>0</versionId>
<queryMds>
<type>SYSMD</type>
<mdMap>
<entry>
<key>createtime</key>
<value>1449081778025</value>
</entry>
<entry>
<key>size</key>
<value>1024</value>
</entry>
<entry>
<key>mtime</key>
<value>1449081778025</value>
</entry>
</mdMap>
</queryMds>
S3 45
<queryMds>
<type>USERMD</type>
<mdMap>
<entry>
<key>x-amz-meta-INT</key>
<value>407</value>
</entry>
<entry>
<key>x-amz-meta-STR</key>
<value>String4</value>
</entry>
</mdMap>
</queryMds>
<indexKey/>
</object>
<object>
<objectName>file5</objectName>
<objectId>1ad87d86ef558ca0620a26855662da1030f7d9ff1d4bbc7c2ffdfe29943b9150</
objectId>
<queryMds>
<type>SYSMD</type>
<mdMap>
<entry>
<key>createtime</key>
<value>1449081778396</value>
</entry>
<entry>
<key>size</key>
<value>1024</value>
</entry>
<entry>
<key>mtime</key>
<value>1449081778396</value>
</entry>
</mdMap>
</queryMds>
<queryMds>
<type>USERMD</type>
<mdMap>
<entry>
<key>x-amz-meta-INT</key>
<value>507</value>
</entry>
<entry>
<key>x-amz-meta-STR</key>
<value>Sring5</value>
</entry>
</mdMap>
</queryMds>
<indexKey/>
</object>
</ObjectMatches>
</BucketQueryResult>
46 S3
ECS system metadata and optional attributes
System metadata is automatically associated with each object stored in the object store. Some system metadata is always
populated and can be used as index keys, other metadata is not always populated but, where present, can be returned with
metadata search query results.
System metadata
Table 23. System Metadata
Name (Alias) Type Description
ObjectName string Name of the object.
Owner string Identity of the owner of the object.
Size integer Size of the object.
CreateTime datetime Time at which the object was created.
LastModified datetime Time and date at which the object was last modified.
NOTE: Modification supported by ECS S3 byte-range update
extensions, not by pure S3 API.
Methods Description
Existing method without tokenization In this method, the metadata value is interpreted as a single value. For example, in
the x-amz-meta-countries= [france,uk] command, the france,uk value is
considered as a single value.
New method with tokenization In this method, each element of a metadata value is searchable. For example, in
the x-amz-meta-countries= [france,uk] command, the france,uk value is
considered as two values separated with the delimiter.
S3 47
Limitations
Tokenization has the following limitations:
Limitation Description
Size of user metadata User-defined metadata is limited to 2 KB in size. The size of user-defined metadata is the
sum of the number of bytes in the UTF-8 encoding of each key and value.
Permitted delimiters for The special characters that can be used to identify individual values in the metadata value
tokenization are "[", "]", and ",".
48 S3
USER ACL GROUP ACL
check Swift
check S3 group ACL
user ACL permissions
S3 KEY
SWIFT PASSWORD
SWIFT GROUP
SWIFT
S3 APPLICATION APPLICATION
Swift uses groups to enable access to resources, for an S3 user to be able to access a Swift container. The S3 user must be
assigned to a Swift group, either the admin group, or a group that has been given Custom Group ACLs on the container.
In summary, one of the following conditions should be met for access to S3 buckets:
● The Swift or S3 user must be the bucket owner.
● The Swift or S3 user must have been added to the user ACL for the bucket.
One of the following conditions should be met for access to Swift containers:
● The S3 or Swift user must be the container owner.
● The S3 user must also be a Swift user and must have been added to a Swift group. The Swift group must be added as a
custom group, unless the user is a member of the Swift admin group, which is added automatically to the custom groups.
● The Swift user must have been added to a group ACL for the container, or the user must be in the Swift admin group,
which is added automatically to the custom groups.
NOTE:
Reading a Swift DLO object through the S3 API does not work. The request follows a generic code path for the read
without acknowledging the presence of the X-Object-Manifest metadata key, to stitch the object back from its
individual paths.
NOTE:
For an MPU upload, the Swift list parts operation fails since it does not understand the '?uploadId=<uploadId>'
sub-resource.
S3 49
● An administrator creates a key and distributes to the object user (Create a key for an object user).
● A domain user creates an object user account by creating a new secret key using the self-service API provided by the
self-service API (Create an S3 secrte key: self-service).
It is possible to have two secret keys for a user. When changing (sometimes referred to as "rolling over") a secret key, an
expiration time in minutes can be set for the old key. During the expiration interval, both keys are accepted for requests. This
provides a grace period where an application can be updated to use the new key.
You can find out more information about the API call in the ECS API Reference.
50 S3
Table 26. Object Secret Keys
API Path Description
/object/secret-keys API to allow S3 client users to create a new secret key that enables them to
access objects and buckets within their namespace. This is also referred to as a
self-service API.
The payload for the /object/secret-keys can include an optional existing key expiry time.
<secret_key_create_param>
<existing_key_expiry_time_mins></existing_key_expiry_time_mins>
</secret_key_create_param>
If you are creating a secret key for the first time, you can omit the existing_key_expiry_time_mins parameter and a call would
be:
POST object/secret-keys
Request body
<?xml version="1.0" encoding="UTF-8"?>
<secret_key_create_param/>
Response
<user_secret_key>
<secret_key>...</secret_key>
<key_timestamp>...</key_timestamp>
<link rel="..." href="..." />
</user_secret_key>
S3 51
Generate first key
You can generate a secret key.
Check keys
You can check the keys that you have been assigned. In this case, there are two keys with the first having an expiration
date/time.
52 S3
Authenticating with the S3 service
The ECS S3 service enables authentication using Signature Version 2 and Signature Version 4. This topic identifies any ECS-
specific aspects of the authentication process.
Amazon S3 uses an authorization header that must be present in all requests to identify the user and provide a signature for the
request. The format of the authorization header differs between Signature Version 2 and Signature Version 4 authentication.
In order to create an authorization header, you need an AWS Access Key Id and a Secret Access Key. In ECS, the AWS Access
Key Id maps to the ECS user id (UID). An AWS Access Key ID has 20 characters (some S3 clients, such as the S3 Browser,
check this), but ECS data service does not have this limitation.
Authentication using Signature V2 and Signature V4 are introduced in:
● Authenticating using Signature V2
● Authenticating using Signature V4
The following notes apply:
● In the ECS object data service, the UID can be configured (through the ECS REST API or the ECS Portal with two secret
keys. The ECS data service tries to use the first secret key, and if the calculated signature does not match, it tries to use the
second secret key. If the second key fails, it rejects the request. When users add or change the secret key, they should wait
two minutes so that all data service nodes can be refreshed with the new secret key before using the new secret key.
● In the ECS data service, namespace is also taken into HMAC signature calculation.
For example:
GET /photos/puppy.jpg
?AWSAccessKeyId=user11&Expires=1141889120&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv4%3D
HTTP/1.1
Host: myco.s3.amazonaws.com
Date: Mon, 26 Mar 2007 19:37:58 +0000
Authorization: AWS4-HMAC-SHA256
Credential=user11/20130524/us/s3/aws4_request,
SignedHeaders=host;range;x-amz-date,
Signature=fe5f80f77d5fa3beca038a248ff027d0445342fe2855ddc963176630326f1024
The Credential component comprises your Access Key Id followed by the Credential Scope. The Credential Scope comprises
Date/Region/Service Name/Termination String. For ECS, the Service Name is always s3 and the Region can be any string.
When computing the signature, ECS uses the Region string passed by the client.
Authentication using Signature V4 is described in:
● http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html , and
● http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html
An example of a PUT bucket request using Signature V4 is provided below:
S3 53
Authorization: AWS4-HMAC-
SHA256 Credential=user11/20160726/us/s3/aws4_request,SignedHeaders=host;x-amz-date;x-emc-
namespace,Signature=e75a150daa28a2b2f7ca24f6fd0e161cb58648a25121d3108f0af5c9451b09ce
x-emc-namespace: ns1
x-emc-rest-client: TRUE
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Length: 0
Host: 10.247.195.130:9021
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.2.1 (java 1.5)
Response:
HTTP/1.1 200 OK
Date: Tue, 26 Jul 2016 03:37:00 GMT
Server: ViPR/1.0
x-amz-request-id: 0af7c382:156123ab861:4192:896
x-amz-id-2: 3e2b2280876d444d6c7215091692fb43b87d6ad95b970f48911d635729a8f7ff
Location: /bucket_demo_2016072603365969263
Content-Length: 0
NOTE: Compatibility of the ECS Java SDK with the metadata search extension is described in Using Metadata Search from
the ECS Java SDK.
54 S3
The following code snippet shows how to set this up.
By default the Amazon client attempts to contact Amazon WebServices. In order to override this behavior and contact ECS you
need to set a specific endpoint.
You can set the endpoint using the setEndpoint method. The protocol specified on the endpoint dictates whether the client
should be directed at the HTTP port (9020) or the HTTPS port (9021).
NOTE: If you intend to use the HTTPS port, the JDK of your application must be set up to validate the ECS certificate
successfully; otherwise the client will throw SSL verification errors and fail to connect.
In the snippet below, the client is being used to access ECS over HTTP:
When using path-style addressing ( ecs1.emc.com/mybucket ), you will need to set the setPathStyleAccess option, as shown
below:
The CreateBucket operation differs from other operations in that it expects a region to be specified. Against S3 this would
indicate the data center in which the bucket should be created. However, ECS does not support regions. For this reason, when
calling the CreateBucket operation, we specify the standard region, which stops the AWS client from downloading the Amazon
Region configuration file from Amazon CloudFront.
client.createBucket("mybucket", "Standard");
The complete example for communicating with the ECS S3 data service, creating a bucket, and then manipulating an object is
provided below:
client.createBucket(bucketName, "Standard");
listObjects(client);
S3 55
client.copyObject(bucketName,objectFile.getName(),bucketName, "copy-" +
objectFile.getName());
listObjects(client);
}
56 S3
Feature Subfeature API
Bucket DeleteBucket BucketLifecycleConfiguration
Bucket GetBucket GetBucketLocationRequest
Bucket GetBucket GetBucketLifecycleConfigurationRequest
Bucket GetBucket GetBucketVersioningConfigurationRequest
Bucket GetBucketACL GetBucketAclRequest
Bucket GetBucketObjectVersions VersionListing
Bucket GetBucketVersioning BucketVersioningConfiguration
Bucket BucketOperations CreateBucket
Bucket BucketVersioning SetBucketVersioningConfigurationRequest
Bucket ACL PUTBucketACL
Bucket ACL SETBucketACL
Bucket ACL GETBucketACL
Bucket BucketPolicy SetBucketPolicyRequest
Bucket BucketPolicy GetBucketPolicyRequest
Bucket BucketOperations DeleteBucketPolicyRequest
Bucket BucketOperations ListObjectsRequest
Bucket BucketOperations HeadBucketRequest
Bucket BucketOperations HeadBucketResult
multipartupload abortmultipartupload AbortMultipartUploadRequest
multipartupload abortmultipartupload AbortMultipartUploadResult
multipartupload completemultipartupload CompleteMultipartUpload
multipartupload completemultipartupload CompleteMultipartUploadRequest
multipartupload completemultipartupload CompleteMultipartUploadResul
multipartupload initiatemultipartupload InitiateMultipartUploadRequest
multipartupload initiatemultipartupload InitiateMultipartUploadResult
multipartupload listmultipartuploads ListMultipartUploadsRequest
multipartupload listmultipartuploads ListMultipartUploadsResult
multipartupload listparts ListPartsRequest
multipartupload listparts PartListing
multipartupload listparts PartSummary
multipartupload listparts ListPartsResult
multipartupload uploadpart UploadPartRequest
multipartupload uploadpart UploadPartResult
multipartupload uploadpartcopy CopyPartRequest
multipartupload uploadpartcopy CopyPartResult
Service GetService BucketListing
CORS GETBucketCORS BucketCrossOriginConfiguration
CORS GETBucketCORS GetBucketCrossOriginConfigurationRequest
S3 57
Feature Subfeature API
CORS DELETEBucketCORS DeleteBucketCrossOriginConfigurationRequest
CORS PUT Bucket CORS CORSRule
CORS PUT Bucket CORS BucketCrossOriginConfiguration
CORS PUT Bucket CORS SetBucketCrossOriginConfigurationRequest
NOTE: All these APIs are certified against AWS Java SDK version 1.11.769.
Feature API
Bucket Analytics DeleteBucketAnalyticsConfiguration
Bucket Analytics GetBucketAnalyticsConfiguration
Bucket Analytics ListBucketAnalyticsConfigurations
Bucket Analytics PutBucketAnalyticsConfiguration
Bucket Replication PutBucketReplication
Bucket Replication GetBucketReplication
Bucket Replication DeleteBucketReplication
Bucket encryption DeleteBucketEncryption
Bucket encryption GetBucketEncryption
Bucket encryption PutBucketEncryption
Bucket inventory DeleteBucketInventoryConfiguration
Bucket inventory GetBucketInventoryConfiguration
Bucket inventory ListBucketInventoryConfigurations
Bucket inventory PutBucketInventoryConfiguration
Bucket Metric DeleteBucketMetricsConfiguration
Bucket Metric GetBucketMetricsConfiguration
Bucket Metric List Bucket Metrics Configurations
Bucket Metric PutBucketMetricsConfiguration
Bucket website DeleteBucketWebsite
Bucket website GetBucketWebsite
Bucket website PutBucketWebsite
PublicAccessBlock DeletePublicAccessBlock
PublicAccessBlock GetPublicAccessBlock
PublicAccessBlock PutPublicAccessBlock
Bucket Accelarate GetBucketAccelerateConfiguration
Bucket Accelarate PutBucketAccelerateConfiguration
Bucket Logging GetBucketLogging
Bucket Logging PutBucketLogging
58 S3
Feature API
BucketRequestPayment GetBucketRequestPayment
BucketRequestPayment PutBucketRequestPayment
Bucket policy GetBucketPolicyStatus
Object Torrent GetObjectTorrent
Restore Object RestoreObejct
Object Content SelectObjectContent
Object legal hold SetObjectLegalHoldRequest
Object legal hold ObjectLockLegalHold
Object legal hold ObjectLockLegalHoldStatus
Object legal hold SetObjectLegalHoldResult
Object legal hold GetObjectLegalHoldRequest
Object legal hold GetObjectLegalHoldResult
Object retention SetObjectRetentionRequest
Object retention ObjectLockRetention
Object retention ObjectLockRetentionMode
Object retention SetObjectRetentionResult
Object retention GetObjectRetentionRequest
Object retention GetObjectRetentionResult
package com.emc.ecs.s3.sample;
import com.emc.object.s3.*;
import com.emc.object.s3.jersey.S3JerseyClient;
import java.net.URI;
sample.runSample();
}
S3 59
String bucketName = "mybucket";
String key1 = "test1.txt";
String content = "Hello World!";
try {
s3Client.createBucket(bucketName);
s3Client.putObject(bucketName, key1, content, "text/plain");
} catch (S3Exception e) {
// handle errors
}
}
}
request.withIfMatch(null).withIfNoneMatch("*")
● If you want to update an object sequentially, you can use the below command to ensure that the update follows the previous
update.
request.withIfUnmodifiedSince(null).withIfMatch(lastEtag)
For more information about the risk of lost updates or changing timeouts, see https://github.com/EMCECS/ecs-object-client-
java/wiki/Changing-Timeouts.
60 S3
ECS S3 error codes
The error codes that can be generated by the ECS S3 head are listed in the following table.
S3 61
Table 27. Error Codes (continued)
Error Code HTTP Generic Error Code Description Error
Status
Code
InvalidPartOrder 400 InvalidPartOrder The list of parts was not in ascending
order. Parts list must specified in
order by part number.
InvalidPartSizeZero 400 InvalidPartSizeZero The upload part size cannot be zero.
MissingEncryption 400 InvalidRequest The multipart upload initiate
requested encryption. Subsequent
part requests must include the
appropriate encryption parameters.
NoEncryptionNeed 400 InvalidRequest The multipart initiate request did not
request encryption. Please resend the
request without sending encryption
parameters.
BadMD5 400 InvalidRequest The calculated MD5 hash of the key
did not match the hash that was
provided.
BadEncryptKey 400 InvalidRequest The provided encryption parameters
did not match the ones used
originally.
InvalidRange 416 InvalidRange The requested range cannot be
satisfied.
KeyTooLong 400 KeyTooLong The specified key is too long.
MalformedACLError 400 MalformedACLError The XML provided was not well-
formed or did not validate against the
ECS published schema.
MalformedXML 400 MalformedXML Malformed xml (that does not
conform to the published xsd) for the
configuration was sent.
MaxMessageLengthExceeded 400 MaxMessageLengthExceeded The request was too big.
MetadataTooLarge 400 MetadataTooLarge The metadata headers exceed the
maximum allowed metadata size. *
InvalidProject 400 InvalidProject The specified project is Invalid.
InvalidVPool 400 InvalidVPool The specified vPool (Replication
Group) is Invalid.
InvalidNamespace 400 InvalidNamespace The specified namespace is Invalid.
MethodNotAllowed 405 MethodNotAllowed The specified method is not allowed
against this resource.
MissingContentLength 411 MissingContentLength The Content-Length HTTP header
must be provided.
MissingRequestBodyError 400 MissingRequestBodyError An empty XML document was sent.
The error message is: Request body
is empty.
MissingSecurityHeader 400 MissingSecurityHeader The equest was missing a required
header.
IncompleteLifecycleConfig 400 IncompleteLifecycleConfig At least one action needs to be
specified in a rule.
62 S3
Table 27. Error Codes (continued)
Error Code HTTP Generic Error Code Description Error
Status
Code
MalformedLifecycleConfig 400 MalformedLifecycleConfig The XML provided was not well-
formed or did not validate against the
published schema.
MalformedDateLifecycleConfig 400 MalformedDateLifecycleConfig The XML provided was not well-
formed or did not validate against
the published schema. Invalid Date or
Days.
NoSuchBucket 404 NoSuchBucket The specified bucket does not exist.
NoSuchBucketPolicy 404 NoSuchBucketPolicy The bucket policy does not exist.
NoSuchKey 404 NoSuchKey The specified key does not exist.
NoSuchRetention 404 NoSuchRetention The specified retention does not
exist.
ObjectUnderRetention 409 ObjectUnderRetention The object is under retention and
cannot be deleted or modified.
NoSuchUpload 404 NoSuchUpload The specified multipart upload does
not exist. The upload ID might be
invalid.
NotImplemented 501 NotImplemented The requested functionality is not
implemented.
OperationAborted 409 OperationAborted A conflicting conditional operation
is currently in progress against this
resource. Please try again.
PermanentRedirect 301 PermanentRedirect The bucket you are attempting to
access must be addressed using the
specified endpoint. Please send all
future requests to this endpoint.
PreconditionFailed 412 PreconditionFailed At least one of the preconditions you
specified did not hold.
RequestIsNotMultiPartContent 400 RequestIsNotMultiPartContent Bucket POST must be of the
enclosure type multipart/form-
data.
S3 63
Table 27. Error Codes (continued)
Error Code HTTP Generic Error Code Description Error
Status
Code
ServiceUnavailable 503 ServiceUnavailable Please reduce your request rate.
TemporaryRedirect 307 TemporaryRedirect Requests are being redirected to the
bucket while DNS updates.
TooManyBuckets 400 TooManyBuckets The request attempted to create
more buckets than allowed.
UnexpectedContent 400 UnexpectedContent The request does not support this
content.
UnresolvableGrantByEmailAddress 400 UnresolvableGrantByEmailAddress The email address you provided does
not match any account on record.
InvalidBucketState 409 InvalidBucketState The request is not valid with the
current state of the bucket.
SlowDown 503 SlowDown Please reduce your request rate.
AccountProblem 403 AccountProblem There is a problem with the specified
account that prevents the operation
from completing successfully.
CrossLocationLoggingProhibited 403 CrossLocationLoggingProhibited Cross location logging is not allowed.
Buckets in one geographic location
cannot log information to a bucket in
another location.
ExpiredToken 400 ExpiredToken The provided token has expired.
IllegalVersioningConfiguration 400 IllegalVersioningConfiguration The Versioning configuration
Exception Exception specified in the request is invalid.
IncorrectNumberOfFilesInPost 400 IncorrectNumberOfFilesInPost POST requires exactly one file upload
Request Request per request.
InvalidAddressingHeader 500 InvalidAddressingHeader The specified role must be
Anonymous role.
InvalidLocationConstraint 400 InvalidLocationConstraint The specified location constraint is
not valid.
InvalidPolicyDocument 400 InvalidPolicyDocument The content of the form does not
meet the conditions specified in the
policy document.
InvalidStorageClass 400 InvalidStorageClass The storage class you specified is not
valid.
InvalidTargetBucketForLogging 400 InvalidTargetBucketForLogging The target bucket for logging does
not exist, is not owned by you, or
does not have the appropriate grants
for the log delivery group.
InvalidToken 400 InvalidToken The provided token is malformed or
otherwise invalid.
InvalidURI 400 InvalidURI Unable to parse the specified URI.
MalformedPOSTRequest 400 MalformedPOSTRequest The body of the POST request is
not well-formed multipart/form-
data.
64 S3
Table 27. Error Codes (continued)
Error Code HTTP Generic Error Code Description Error
Status
Code
NoLoggingStatusForKey 400 NoLoggingStatusForKey There is no such thing as a logging
status subresource for a key.
NoSuchLifecycleConfiguration 404 NoSuchLifecycleConfiguration The lifecycle configuration does not
exist.
NoSuchVersion 404 NoSuchVersion Indicates that the version ID specified
in the request does not match an
existing version.
RequestTorrentOfBucketError 400 RequestTorrentOfBucketError Requesting the torrent file of a
bucket is not permitted.
UserKeyMustBeSpecified 400 UserKeyMustBeSpecified The bucket POST must contain the
specified field name. If it is specified
please check the order of the fields.
AmbiguousGrantByEmailAddress 400 AmbiguousGrantByEmailAddress The email address you provided
is associated with more than one
account.
BucketAlreadyOwnedByYou 409 BucketAlreadyOwnedByYou The previous request to create the
named bucket succeeded and you
already own it.
CredentialsNotSupported 400 CredentialsNotSupported The request does not support
credentials.
InlineDataTooLarge 400 InlineDataTooLarge The inline data exceeds the maximum
allowed size.
InvalidPayer 403 InvalidPayer All access to this object has been
disabled.
TokenRefreshRequired 400 TokenRefreshRequired The provided token must be
refreshed.
AccessModeNotSupported 409 AccessModeNotSupported The bucket does not support file
access or the requested access mode
is not allowed.
AccessModeInvalidToken 409 AccessModeInvalidToken The token for the file access switch
request is invalid.
NoSuchBaseUrl 400 NoSuchBaseUrl The specified BaseUrl does not exist.
NoDataStoreForVirtualPool 404 NoDataStoreForVirtualPool No Data Store found for Replication
Group of the bucket.
VpoolAccessNotAllowed 400 Cannot Access Vpool Bucket is hosted on a Replication
Group that is not accessible from S3.
InvalidCorsRequest 403 InvalidCorsRequest Invalid CORS request.
InvalidCorsRule 400 InvalidCorsRule Invalid CORS rule.
NoSuchCORSConfiguration 404 NoSuchCORSConfiguration The CORS configuration does not
exist.
InvalidAclRequest 404 NoACLFound The ACL does not exist.
InsufficientStorage 507 Insufficient Storage The server cannot process the
request because there is not enough
space on disk.
BadMaxParts 400 InvalidArgument Argument max-parts must be an
integer between 0 and 2147483647.
S3 65
Table 27. Error Codes (continued)
Error Code HTTP Generic Error Code Description Error
Status
Code
BucketNotFound 404 NoSuchBucket The specified bucket does not exist.
NotSupported 400 Not Supported The bucket may be locked.
InvalidContentLength 400 Invalid content length The content length has invalid value.
InvalidVersioningRequest 403 Invalid request for version control The bucket is in compliance mode.
InvalidLifeCycleRequest 403 Invalid request for life cycle The bucket is in compliance mode.
RetentionPeriodRequired 400 Invalid request for bucket with The bucket requires a retention
compliance period.
Conflict 409 Conflict The bucket may be locked.
MethodForbidden 403 Forbidden Check if quota has been exceeded.
NotAcceptable 406 Content encoding not acceptable The object Content-Encoding
does not match requested Accept-
Content.
InvalidEncoding 400 Invalid URL enconding The URL encoding used is invalid.
InvalidMetadataQuery 400 Invalid metadata query entered The metadata query entered does not
conform to valid syntax
InvalidMetadataSearchList 400 Invalid metadata search list entered A keyname on the request is not a
valid indexable key, or the format of
the request list is incorrect.
MetadataSearchNotEnabled 405 Metadata search not enabled Metadata search is not enabled for
this bucket.
MetadataSearchBadParameter 400 Metadata search invalid parameter Invalid search index key name, sort
used in query key name or attribute name value.
MetadataSearchInvalidArgument 400 Metadata search invalid parameter Invalid search index value format or
used in query operator used.
MetadataSearchInvalidValuefor 400 Metadata search key indexing found Object operation failed because a
Datatype invalid input value user metadata value cannot be
converted to its defined datatype.
MetadataOperationNotSupported 405 Metadata search operation not Metadata query with both AND and
supported OR logical operators not supported.
MetadataSearchBadSortParameter 400 Metadata search invalid sort The sort parameter has to be present
parameter in the query as a search parameter.
MetadataSearchRestriction 400 Buckets that are encrypted or within Metadata search is mutually exclusive
an encrypted namespace cannot have with bucket/namespace encryption.
metadata search enabled
MetadataSearchTooManyIndexKeys 400 The number of Index keys exceeds The number of keys to be indexed
the maximum allowed exceeds the maximum number
allowed, try with fewer keys.
InvalidOrNoCustomerProvided 400 Invalid or no customer provided No encryption key, or an encryption
EncryptionKey encryption key key that did not match the one in the
system, was provided.
DareUnavailable 403 Server side encryption (D@RE) is not D@RE JAR/license is unavailable
supported hence server side encryption
requests are not supported.
SelfCopyInvalidRequest 400 InvalidRequest The copy request is illegal because
it is trying to copy an object to
66 S3
Table 27. Error Codes (continued)
Error Code HTTP Generic Error Code Description Error
Status
Code
itself without changing the object's
metadata or encryption attributes.
OverLappingPrefixes 400 Invalid Request Found overlapping prefixes.
SamePrefix 400 Invalid Request Found two rules with same prefix.
XAmzContentSHA256Mismatch 400 XAmzContentSHA256Mismatch The Content-SHA256 you specified
did not match what we received
InvalidJSON 400 InvalidJSON Policies must be valid JSON and the
first byte must be {.
NOTE:
● The PUT request header is limited to 8 KB in size. Within the PUT request header, the user-defined metadata is limited
to 2 KB in size. User-defined metadata is a set of key-value pairs. The size of user-defined metadata is measured by
taking the sum of the number of bytes in each key and value plus four: a colon and space to separate the name and
value and two bytes for carriage return-linefeed.
● When the system throws a 500 error, it allows the user to retry the request. In such cases, it is recommended to
use a backoff algorithm which waits progressively longer between retries for consecutive error responses. For more
information about guidance on 500 error rate response in ECS, see KB 504612.
Hadoop S3A allows you to connect your Hadoop cluster to any S3 compatible object store that is in the public cloud, hybrid
cloud, or on-premises.
S3 67
Settings Additional Information
fs.s3a.fast.upload.buffer ● Default: Disk
● Recommended: Array or bytebuffer
NOTE: Heap space that is used is fs.s3a.multipart.size *
fs.s3a.fast.upload.active.block
fs.s3a.threads.max ● Default: 10
● Recommended: Change this to 'Between 25% and 50% of configured
CPU cores.
fs.s3a.multiobjectdelete.enable ● Default: True
● Recommended: True or false
fs.s3a.committer.threads ● Default: 8
● Recommended: 8
68 S3
The assertion is used to assume one of the possible IAM roles that are permissible for the user. Once the role has been assumed,
the Hadoop user is provided with a temporary access key, a temporary secret key, and a temporary token. The Hadoop user
uses these temporary credentials to access the S3A data until the credentials expire. These temporary credentials correspond to
the configured policies which enforce security controls on an S3 object store.
For more information about STS, see Secure Token Service.
The temporary credentials are passed to Hadoop using these Hadoop settings:
● fs.s3a.access.key=ACCESS-KEY
● fs.s3a.secret.key=SECRET-KEY
● fs.s3a.session.token=SESSION-TOKEN
● fs.s3a.aws.credentials.provider=org.apache.hadoop.fs.s3a.TemporaryAWSCredentialsProvider
A sample of temporary credentials provided below:
NOTE: Data2 IP is enabled by default in S3 from ECS 3.6.1 and later versions.
S3 69
2
Cloud DVR
This section describes about the Cloud DVR feature in ECS.
Topics:
• Cloud DVR overview
• Cloud DVR supported APIs
70 Cloud DVR
Method Request Header Key Request Request Response Description
Header Value Parameter Parameter
operation is succeeded, any
attempt to read the deleted
copy must return an HTTP
404 error.
GET - - fanout - Lists all copies of specific
fanout object in bucket.
Returns an HTTP 404 error
if there is no such fanout
object or fanout copies exist.
GET - - max-keys ● IsTruncated When these request
● NextFanoutKe parameters are used along
yMarker with a fanout parameter, it
● NextFanoutIn limits the maximum number
dexMarker of entries that are returned
in a single listing response.
When a listing response is
truncated (when the bucket
contains more entries to
be listed), this parameter
is set to true. When the
parameter is set to true, the
FanoutKeyMarker and
FanoutIndexMarker are
also present in the response,
and should be used in
the next listing request to
receive the next page of
listing results.
GET - - ● fanout- - When these request
key- parameters are used along
marker with a fanout parameter, it is
● fanout- used as a marker to resume
index- paginated listing.
marker
Cloud DVR 71
Response:
Response:
Response:
72 Cloud DVR
> x-fanout-copy-index:0
>
< HTTP/1.1 206 Partial Content
< Date: Wed, 29 Jan 2020 03:16:27 GMT
* Server ViPR/1.0 is not blacklisted
< Server: ViPR/1.0
< x-amz-request-id: 0af74eb8:16fef1759e4:80:1
< x-amz-id-2: 54baf9b41b37404e6d350a806473e5d4c7a0bb10612c1dd77157abb800b9eafa
< ETag: "48e10fc1163cd2c7db2bf9a4225cd5cd"
< fanout-copy-count: 5
< fanout-copy-size: 11
< Last-Modified: Wed, 29 Jan 2020 03:14:13 GMT
< x-emc-mtime: 1580267653773
< Content-Type: application/octet-stream
< Content-Length: 11
<
HELLOOO!!!
Response:
HTTP/1.1 200 OK
Date: Wed, 04 Dec 2019 19:45:41 GMT
ETag: "48e10fc1163cd2c7db2bf9a4225cd5cd"
fanout-copy-count: 3
fanout-copy-size: 11
Last-Modified: Wed, 04 Dec 2019 19:35:38 GMT
x-emc-mtime: 1575488138240
Server: ViPR/1.0
x-amz-request-id: 0af74eb8:16ed21aaacd:92:d
x-amz-id-2: 834d1a548e92e0e2487b59a87f45c39b522ac30fffc3cf0d12d6ccaf77c04df7
Content-Type: application/octet-stream
Content-Length: 33
Response:
Cloud DVR 73
<LastModified>2019-12-04T21:11:59.309Z</LastModified> <ETag>"1575493919143-"</ETag>
</CopyObjectResult>
Response:
Response:
Response:
74 Cloud DVR
<Index>0</Index>
</FanoutObjects>
<FanoutObjects>
<Key>file1</Key>
<Index>1</Index>
</FanoutObjects>
<FanoutObjects>
<Key>file1</Key>
<Index>2</Index>
</FanoutObjects>
<FanoutObjects>
<Key>file1</Key>
<Index>3</Index>
</FanoutObjects>
<FanoutObjects>
<Key>file1</Key>
<Index>4</Index>
</FanoutObjects>
<FanoutObjects>
<Key>file2</Key>
<Index>0</Index>
</FanoutObjects>
<FanoutObjects>
<Key>file2</Key>
<Index>1</Index>
</FanoutObjects>
<FanoutObjects>
<Key>file2</Key>
<Index>2</Index>
</FanoutObjects>
<FanoutObjects>
<Key>file2</Key>
<Index>3</Index>
</FanoutObjects>
<FanoutObjects>
<Key>file2</Key>
<Index>4</Index>
</FanoutObjects>
</FanoutBucketListingResult>
Response:
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Name>vdc1_buck1</Name>
<Prefix/>
<Marker/>
<MaxKeys>1000</MaxKeys>
<IsTruncated>false</IsTruncated>
<ServerSideEncryptionEnabled>false</ServerSideEncryptionEnabled>
<Contents>
<Key>copyfile1</Key>
<LastModified>2019-12-14T22:44:22.386Z</LastModified>
<ETag>"1576363462360-"</ETag>
<Size>11</Size>
<StorageClass>STANDARD</StorageClass>
<Owner>
<ID>user1</ID>
<DisplayName>user1</DisplayName>
</Owner>
<IsFanoutObject>false</IsFanoutObject>
</Contents>
<Contents>
<Key>file1</Key>
<LastModified>2019-12-14T22:47:34.319Z</LastModified>
<ETag>"48e10fc1163cd2c7db2bf9a4225cd5cd"</ETag>
Cloud DVR 75
<Size>55</Size>
<StorageClass>STANDARD</StorageClass>
<Owner>
<ID>user1</ID>
<DisplayName>user1</DisplayName>
</Owner>
<IsFanoutObject>true</IsFanoutObject>
</Contents>
<Contents>
<Key>file2</Key>
<LastModified>2019-12-14T22:47:44.763Z</LastModified>
<ETag>"48e10fc1163cd2c7db2bf9a4225cd5cd"</ETag>
<Size>55</Size>
<StorageClass>STANDARD</StorageClass>
<Owner>
<ID>user1</ID>
<DisplayName>user1</DisplayName>
</Owner>
<IsFanoutObject>true</IsFanoutObject>
</Contents>
</ListBucketResult>
Response:
Response:
76 Cloud DVR
<FanoutObjects>
<Key>file1</Key>
<Index>4</Index>
</FanoutObjects>
<FanoutObjects>
<Key>file2</Key>
<Index>0</Index>
</FanoutObjects>
</FanoutBucketListingResult>
Response:
Response:
Cloud DVR 77
3
ECS IAM for S3
This section describes about the ECS Identity and Access Management (IAM) feature for S3.
Topics:
• ECS IAM overview
• ECS IAM identities
• Backward compatibility
• ECS IAM API and SDK access
• AWS SDK APIs not supported in ECS IAM
• ECS IAM error codes
• ECS IAM supported condition keys
• ECS IAM limitations on entities and objects
• ECS IAM access management
• Secure Token Service
• ECS IAM SAML support
Roles An ECS IAM role is an identity that is assumable by trusted internal and external users. A role
does not have any credentials associated with it. Instead, when an entity assumes a role, the
system provides you the temporary credentials which contain an access key ID, secret access
key, and a security token.
For more information about configuring these identities, see ECS Administration Guide.
Backward compatibility
This section describes about IAM backward compatibility with ECS legacy entities.
Access control
Inthis section, ECS IAM users and the namespace root users are referred as IAM users.
● Access control for legacy users remains the same.
● Access control for IAM users is similar to AWS IAM user access control in all respects including ACLs.
● Changing the access control for IAM users such as using identity policies, bucket policies, and ACLs do not have any impact
on legacy users access control.
● IAM users can access objects and buckets that are created by legacy users if they are provided with the right permissions.
By default,
○ Buckets that are created by legacy users have a default ACL associated with the namespace account that contains the
bucket. This ACL provides full control over the bucket. This is true for the buckets that are created before or after the
upgrade.
○ Objects that are created by legacy users have default ACL associated with the legacy user only.
○ IAM users who have the required permissions can modify ACLs in buckets and objects that are created by legacy users
and set an AWS compatible ACL (account ACL or group ACL).
● Legacy users can access objects and buckets that are created by IAM users. For that, legacy user access control should
follow legacy semantics. It must also have legacy ACLs associated with them. In detail:
○ The legacy owner for buckets that are created by IAM users is the namespace root user that contains the bucket.
○ The legacy owner for objects that are created by IAM users are respectively the namespace root of the IAM user.
○ Users with appropriate permissions can set or change ACLs anytime.
● A single bucket policy is supported for both IAM and legacy users.
DeleteGroupPolicy Deletes the specified inline policy from its Permissions group*
group. management
URL: /iam/?Action=DeleteGroupPolicy
Query Parameters: GroupName*,
PolicyName*
Error: LimitExceeded, NoSuchEntity,
ServiceFailure
DeleteRolePolicy Deletes the specified inline policy from its Permissions role*
role. management
URL: /iam/?Action=DeleteRolePolicy
Query Parameters: RoleName*,
PolicyName*
Error: LimitExceeded, NoSuchEntity,
ServiceFailure
DeleteUserPolicy Deletes the specified inline policy from its Permissions user*
user. management
URL: /iam/?Action=DeleteUserPolicy
Query Parameters: UserName*,
PolicyName*
Error: LimitExceeded, NoSuchEntity,
ServiceFailure
URL: /iam/?
Action=GetContextKeysForPrincipalPolicy
Query Parameters: PolicyInputList,
PolicySourceArn*
Error : InvalidInput, NoSuchEntity
GetGroup Returns a list of IAM users that are in the Read group*
specified IAM group. You can paginate the
results using the MaxItems and Marker
parameters.
URL: /iam/?Action=GetGroup
Query Parameters: GroupName*, Marker,
MaxItems
Error: NoSuchEntity, ServiceFailure
URL: /iam/?Action=GetPolicy
Query Parameters: PolicyArn*
Error: InvalidInput, NoSuchEntity,
ServiceFailure
ListAccessKeys Lists information about the access key IDs List user*
that are associated with the specified IAM
user.
URL: /iam/?Action=ListAccessKeys
Query Parameters: UserName*
Error: NoSuchEntity, ServiceFailure
ListAttachedGroupPolicies List all managed policies that are attached List group*
to the specified IAM group.
URL: /iam/?
Action=ListAttachedGroupPolicies
Query Parameters: GroupName*, Marker,
MaxItems, PathPrefix (only '/' supported)
Error: InvalidInput, NoSuchEntity,
ServiceFailure
ListAttachedRolePolicies List all managed policies that are attached List role*
to the specified IAM role.
URL: /iam/?
Action=ListAttachedRolePolicies
Query Parameters: RoleName*, Marker,
MaxItems, PathPrefix (only '/' supported)
Error: InvalidInput, NoSuchEntity,
ServiceFailure
ListAttachedUserPolicies List all managed policies that are attached List user*
to the specified IAM user URL: /iam/?
Action=ListAttachedUserPolicies Query
Parameters: UserName*, Marker,
MaxItems, PathPrefix (only '/' supported)
Error: InvalidInput, NoSuchEntity,
ServiceFailure
ListEntitiesForPolicy Lists all entities (IAM users, groups, and List policy*
roles) that are attached to the specified
managed policy.
URL: /iam/?Action=ListEntitiesForPolicy
Query Parameters: EntityFilter, Marker,
MaxItems, PathPrefix (only '/' supported),
PolicyArn*, PolicyUsageFilter
Error: InvalidInput, NoSuchEntity,
ServiceFailure
ListGroupsForUser List the IAM groups that the provided IAM List user*
user belongs to.
URL: /iam/?Action=ListGroupsForUser
Query Parameters: Marker, MaxItems,
UserName*
Error: NoSuchEntity, ServiceFailure
ListRolePolicies List the names of the inline policies that List role*
are in the specified IAM role.
URL: /iam/?Action=ListRolePolicies
Query Parameters: RoleName*, Marker,
MaxItems
Error: NoSuchEntity, ServiceFailure
ListRoles List the IAM roles that have the specified List -
path prefix.
URL: /iam/?Action=ListRoles
Query Parameters: Marker, MaxItems,
PathPrefix (only '/' supported)
Error: ServiceFailure
ListUserPolicies List the names of the inline policies that List user*
are in the specified IAM user.
URL: /iam/?Action=ListUserPolicies
Query Parameters: UserName*, Marker,
MaxItems
Error: NoSuchEntity, ServiceFailure
ListUsers List the IAM users that have the specified List -
path prefix.
URL: /iam/?Action=ListUsers
Query Parameters: Marker, MaxItems,
PathPrefix (only '/' supported)
Error: ServiceFailure
ListUserTags Lists the tags that are attached to the List user*
specified user.
URL: /iam/?Action=ListUserTags
Query Parameters: Marker, MaxItems,
UserName*
Error: NoSuchEntity, ServiceFailure
Other management APIs ● Legacy users, IAM users, and IAM roles cannot access other management APIs.
● ECS management users can obtain X-SDS-AUTH-TOKEN from auth service to access
other management APIs.
NOTE: All these APIs are certified against AWS Java SDK version 1.11.769.
Feature API
User/Account UpdateUser
User/Account UploadSSHPublicKey
User/Account UpdateSSHPublicKey
User/Account DeleteSSHPublicKey
User/Account ListSSHPublicKeys
User/Account GetSSHPublicKey
User/Account ChangePassword
User/Account CreateAccountAlias
User/Account DeleteAccountAlias
User/Account ListAccountAliases
User/Account CreateLoginProfile
User/Account GetLoginProfile
User/Account UpdateLoginProfile
User/Account DeleteLoginProfile
OIDC Support CreateOpenIDConnectProvider
OIDC Support AddClientIDToOpenIDConnectProvider
OIDC Support GetOpenIDConnectProvider
OIDC Support ListOpenIDConnectProviders
OIDC Support DeleteOpenIDConnectProvider
OIDC Support RemoveClientIDFromOpenIDConnectProvider
OIDC Support UpdateOpenIDConnectProviderThumbprint
Policy DeleteAccountPasswordPolicy
Policy GetAccountPasswordPolicy
Policy UpdateAccountPasswordPolicy
Policy ListPoliciesGrantingServiceAccess
Group UpdateGroup
Role UpdateRoleDescription
Role CreateServiceLinkedRole
ForAllValues:String
ForAnyValue: String
aws:TokenIssueTime Date Checks the date and time that temporary security
credentials were issued.
aws:principaltype String Indicates the type of principal making the request.
● Root user is Account.
● IAM user is User.
● Legacy object user is ECSUser.
● SAML or Assumed role user is AssumedRole.
aws:userid String Based on authorized user access is set to the
following:
● Root user ARN if root user is requester.
● IAM user unique id IAM user is requester.
● If SAML federated user is requester, it is set to the
role-id:caller-specified-role-name
● If assumed role user is requester, it is set to the
role-id:caller-specified-role-name
role-id: is the unique id of role
caller-specified-role-name: is the
RoleSessionName in AssumeRole request or the
name attribute value in SAML assertion passed to
AssumeRoleWithSAML request.
aws:username String Based on authorized user access, if requester is an
IAM user, it is set to the IAM username otherwise it is
not set.
Inline policy names ● Must be unique to the user, group, or to the role that they are embedded in.
● Can contain any Basic Latin (ASCII) characters except these special characters:
Backward slash (\), forward slash (/), asterisk (*), question mark (?), and space.
These characters are reserved according to the RFC (Request for Comments)
3986 Internet standard.
Policy documents Can contain these Unicode characters: horizontal tab (U+0009), linefeed (U+000A),
carriage return (U+000D), and characters in the range from U+0020 to U+00FF.
For managed policies ● You can add up to 10 managed policies to an IAM user,
role, or group.
● The size of each managed policy cannot exceed 6,144
characters.
NOTE: IAM does not count white space when calculating
the size of a policy against these limitations.
For session policies ● You can pass only one inline policy or specify up to 10
managed policy ARNs when assuming a role.
● The size of each session policy cannot exceed 2,048
characters.
NOTE: If there is an explicit deny in any policy, then the request is denied otherwise there must be a policy that explicitly
allows the request. If neither then by default the request is denied.
ACLs
This section describes the differences between the ECS S3 user ACL access with the ECS IAM S3 user ACL access.
S3 Request authorization
During the S3 request authorization process, the system evaluates permission using user, bucket, and object contexts as
needed.
Context Description
User In this context, if the requester is an ECS IAM principal, the principal must have permission from the parent
namespace to which it belongs. In this step, the subset of policies that are owned by the parent account
(also referred as the context authority) is evaluated. This subset of policies includes the user policy that the
parent attaches to the principal. If the parent also owns the resource in the request (bucket, object), then
the corresponding resource policies (bucket policy, bucket ACL, and object ACL) are also evaluated at the
same time.
Bucket In this context, ECS evaluates policies that are owned by the namespace that owns the bucket. If the
namespace that owns the object in the request is not same as the bucket owner, in the bucket context the
policies are checked to verify that the bucket owner has not explicitly denied access to the object. If there
is an explicit deny set on the object, then the request is not authorized.
Object In this context, the requester must have permissions from the object owner to perform a specific object
operation. In this step, the object ACL is evaluated if required.
In the S3 bucket operation authorization process, at first the system evaluates whether the requester is an ECS IAM user. If
yes, then the request is evaluated against the user context and the bucket contexts. If both verifications are authorized, the
access is granted. Else, it is denied.
The below table describes the summary of access details for the same and cross account bucket operation:
In the S3 object operation authorization process, at first the system evaluates whether the requester is an ECS IAM user. If yes,
then the request is evaluated against the user, bucket, and object contexts. If these three contexts verifications are authorized,
the access is granted. Else, it is denied.
The below table describes the summary of access details for the same and cross account bucket operation:
Method Example
Attaching a policy to the user 1. Trust policy for Role assumeRoleSameAccount in ns1:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "urn:ecs:iam::ns1:root"
},
"Action": "sts:AssumeRole"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"sts:AssumeRole"
],
"Resource": "urn:ecs:iam::ns1:role/
assumeRoleSameAccount",
"Effect": "Allow",
"Sid": "VisualEditor0"
}
]
}
Adding the user to the role trust Trust policy for Role in ns1 with an ECS IAM user:
policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "urn:ecs:iam::ns1:user/user1"
},
"Action": "sts:AssumeRole"
}
]
}
Example
1. Trust policy for Role in ns1:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "urn:ecs:iam::ns2:root"
},
"Action": "sts:AssumeRole"
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"sts:AssumeRole"
],
"Resource": "urn:ecs:iam::ns1:role/assumeRoleCrossAccount",
AssumeRoleWithSAML
In order to use AssumeRoleWithSAML, you must configure your SAML identity provider (IdP) to issue the claims required by
ECS.
● IAM role must be created that specifies this SAML Provider in the trust policy.
● AssumeRoleWithSAML returns a set of temporary security credentials for users who have been authenticated through a
SAML authentication response.
● This operation provides a mechanism for tying an enterprise identity store or directory to role-based access without
user-specific credentials or configuration.
● Calling AssumeRoleWithSAML does not require the use of ECS security credentials. The identity of the caller is validated
by the claims that are provided in the SAML Assertions by the identity provider.
● Temporary credentials consist of an access key ID, a secret access key, and a security token.
● Following condition keys are supported in the AssumeRolePolicyDocument.
○ saml:aud
○ saml:iss
○ saml:sub
○ saml:sub_type
○ saml:edupersonorgdn
○ saml:namequalifier
Example role trust policy
{
"Version":"2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Principal":{
"Federated":"urn:aws:iam::s3:saml-provider/provider1"
},
"Action":"sts:AssumeRoleWithSAML",
"Condition":{
"StringEquals":{
"SAML:sub":"<Idp>\\Bob",
"SAML:aud":"https://10.247.179.105/saml",
"SAML:eduPersonOrgDN":[
"ECS",
"Atmos"
],
"SAML:iss":"http://AD.<Idp>.emc.com/<Idp>/services/trust"
}
}
For example:
<AttributeStatement>
<Attribute Name="https://aws.amazon.com/SAML/Attributes/RoleSessionName">
<AttributeValue>[email protected]</AttributeValue>
</Attribute>
<Attribute Name="https://aws.amazon.com/SAML/Attributes/Role">
<AttributeValue>urn:ecs:iam::s3:saml-provider/provider1,urn:ecs:iam::s3:role/
<Idp>-Dev</AttributeValue>
<AttributeValue>urn:ecs:iam::s3:saml-provider/provider1,urn:ecs:iam::s3:role/
<Idp>-Production</AttributeValue>
</Attribute>
<Attribute Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.3">
<AttributeValue>ECS</AttributeValue>
</Attribute>
</AttributeStatement>
saml:sub This is the subject of the claim, which includes a value that
uniquely identifies an individual user within an organization. For example,
_3e52ef03414f3464d2461c00ebae0152c25fb88bbc.
saml:sub_type This key can be persistent, transient, or the full Format URI from the Subject and NameID
elements used in your SAML assertion. A value of persistent indicates that the value in
saml:sub is the same for a user across all sessions. If the value is transient, the user has
a different saml:sub value for each session.
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::exampleECSBucket/backup/${saml:namequalifier}/${saml:sub}",
"arn:aws:s3:::exampleECSBucket/backup/${saml:namequalifier}/${saml:sub}/*"
],
"Condition": {"StringEquals": {"saml:sub_type": "persistent"}}
}
}
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::exampleECSBucket/backup/${saml:namequalifier}/${saml:sub}",
"arn:aws:s3:::exampleECSBucket/backup/${saml:namequalifier}/${saml:sub}/*"
],
"Condition": {"StringEquals": {"saml:sub_type": "persistent"}}
}
}
Examples showing the use of the OpenStack Swift API can be found in OpenStack API Examples.
In an OpenStack environment, ECS can be used as a replacement for the OpenStack Swift component or alongside an
existing OpenStack Swift installation. While ECS can be used with any OpenStack distribution, it has been tested with Mirantis
OpenStack 9.1. Please note that ECS has been tested as a Swift replacement for user object storage and not as a Glance
backend.
Using OpenStack with ECS requires you to configure ECS so that it can authenticate OpenStack users. You can see
Authentication using ECS Keystone V3 integration for information about configuring authentication.
Swift extensions
ECS supports a number of extensions to the Swift API.
The extensions and the APIs that support them are listed below.
● Swift byte range extensions
● Retention
● File system enabled
HTTP/1.1 200 OK
Date: Mon, 12 Mar 2018 20:04:40 GMT
Content-Type: application/octet-stream
Last-Modified: Mon, 12 Mar 2018 20:04:28 GMT
ETag: 6
Content-Type: application/json
Content-Length: 43
To update a specific byte range within this object, the Range header in the object data request must include the start and end
offsets of the object that you are updating.
The format is: Range: bytes=<startOffset>-<endOffset>.
In the example below, the PUT request includes the Range header with the value bytes=10-14 indicating that bytes
10,11,12,13,14 are replaced by the value sent in the request. Here, the new value green is being sent.
green
When reading the object again, the new value is now The quick green fox jumps over the lazy dog. A specific
byte range within the object is updated, replacing the word brown with the word green.
HTTP/1.1 200 OK
Date: Mon, 12 Mar 2018 20:16:00 GMT
Content-Type: application/octet-stream
Last-Modified: Mon, 12 Mar 2018 20:15:16 GMT
ETag: 10
Content-Type: application/json
Content-Length: 43
brown cat
HTTP/1.1 200 OK
Date: Mon, 12 Mar 2018 20:51:55 GMT
Content-Type: application/octet-stream
Last-Modified: Mon, 12 Mar 2018 20:51:41 GMT
ETag: 25
Content-Type: application/json
Content-Length: 51
The quick brown cat jumps over the lazy dog and cat.
Note that when you overwrite existing parts of an object, the size and numbers of the new parts is added to the size and
numbers of the existing parts you overwrote. For example, in a bucket that has one part that is 20 KB in size, you overwrite
5 KB. When you query the bucket using GET /object/billing/buckets/{namespace}/{bucketName}/info, the
output shows total_mpu_size = 25 KB (not 20 KB) and total_mpu_parts = 2 (not 1).
and cat
When the object is retrieved, and cat is appended, and you see the full value: The quick green fox jumps over the
lazy dog and cat.
The quick green fox jumps over the lazy dog and cat.
--bound04acf7f0ae3ccc
Content-Type: application/octet-stream
Content-Range: bytes 4-8/50
quick
--bound04acf7f0ae3ccc
Content-Type: application/octet-stream
Content-Range: bytes 41-44/50
lazy
--bound04acf7f0ae3ccc--
Retention
The ECS Swift head supports retention of objects to prevent them being deleted or modified for a specified period of time. This
is an ECS extension and is not available in the standard Swift API.
Retention can be set in the following ways:
Retention period Stores a retention period with the object. The retention period is set using an x-emc-retention-
on object period header on the object.
Retention policy A retention policy can be set on the object and the period associated with the policy can be set for the
on object namespace. This enables the retention period for a group of objects to be set to the same value using a
policy and can be changed for all objects by changing the policy. The use of a policy provides much more
flexibility than applying the retention period to an object. In addition, multiple retention policies can be set
for a namespace to allow different groups of objects to have different retention periods.
The retention policy applied to an object using an x-emc-retention-policy header on the object
and the policy retention period must be set using the ECS Management REST API (or from the ECS
Portal).
When an attempt is made to modify or delete the object, the larger of the bucket retention period or the object period, set
directly on the object or using the object retention policy, is used to determine whether the operation can be performed.
Enabling FS access
You can enable file system access using the x-emc-file-system-access-enabled header when creating a bucket using
the Swift protocol. File system access can also be enabled when creating a bucket from the ECS Portal (using the ECS
Management REST API).
v1 ECS enables object users to authenticate with the ECS Swift service and obtain an authentication token
that can be used when making subsequent API calls to the ECS Swift service. See OpenStack Version 1
authentication.
v2 ECS enables object users to authenticate with the ECS Swift service to obtain a scoped token, that is, a
token associated with a tenant (equivalent to a project), that can be used when making subsequent API
calls to the ECS Swift service. See OpenStack Version 2 authentication
v3 ECS validates Keystone V3 users that present tokens scoped to a Keystone project. See Authentication
using ECS Keystone V3 integration.
For v1 and v2 protocols, access to the ECS object store using the OpenStack Swift protocol requires an ECS object user
account and a Swift password.
For v3, users are created, and assigned to projects and roles, outside of ECS using a Keystone V3 service. ECS does not
perform authentication, but validates the authentication token with the Keystone V3 service.
4. In the Swift password field, type a password for the Swift user.
5. Click Set Groups & Password.
PUT /object/user-password/[email protected]
<user_password_create>
<password>myPassword</password>
<namespace>EMC_NAMESPACE</namespace>
</user_password_create>
Response:
HTTP 200
2. Call the OpenStack authentication REST API shown below. Use port 9024 for HTTP, or port 9025 for HTTPS.
Request:
GET /auth/v1.0
X-Auth-User: [email protected]
X-Auth-Key: myPassword
HTTP/1.1
204 No
Content
Date: Mon, 12 Nov 2010 15:32:21 GMT
Server: Apache
X-Storage-Url: https://{hostname}/v1/account
X-Auth-Token: ECS_e6384f8ffcd849fd95d986a0492ea9a6
Content-Length: 0
If the UID and password are validated by ECS, the storage URL and token are returned in the response header. Further requests
are authenticated by including this token. The storage URL provides the host name and resource address. You can access
containers and objects by providing the following X-Storage-Url header:
X-Storage-Url: https://{hostname}/v1/{account}/{container}/{object}
The generated token expires 24 hours after creation. If you repeat the authentication request within the 24 hour period using
the same UID and password, OpenStack will return the same token. Once the 24 hour expiration period expires, OpenStack will
return a new token.
In the following simple authentication example, the first REST call returns an X-Auth-Token. The second REST call uses that
X-Auth-Token to perform a GET request on an account.
http://ecs.yourco.com:9024/auth/v1.0
The response looks like the following. The unscoped token is preceded by id and tokens generated by ECS are preceded by
the "ecs_" prefix.
{"access": {"token":
{"id":"ecs_d668b72a011c4edf960324ab2e87438b","expires":"1376633127950"l},"user":
{"name": "sysadmin", "roles":[ ], "role_links":[ ]
},"serviceCatalog":[ ] }} , }
{"access":{"token":{"id":"ecs_baf0709e30ed4b138c5db6767ba76a4e
","expires":"1376633255485","tenant":{"description":"s3","enabled":true,"name":"s3"}},
"user":{"name":"swift_admin","roles":[{"name":"member"},
{"name":"admin"}],"role_links":[]},
"serviceCatalog":[{"type":"object-store", "name":"Swift","endpoints_links":
[],"endpoint":[{"internalURL":
"http://203.0.113.10:9024/v1/s3","publicURL":"http://203.0.113.10:9024/v1/
s3"}]}]}}
Authorization Checks
ECS uses the information provided by the Keystone tokens to perform authorization decisions. The authorization checks are as
follows:
1. ECS checks whether the project that the token is scoped to match the project in the URI.
2. If the operation is an object operation, ECS evaluates the ACLs associated with the object to determine if the operation is
allowed.
3. If the operation is a container operation, ECS evaluates the requested operation. If the user has the admin role they can
perform the following container operations: list, create, update, read, and delete.
Domains
in Keystone V3 all users belong to a domain and a domain can have multiple projects. Users have access to projects based on
their role. If a user is not assigned to a domain, their domain will be default.
Objects and containers created using Swift Keystone V3 users will be owned by <user>@<domain.com>. If the user was not
assigned to a domain, their username assigned to containers and objects will be <user>@default.
This command enables users belonging to the GROUP LIST to have read access rights to container1. For example, to assign read
permissions to the group "Member":
After read permission is granted, users who belong to target group(s) can perform the following operations:
● HEAD container - Retrieve container metadata. Only allowed if user is assigned to group that has Tenant Administrator
privileges.
● GET container - List objects within a container.
● GET objects with container - Read contents of the object within the container.
This command enables users belonging to the GROUP LIST to have write access rights to container1. For example, to assign
write permissions to the group "Member":
The users in the group GROUP LIST are granted write permission. Once write permission is granted, users who belong to the
target group(s) can perform the following operations:
● POST container - Set metadata. Start with prefix "X-Container-Meta".
● PUT objects within container - Write/override objects within container.
The Atmos Programmer's Guide provides more information about the supported operations such as:
● Wire format compatibility for all supported operations, which also applies to the API operations exposed by ECS.
● Authenticating with the Atmos API and provides comprehensive examples for many of the supported features.
The Atmos Programmer’s Guide is available from http://support.emc.com.
NOTE:
● The x-emc-wschecksum header is supported in ECS.
● The Atmos objects do not inherit ACL from the group ACL that is set at a bucket level.
○ If there is no user ACL provided, the ACL is inherited from the x-emc-useracl header.
○ If there is no group ACL provided, the Read ACL is used by default.
● GET /rest/objects does not support different response types with x-emc-accept. For example, text/plain is not
supported.
● Read, Write, and Delete ACLs work in ECS the same as Atmos.
● POST /rest/objects supports the x-emc-object-id header to enable legacy (44 character) object Ids.
NOTE: Subtenant IDs are preserved in ECS after migration: The header is x-emc-subtenant-id:
{original_subt_id}.
API Extensions
ECS supports a number of extensions to the Atmos API.
The extensions and the APIs that support them are listed below:
● Appending data to an object
and cat
HTTP/1.1 200 OK
x-emc-mtime: 1431626712933
Date: Mon, 17 Jun 2013 20:46:01 GMT
x-emc-policy: default
x-emc-utf8: true
x-emc-request-id: 0af9ed8d:14cc314a9bc:112f6:9
x-emc-delta: 8
x-emc-append-offset: 24
Content-Length: 0
Server: Jetty(7.6.4.v20120524)
The offset position at which the data was appended is returned in the x-emc-append-offset header.
When the object is retrieved, and cat has been appended, and you can see the full value: The quick green fox jumps
over the lazy dog and cat.
Retention periods
Retention periods define how long ECS retains an object before it can be edited or deleted. During the retention period, the
object cannot be edited or deleted from the system until the retention period has expired.
While creating an Atmos object in ECS, the object retention can be:
● Defined directly on the object
● Inherited from the retention period set on the ECS bucket in which the object is created
When a retention policy is set on the ECS namespace, set the retention period directly on the object. The object does not inherit
the retention policy in the namespace.
ECS namespace ECS Portal from the New Namespace ● If you want to set a retention period for an object, and
or Edit Namespace page. a retention policy has been defined on the object user's
namespace, you must still define a retention period
ECS REST API POST / directly on the object as described earlier.
object/namespaces/namespace/
● If a retention policy is set on the ECS namespace,
{namespace}/retention
and/or a retention period is set on a bucket within the
ECS bucket ECS Portal from the New Bucket, or namespace, and an object is created within the bucket,
Edit Bucket page. ECS retains the namespace, bucket, and object for the
longest retention periods set for either the namespace,
ECS REST API or bucket.
PUT /object/bucket/ ● If a retention period has been set on the object itself
{bucketName}/retention through the object header, ECS retains the object for
the longest time set on the namespace, bucket, or
object.
● If a retention end date is defined on an object through
the Atmos API, ECS uses the Atmos API retention end
date set on the object, and ignores the namespace
retention policy, and bucket retention periods when
creating the object.
● While applying a retention policy on a subtenant
(bucket) containing Atmos objects, the retention policy
is applied to both objects created in the subtenant after
the retention policy was set, and objects that were
created in the subtenant before the retention policy
was set.
NOTE: For further details about Namespace Retention Policies and Bucket Retention Periods, see the ECS Administration
Guide that is available on https://www.dell.com/support/.
Example: Request and response to create an object with retention set:
Response
Response
HTTP/1.1 200 OK
Date: Mon, 30 Jan 2017 16:56:35 GMT
x-emc-mtime: 1485795387838
x-emc-retention-period: 21798212
x-emc-meta: user.maui.retentionEnd=2017-10-10T00:00:00Z,user.maui.retentionEnable=true,allow-inline-
update=false,atime=2017-01-30T16:45:48Z,ctime=2017-01-30T16:56:27Z,ctype=plain/text,data-
range=CAAQgFA=,dek=kq/W1Rg/
7qbmaCcLF8pFvqlDJ8+suPTdVddBBZFwZA86muG3P0Pb7w==,dekAlgo=AESKeyWrapRFC5649,etag=0-,fs-
mtime-
millisec=1485795387838,itime=2017-01-30T16:45:48Z,kekId=s3.7a2593be81374744adbf8e3983e7bd
843cdda755061bac6c12c06eb02800a7fee4b11ac2e03f62bb01eee02995068e56,keypoolid=s3.7a2593be8
1374744adbf8e3983e7bd84,keypoolname=7a2593be81374744adbf8e3983e7bd84,keyversion=0,mtime=2
017-01-30T16:56:27Z,namespace=s3,nlink=1,object-
name=,objectid=d1bced53f2ebbcbc51af1d84747bd198d123d3b8585293a5bf0d32bb73c6cf4b-365f4482-
c24a-4eca-
b24a-070efe29bf63,objname=file,parentOid=53ae036bfcfb46f5580b912222f3026835e3ef972c7e3e53
2ba4a5de30b1946e,parentZone=urn:storageos:VirtualDataCenterData:365f4482-c24a-4eca-
b24a-070efe29bf63,policyname=default,retention=CgYIoKOZmlE=,size=0,type=regular,uid=u1,pa
rent=apache,gid=apache
x-emc-useracl: u1=FULL_CONTROL
x-emc-groupacl: other=READ
x-emc-policy: default
x-emc-request-id: 0af7b3e4:159f0185cf7:957:4
Content-Type: plain/text
Content-Length: 0
Server: ViPR/1.0
Response
HTTP/1.1 200 OK
Expiration period
When a retention period end date is defined for an Atmos object, and the expiration period is also set on the object, ECS
automatically deletes the object at the date that is defined in the expiration period. The expiration period:
● Can be set on objects using the Atmos API, or the x-emc header.
● The expiration period must be later than the retention end date.
● The expiration period is disabled by default.
● When using the x-emc header to set retention and expiration, a -1 value disables the expiration period.
Example: Set the expiration period using the x-emc header:
Response
Example: Request and response for update meta data with Atmos API:
HTTP/1.1 200 OK
Date: Thu, 02 Feb 2017 02:44:14 GMT
x-emc-policy: _int
x-emc-request-id: 0af7b3e4:159fb81ddae:339e:0
Content-Length: 0
Server ViPR/1.0 is not blacklisted
Server: ViPR/1.0
./atmoscurl.pl -user USER1 -action PUT -pmode TID -path / -header "x-emc-retention-
period:300" -header "x-emc-retention-start-delay:120" -include
1007 The server encountered an internal error. Please try 500 Internal Server Error
again.
1008 The requested resource was not found on the server. 400 Bad Request
1009 The method specified in the Request is not allowed 405 Method Not Allowed
for the resource identified.
1010 The requested object size exceeds the maximum 400 Bad Request
allowed upload/download size.
1011 The specified object length does not match the actual 400 Bad Request
length of the attached object.
1012 There was a mismatch between the attached object 400 Bad Request
size and the specified extent size.
1013 The server encountered an internal error. Please try 500 Internal Server Error
again.
1014 The maximum allowed metadata entries per object 400 Bad Request
has been exceeded.
1015 The request could not be finished due to insufficient 401 Unauthorized
access privileges.
1016 The resource you are trying to create already exists. 400 Bad Request
1019 The server encountered an I/O error. Please try 500 Internal Server Error
again.
1020 The requested resource is missing or could not be 500 Internal Server Error
found.
1021 The requested resource is not a directory. 400 Bad Request
1022 The requested resource is a directory. 400 Bad Request
1023 The directory you are attempting to delete is not 400 Bad Request
empty.
1024 The server encountered an internal error. Please try 500 Internal Server Error
again.
1025 The server encountered an internal error. Please try 500 Internal Server Error
again.
1026 The server encountered an internal error. Please try 500 Internal Server Error
again.
1027 The server encountered an internal error. Please try 500 Internal Server Error
again.
1028 The server encountered an internal error. Please try 500 Internal Server Error
again.
Cold Storage
Describes cold storage archives.
Cold archives store objects that do not change frequently and do not require the robust default EC scheme. The EC scheme
used for a cold archive is 10 data fragments plus two coding fragments (10/12). The efficiency is 1.2x.
You can specify a cold archive (Cold Storage) when creating a new storage pool. After the storage pool is created, the EC
scheme cannot be changed. This scheme can support the loss of a single node. It also supports loss of one drive out of six or
two drives out of 12 on two separate nodes.
EC requirements
Table 40. Requirements for regular and cold archives compared
Use case How enabled Minimum Minimum Recommende EC efficiency EC scheme
required required d disks
nodes disks
Regular archive Default 4 16* 32 1.33x 12/16
CAS 135
Table 40. Requirements for regular and cold archives compared (continued)
Use case How enabled Minimum Minimum Recommende EC efficiency EC scheme
required required d disks
nodes disks
Cold archive Configured by System 8 12* 24 1.2x 10/12
Administrator
NOTE: *Since the minimum deployable configuration for the C-Series appliance is two appliances with 12 disks each, 24
disks is the effective minimum.
Compliance
Describes ECS features that support government and industry standards for the storage of electronic records.
ECS meets the storage requirements of the following standards, as certified by Cohasset Associates Inc:
● Securities and Exchange Commission (SEC) in regulation 17 C.F.R. § 240.17a-4(f)
● Commodity Futures Trading Commission (CFTC) in regulation 17 C.F.R. § 1.31(b)-(c)
Compliance has three components:
● Platform hardening: addressing common security vulnerabilities.
● Policy-based record retention: limiting the ability to change retention policies for records under retention.
● Compliance reporting: periodic reporting by a system agent records the system's compliance status.
136 CAS
● You cannot turn Compliance off once it is turned on.
● All buckets in a namespace must have a retention period greater than zero.
NOTE: If you have an application that assigns object-level retention periods, do not use ECS to assign a retention period
greater than the application retention period. This action causes application errors.
● A bucket with data in it cannot be deleted regardless of its retention value.
● Applying the Infinite option to a bucket means that objects in the bucket in a Compliance-enabled namespace cannot be
deleted permanently.
● The retention period for an object cannot be deleted or shortened. Therefore, the retention period for a bucket cannot be
deleted or shortened.
● You can increase object and bucket retention periods.
● No user can delete an object under retention. This includes users with the CAS privileged-delete permission.
Compliance agent
Describes the operation of the Compliance agent.
Compliance features are turned on by default, except for Compliance monitoring. If monitoring is turned on, the agent
periodically logs a message.
NOTE: Contact your representative to turn on Compliance monitoring. Monitoring messages are available by command from
the node. They do not appear in the ECS Portal.
Retention periods
Retention periods are assigned in the C-Clip for the object by the CAS application.
For example, if a financial document must be retained for three years from its creation date, then a three-year retention period
is specified in the C-Clip associated with the financial document. It is also possible to specify that the document is retained
indefinitely.
CAS 137
Default retention period in objects written without object-level retention in
Compliance namespaces
Starting with ECS 3.0, when an application writes C-Clips with no object retention to an ECS CAS bucket in a Compliance
namespace, and the bucket has a retention value (6 months, for example), the default retention period of infinite (-1) will be
assigned to the C-Clips. The C-Clips can never be deleted because their effective retention period is the longest one between
the two: the bucket-level retention period and the default object-level retention.
CAS precedence
When multiple retention periods are applied to a CAS object in ECS, the retention period with the higher value has precedence
no matter how the retention was applied.
You can find more information about the ECS Management API in ECS Management REST API introduction. The online
reference is here: ECS API Reference.
138 CAS
Advanced retention for CAS applications: event-based
retention, litigation hold, and the min/max governor
Describes advanced retention features available in the CAS API that are supported by ECS.
Customer applications use the CAS API to enable retention strategies. When CAS workloads are migrated to ECS, ECS
awareness of CAS API features allow the customer applications to continue working with the migrated data. In ECS, the
following advanced retention management (ARM) features are available without a separate license:
● Event-based retention: the ability to configure an object through its C-Clip to apply (trigger) a retention period or retention
policy when the CAS application receives a specified event.
● Litigation hold: the ability to prevent deletion of an object if the CAS application has applied a litigation hold to the object
through its C-Clip. The CAS application can apply up to 100 litigation holds to an object by creating and applying unique
litigation hold IDs.
● Min/Max governor: The ability for an administrator to set bucket-level limits for fixed retention period or variable retention
period. A variable retention period is one that is set to support event-based retention. In ECS, System or Namespace Admins
can set the values with the ECS Portal. Programmers can use the ECS Management API to set the values.
NOTE: ARM is supported for legacy CAS data written with any naming scheme that is migrated to ECS.
Bucket Retention Period If a bucket retention period is specified, then the longer period will be enforced if there is both
a bucket-level and an object-level retention period. In a Compliance-enabled environment Bucket
Retention Period is mandatory unless retention information in the object is enforced. However,
once configured the Bucket Retention Period cannot be reset even when retention information in
the object is enforced.
Minimum Fixed This feature governs the retention periods specified in objects. If an object's retention period is
Retention Period outside of the bounds specified here, then an attempt to write the object fails. When using retention
policies, the min/max settings are not enforced. Selecting Infinite for Minimum Fixed Retention
Maximum Fixed Period means all retention values must be infinite. Selecting if for Mamimum Fixed Retention
Retention Period Period means there is no maximum limit. Min/max retention constrains are applied to any C-Clip
written to a bucket. If a clip is migrated by any SDK-based third-party tool the retention should be
within bounds, otherwise an error is thrown.
CAS 139
Table 42. CAS Bucket (continued)
Feature Description
Minimum Variable This feature governs variable retention periods specified in objects using event-based retention
Retention Period (EBR). In EBR, a base retention period is set and the programmed trigger function has the ability to
increase the retention period when the trigger fires. If an object's new retention period is outside of
Maximum Variable the bounds specified here, then an attempt to write the object in response to the trigger fails. When
Retention Period using retention policies, the min/max settings are not enforced. Selecting Infinite for Minimum
Variable Retention Period means all retention values must be infinite. Selecting if for Mamimum
Variable Retention Period means there is no maximum limit. Min/max retention constrains are
applied to any C-Clip written to a bucket. If a clip is migrated by any SDK-based third-party tool the
retention should be within bounds, otherwise an error is thrown.
NOTE: If the System Administrator or programmer has not set any values for the fixed and variable retention periods, the
ECS Management API get function will not return values for the min/max settings. The Enforce Retention Information
in C-Clip will return a default value of false.
Event-based retention
Event-based retention (EBR) is an instruction specifying that a record cannot be deleted before an event and during a
specified period after the event. In CAS, EBR is a C-Clip with a specified base retention period or retention policy and an
application-defined trigger that can set a longer retention period when the trigger fires. The retention period only begins when
the trigger fires. When a C-Clip is marked for EBR, it cannot be deleted prior to the event unless a privileged delete is used.
When using EBR, the C-Clip life-cycle is as follows:
● Create: the application creates a new C-Clip and marks it as being under EBR. The application can provide a fixed retention
period which acts as a minimum retention and it must provide an event based retention period or policy.
● Trigger Event: The application triggers the event, which is the starting point of the event-based retention period or
retention policy. At this point the application can assign a new event-based retention period, provided that it is longer than
the one assigned at the time of the C-Clip creation.
● Delete: When the application tries to delete the C-Clip, the following conditions must be met:
○ Policy (Namespace) retention has expired
○ Bucket retention has expired
○ Fixed retention has expired
○ The event has been triggered
○ Both the EBR set at the time of creation and any subsequent changes (extensions) at the time of the event have expired
The following figure shows the three possible scenarios for a C-Clip under EBR:
● C1 has a fixed or minimal retention which already expired before the event was triggered.
● C2 has a fixed or minimal retention which will expire before the EBR expires.
● C3 has a fixed or minimal retention which will expire after the EBR expires.
140 CAS
Figure 3. EBR scenarios
For non-compliant namespaces, privileged delete commands can override fixed and variable retention for EBR.
When applying EBR retention, it must comply with the Min/Max Governor settings for the variable retention period.
Litigation hold
Litigation hold allows CAS applications to temporarily prevent deletion of a C-Clip. Litigation hold is useful for data that is
subject to an official investigation, subpoena, or inquiry and that may not be deleted until the investigation is over. Once there is
no need to hold the data, the litigation hold can be released by the application and normal retention behavior resumes. The CAS
application places and removes a litigation hold at the C-Clip level.
CAS 141
NOTE: Even a privileged delete cannot delete a C-Clip under litigation hold.
One C-Clip can be under several litigation holds. The application must generate unique litigation hold IDs and be able to track
the specific litigation holds associated with a C-Clip. The application cannot query a C-Clip for this information. There is only
a function that determines the litigation hold state of the C-Clip. If there is one or several litigation holds on the C-Clip, this
function returns true, otherwise, it is false.
When using litigation hold, the C-Clip life-cycle is as follows:
● Create: The application creates a new C-Clip and provides a fixed and/or event-based retention period.
● Set litigation hold: An application puts the C-Clip on hold. This application can be different from the application that wrote
the C-Clip.
● Release litigation hold: An application releases the C-Clip. This application can be different from the application that sets the
litigation hold or wrote the C-Clip.
● Delete: When the application tries to delete the C-Clip, the following conditions must be satisfied:
○ There are no other litigation holds outstanding on the C-Clip.
○ Policy retention has expired.
○ Standard bucket retention has expired. (Standard bucket retention is available to all ECS object types, but is not
recommended for CAS.)
○ Fixed retention period has expired (CAS-only feature).
○ Event-based retention has expired (CAS-only feature).
The following figure shows the three possible scenarios for a C-Clip put under litigation hold:
● C1 has a fixed retention that already expired when put under hold.
● C2 has a fixed retention that expires during the hold.
● C3 has a fixed retention that will expire after release of the hold.
A C-Clip can have multiple litigation holds assigned to it. If this is the case, each litigation hold requires a separate API call with a
unique identifier for the litigation hold.
NOTE: The maximum size of litigation hold ID is 64 characters. The maximum litigation hold IDs per C-Clip is 100. These
limitations are enforced by the CAS API.
142 CAS
Set up namespace retention policies
Provides CAS-specific set up instructions for namespace retention policies.
The Retention Policy feature for namespace provides a way to define and manage CAS retention classes for all C-Clips created
in the namespace.
A namespace can have many retention polices, where each policy defines a retention period. By applying a retention policy to a
number of C-Clips (with the API), a change to the retention policy changes the retention period for all objects associated with
the policy. For CAS, retention classes are applied to an object's C-Clip by the application. If an object is under a retention period,
requests to modify the object are not allowed.
1. At the ECS Portal, select Manage > Namespace.
2. To edit the configuration of an existing namespace, choose the Edit action associated with the existing namespace.
3. Add and Configure Retention Policies.
a. In the Retention Policies area, select Add to add a new policy.
b. Enter a name for the policy.
c. Specify the period for the Retention Policy.
Select the Infinite checkbox to ensure that objects with this policy are never deleted.
4. Select Save.
5. Choose Save.
6. Select Manage > User.
7. Make sure the Object User tab is active, search for newcasuser1 and choose Edit.
8. In Default Bucket, type newcasbucket1 and choose Set Bucket.
9. Choose Close.
10. Select Manage > Bucket.
11. Search for newcasbucket1 and choose Edit bucket.
12. In Bucket Owner, type newcasuser1.
13. Choose Save.
CAS 143
Set up a CAS object user
Set up an object user to use CAS.
When you set up an object user, you can assign CAS features to the profile that make up the elements of a CAS profile. You will
be able to view the resulting PEA file for use in your CAS applications.
1. At the ECS Portal, select Manage > Users.
2. To edit the configuration of an existing object user, choose the Edit action associated with the user.
3. In the CAS area, type a password (secret) or choose Generate to have the portal create one for you.
4. Choose Set Password.
5. Choose Generate PEA File to generate the PEA file your application needs to authenticate to the CAS storage on ECS.
6. By setting a default bucket, every action the user takes that does not specify a bucket uses the specified default bucket.
Type the name of the default bucket and choose Set Bucket.
7. Choose Add Attribute to add a metadata tag to the user.
8. Add the metadata tag name and value.
See the CAS SDK documentation for more info on metadata tags.
9. Choose Save Metadata.
5. Select Save.
6. You can also edit the ACLs at the group level. Groups are predefined and membership in the group is automatic based on
user criteria. Choose Group ACLs.
7. Choose Add.
8. Select the group you want to edit from the Group Name list.
144 CAS
Table 47. Bucket ACL groups
Bucket ACL group Description
log delivery Not supported.
Supported versions
ECS supports the CAS build 3.1.544 or higher. Additionally you should verify that your ISV’s application supports ECS.
More information about ECS CAS support is provided in Setting up CAS support in ECS.
CAS 145
NOTE: In ECS, CAS Query operations return results based on the creation time of the existing C-Clip and the deletion time
of the deleted C-Clip (reflection). In EMC Centera, query operations return results based on the write-time of the object.
146 CAS
Table 48. Error Cdes (continued)
10004 FP_NOT_RECEIVE_REPLY_ERR No reply was received from the server. This internal error
was generated because the server did not send a reply to
the request packet. Verify all LAN connections and try again.
10005 FP_SERVER_ERR The server reports an error. An internal error on the server
occurred. Try again.
10006 FP_PARAM_ERR You have used an incorrect or unknown parameter. Example:
Is a string-variable too long, null, or empty when it should
not be? Does a parameter have a limited set of values?
Check each parameter in your code.
10007 FP_PATH_NOT_FOUND_ERR This path does not correspond to a file or directory on the
client system. The path in one of your parameters does not
point to an existing file or directory. Verify the path in your
code.
10008 FP_CONTROLFIELD_ERR The server reports that the operation generated a
"Controlfield missing" error. This internal error was
generated because the required control field was not found.
Try again. (Obsolete fromv2.0.)
10009 FP_SEGDATA_ERR The server reports that the operation generated a
"Segdatafield missing" error. This internal error was
generated because the required field containing the blob
data was not found in the packet. Try again. (Obsolete
fromv2.0.)
10010 FP_DUPLICATE_FILE_ERR A duplicate CA already exists on the server. If you did not
enable duplicate file detection, verify that you have not
already stored this data and try again.
10011 FP_OFFSET_FIELD_ERR The server reports that the operation generated an
"Offsetfield missing" error. This internal error was generated
because the offset field was not found in the packet. Try
again. (Obsolete fromv2.0.)
10012 FP_OPERATION_NOT_SUPPORTED This operation is not supported. If FPClip_Write(),
FPTag_GetSibling(), FPTag_GetPrevSibling(),
FPTag_GetFirstChild() or FPTag_Delete() returned this
error, then this operation is not supported for C-Clips
opened in 'flat' mode. If FPStream returned this error, then
you are trying to perform an operation that is not supported
by that stream.
10013 FP_ACK_NOT_RCV_ERR A write acknowledgement was not received. Verify your LAN
connections and try again.
10014 FP_FILE_NOT_STORED_ERR Could not write the blob to the server ORcould not find
the blob on the server. This internal error was generated
because the store operation of the blob was not successful.
Verify that the original data was correctly stored, verify your
LAN connections and try again.
10015 FP_NUMLOC_FIELD_ERR The server reports that the operation generated a
"Numlockfield missing" error. This internal error was
generated because the numlock field was not found in the
packet. Try again. (Obsolete fromv2.0.)
10016 FP_SECTION_NOT_FOUND_ERR The GetSection request could not retrieve the defined
section tag. This internal error was generated because a
required section is missing in the CDF. Verify the content of
your code and try again. (Obsolete fromv2.0.)
10017 FP_TAG_NOT_FOUND_ERR The referenced tag could not be found in the CDF. This
internal error was generated because information is missing
CAS 147
Table 48. Error Cdes (continued)
from the description section in the CDF. Verify the content
of your code and try again.
10018 FP_ATTR_NOT_FOUND_ERR Could not find an attribute with that name. If
FPTag_GetXXXAttribute() returned this error, then
the attribute was not found in the tag. If
FPTag_GetIndexAttribute() returned this error, then the
index parameter is larger than the number of attributes in
the tag.
10019 FP_WRONG_REFERENCE_ERR The reference that you have used is invalid. The reference
was not opened, already closed, or not of the correct type.
10020 FP_NO_POOL_ERR It was not possible to establish a connection with a cluster.
The server could not be located. This means that none
of the IP addresses could be used to open a connection
to the server or that no cluster could be found that has
the required capability. Verify your LAN connections, server
settings, and try again.
10021 FP_CLIP_NOT_FOUND_ERR Could not find the referenced C-Clip in the cluster. Returned
by FPClip_Open(), it means the CDF could not be found on
the server. Verify that the original data was correctly stored
and try again.
10022 FP_TAGTREE_ERR An error exists in the tag tree. Verify the content of your
code and try again.
10023 FP_ISNOT_DIRECTORY_ERR A path to a file has been given but a path to a directory is
expected. Verify the path to the data and try again.
10024 FP_UNEXPECTEDTAG_ERR Either a "file" or "folder" tag was expected but not given.
An unexpected tag was found when retrieving the CDF. The
CDF is probably corrupt.
10025 FP_TAG_READONLY_ERR The tag cannot be changed or deleted (it is probably a top
tag). Verify your program logic.
10026 FP_OUT_OF_BOUNDS_ERR The options parameter is out of bounds. One of the function
parameters exceeds its preset limits. Verify each parameter
in your code.
10027 FP_FILESYS_ERR A file system error occurred, for example an incorrect path
was given, or you are trying to open an unknown file or a file
in the wrong mode. Verify the path and try again.
10029 FP_STACK_DEPTH_ERR You have exceeded the nested tag limit. Review the
structure of your content description and try again.
Deprecated.
10030 FP_TAG_HAS_NO_DATA_ERR You are trying to access blob data of a tag that does not
contain blob data.
10031 FP_VERSION_ERR The C-Clip has been created using a more recent version of
the client software than you are using. Upgrade to the latest
version.
10032 FP_MULTI_BLOB_ERR The tag already has data associated with it. You need to
create a new tag to store the new data or delete this tag
and recreate it and try again.
10033 FP_PROTOCOL_ERR You have used an unknown protocol option (Only HPP
is supported). Verify the parameters in your code. It is
also possible that an internal communication error occurred
between the server and client. If you have verified your code
and the problem persists then you need to upgrade to the
latest client and server versions.
148 CAS
Table 48. Error Cdes (continued)
10034 FP_NO_SOCKET_AVAIL_ERR No new network socket is available for the transaction.
Reduce the number of open transactions between
the client and the server or use the function
FPPool_SetGlobalOption() to increase the number of
available sockets with FP_OPTION_MAXCONNECTIONS.
10035 FP_BLOBIDFIELD_ERR A BlobID field (the Content Address) was expected but
not given. Upgrade to the latest client and server versions.
(Obsolete fromv2.0.)
10036 FP_BLOBIDMISMATCH_ERR The blob is corrupt: a BlobID mismatch occurred between
the client and server. The Content Address calculation on
the client and the server has returned different results. The
blob is corrupt. If FPClip_Open() returns this error, it means
the blob data or metadata of the C-Clip is corrupt and
cannot be decoded.
10037 FP_PROBEPACKET_ERR The probe packet does not contain valid server addresses.
Upgrade to the latest client and server versions. (Obsolete
fromv2.0.)
10038 FP_CLIPCLOSED_ERR (Javaonly.) You tried to perform an operation on a closed
C-Clip. This operation requires access to an open C-Clip.
Verify your code and try again.
10039 FP_POOLCLOSED_ERR (Javaonly.) You tried to perform an operation on a closed
pool. This operation requires access to an open pool. Verify
your code and LAN connections and try again.
10040 FP_BLOBBUSY_ERR The blob on the cluster is busy and cannot be read from or
written to. You tried to read from or write to a blob that is
currently busy with another read/write operation. Try again.
10041 FP_SERVER_NOTREADY_ERR The server is not ready yet. This error can occur when a
client tries to connect to the server to execute an operation
and the nodes with the access role are running but the
nodes with the storage role have not been initialized yet.
This error can also occur when not enough mirror groups
are found on the server. Allow the SDK to perform the
automatic number of configured retries.
10042 FP_SERVER_NO_CAPACITY_ERR The server has no capacity to store data. Enlarge the
server's capacity and try again.
10043 FP_DUPLICATE_ID_ERR The application passed in a sequence ID that was previously
used.
10044 FP_STREAM_VALIDATION_ERR A generic stream validation error occurred.
10045 FP_STREAM_BYTECOUNT_MISMATCH_ A generic stream byte count mismatch was detected.
ERR
10101 FP_SOCKET_ERR An error on the network socket occurred. Verify the
network.
10102 FP_PACKETDATA_ERR The data packet contains wrong data. Verify the network,
the version of the server or try again later.
10103 FP_ACCESSNODE_ERR No node with the access role can be found. Verify the IP
addresses provided with FPPool_Open().
10151 FP_OPCODE_FIELD_ERR The Query Opcode field is missing from the packet.
10152 FP_PACKET_FIELD_MISSING_ERR The packet field is missing.
10153 FP_AUTHENTICATION_FAILED_ERR Authentication to get access to the server failed. Check the
profile name and secret.
10154 FP_UNKNOWN_AUTH_SCHEME_ERR An unknown authentication scheme has been used.
CAS 149
Table 48. Error Cdes (continued)
10155 FP_UNKNOWN_AUTH_PROTOCOL_ERR An unknown authentication protocol has been used.
10156 FP_TRANSACTION_FAILED_ERR Transaction on the server failed.
10157 FP_PROFILECLIPID_NOTFOUND_ERR No profile clip was found.
10158 FP_ADVANCED_RETENTION_DISABLED_ The Advanced Retention Management feature is not
ERR licensed or enabled for event-based retention (EBR) and
retention hold.
10159 FP_NON_EBR_CLIP_ERR An attempt was made to trigger an EBRevent on a C-Clip
that is not eligible to receive an event.
10160 FP_EBR_OVERRIDE_ERR An attempt was made to trigger or enable the event-based
retention period/class of a C-Clip a second time. You can set
EBR information only once.
10161 FP_NO_EBR_EVENT_ERR The C-Clip is under event-based retention protection and
cannot be deleted.
10162 FP_RETENTION_OUT_OF_BOUNDS_ERR The event-based retention period being set does not meet
the minimum/maximum rule.
10163 FP_RETENTION_HOLD_COUNT_ERR The number of retention holds exceeds the limit of 100.
10164 FP_METADATA_MISMATCH_ERR Mutable metadata mismatch found.
10201 FP_OPERATION_REQUIRES_MARK The application requires marker support but the stream does
not provide that.
10202 FP_QUERYCLOSED_ERR The FP Query for this object is already closed. (Java only).
10203 FP_WRONG_STREAM_ERR The function expects an input stream and gets an output
stream or vice-versa.
10204 FP_OPERATION_NOT_ALLOWED The use of this operation is restricted or this operation is not
allowed because the server capability is false.
10205 FP_SDK_INTERNAL_ERR An SDK internal programming error has been detected.
10206 FP_OUT_OF_MEMORY_ERR The system ran out of memory. Check the system's
capacity.
10207 FP_OBJECTINUSE_ERR Cannot close the object because it is in use. Check your
code.
10208 FP_NOTYET_OPEN_ERR The object is not yet opened. Check your code.
10209 FP_STREAM_ERR An error occurred in the generic stream. Check your code.
10210 FP_TAG_CLOSED_ERR The FP Tag for this object is already closed. (Java only.)
10211 FP_THREAD_ERR An error occurred while creating a background thread.
10212 FP_PROBE_TIME_EXPIRED_ERR The probe limit time was reached.
10213 FP_PROFILECLIPID_WRITE_ERR There was an error while storing the profile clip ID.
10214 FP_INVALID_XML_ERR The specified string is not valid XML.
10215 FP_UNABLE_TO_GET_LAST_ERROR The call to FPPool_GetLastError() or
FPPool_GetLastErrorInfo() failed. The error status of the
previous function call is unknown; the previous call may have
succeeded.
10216 FP_LOGGING_CALLBACK_ERR An error occurred in the application-defined FP Logging
callback.
150 CAS
Enabling data2 IP in CAS
Data2 IP allows CAS to start on multiple IPs. To enable data2 on CAS, contact ECS remote support.
NOTE: Data2 IP is enabled by default in CAS from ECS 3.1 and later versions.
CAS 151
7
ECS Management REST API
This section describes information about accessing and authenticating with the ECS Management REST API and provides a
summary of the API paths.
Topics:
• ECS Management REST API introduction
• Authenticate with the ECS Management REST API
https://<ECS_IP>:4443/login
OnN0b3JhZ2VvczpUb2tlbjo2MjIxOTcyZS01NGUyLTRmNWQtYWZjOC1kMGE3ZDJmZDU3MmU6AgAC0A8=
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<loggedIn>
<user>root</user>
</loggedIn>
* Connection #0 to host 10.247.100.247 left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
You can copy the X-SDS-AUTH-TOKEN contents and pass it into the next API call through the curl tool -H switch, as shown in
the following example.
curl https://10.247.100.247:4443/object/namespaces
-k
-H "X-SDS-AUTH-TOKEN:
BAAcOHZLaGF4MTl3eFhpY0czZ0tWUGhJV2xreUE4PQMAUAQADTEzODU0OTQ4NzYzNTICAAEABQA5dXJu
OnN0b3JhZ2VvczpUb2tlbjpkYzc3ODU3Mi04NWRmLTQ2YjMtYjgwZi05YTdlNDFkY2QwZDg6AgAC0A8="
Logout
The logout API ends a session.
Each user is allowed a maximum of 100 concurrent authentication tokens. Beyond this limit, the system refuses any new
connection for a user until tokens free up. Tokens can free up by expiring naturally, or by issuing the following ECS API call:
GET https://<ECS_IP>:4443/logout
If you have multiple sessions running simultaneously, the following API call forces the termination of all tokens related to the
current user.
GET https://<ECS_IP>:4443/logout?force=true
The following example shows a logout request. You pass in the authentication token from header or cookie to log out.
GET https://<ECS_IP>:4443/logout
X-SDS-AUTH-TOKEN:{Auth_Token}
Request
GET https://<ECS_IP>:4443/user/whoami
The following responses shows the whoami output for the root user and for a user who has been assigned to the
NAMESPACE_ADMIN role for the ns1 namespace.
Response
HTTP 200
GET /user/whoami
<user>
<common_name>root</common_name>
<distinguished_name/>
<namespace/>
<roles>
<role>SYSTEM_ADMIN</role>
HTTP 200
GET /user/whoami
<user>
<common_name>[email protected]</common_name>
<distinguished_name/>
<namespace>ns1</namespace>
<roles>
<role>NAMESPACE_ADMIN</role>
</roles>
</user>
Migration
Transformation /object/transformation API to enable data transformation from a Centera cluster.
Monitoring
Capacity /object/capacity API to retrieve the current managed capacity.
Dashboard /dashboard/zones/localzone API to retrieve the local VDC details, including details
on replication groups, storage pools, nodes, and disks. /dashboard/zones/hostedzone
API to retrieve the hosted VDC details, including details on replication groups. /dashboard/
replicationgroups/{id} API to retrieve the replication group instance details. /
dashboard/storagepools/{id} API to retrieve the storage pool details, including details
on the storage pool nodes. /dashboard/nodes/{id} API to retrieve the node instance
details, including node instance disk and process details. /dashboard/disks/{id} API
to retrieve the disk instance details. /dashboard/processes/{id} API to retrieve the
process instance details. /dashboard/rglinks/{id} API to retrieve the replication group
link instance details. /dashboard/datatables/{id} API to retrieve the replication group
datatables instance details.
Events /vdc/events API to retrieve audit events for a specified namespace.
Multi-tenancy
Namespace /object/namespaces API to create and manage a namespace. This API also sets the
retention period and quota for the namespace. For more information about retention
periods and quotas, see the ECS Administration Guide which is available from the https://
www.dell.com/support/.
Geo-replication
Replication Group /data/data-service/vpools API to create and manage replication groups.
Temporary Failed Zone /tempfailedzone/ API to retrieve all temporary failed zones, or the temporary failed zones
for a specified replication group.
Provisioning
Base URL /object/baseurl API to create a Base URL that allows existing applications to work with
the ECS object store. For more information on Base URL, see the ECS Administration Guide
which is available from the https://www.dell.com/support/.
Bucket /object/bucket API to provision and manage buckets. /object/bucket/
{bucketName}/lock API to lock bucket access. /object/bucket/{bucketName}/
tags API to add tags to a specified bucket. /object/bucket/{bucketName}/
retention API to set the retention period for a specified bucket. /object/bucket/
{bucketName}/quota API to set the quota for a specified bucket. /object/bucket/
{bucketName}/policy API to add a policy for a specified bucket. /object/bucket/
{bucketName}/metadata API to add metadata for a specified bucket.
Node /vdc/nodes API to retrieve the nodes that are currently configured for the cluster. /vdc/
nodes/{nodename}/lockdown API to set the locked or unlocked status for a specified
node. /vdc/lockdown API to retrieve the locked or unlocked status for a VDC.
Virtual data center /object/vdcs API to add a VDC and specify the inter-VDC endpoints and secret key for
replication of data between ECS sites.
Support
Call home /vdc/callhome/ API for managing ESRS configuration and sending alerts to ConnectEMC
for troubleshooting and debugging purposes.
User Management
Authentication provider /vdc/admin/authnproviders API to add and manage authentication providers.
Password group (Swift) /object/user-password API to generate a password for use with OpenStack Swift
authentication.
Secret key /object/user-secret-keys API to assign secret keys to object users and to manage
secret keys.
Secret key self-service /object/secret-keys API to enable S3 users to create a new secret key that enables
them to access objects and buckets within their namespace in the object store.
User (Object) /object/users API to create and manage object users. Object users are always associated
with a namespace. The API returns a secret key that can be used for S3 access. An object
user assigned an S3 secret key can change it using the REST API. /object/users/lock.
API to lock user access. /object/users/{userName}/tags. API to associate tags with a
user ID. Tags are in the form of name=value pairs.
User (management) /vdc/users API to create and manage users. Management users can be assigned to the
System Administrator role or to the Namespace Administrator role. You can use this API the
change the local management user password.
MapReduce Request
Resource
Hadoop Client
Manager
Appliance Software
In a Hadoop environment that is configured to use ECS HDFS, each of the ECS nodes functions as a traditional Hadoop
NameNode and DataNode, so that all of the ECS nodes can accept and service HDFS requests.
When you set up the Hadoop client to use ECS HDFS instead of traditional HDFS, the configuration points to ECS HDFS to do
all the HDFS activity. On each ECS HDFS client node, any traditional Hadoop component would use the ECS Client Library (the
ViPRFS JAR file) to perform the HDFS activity.
To integrate ECS HDFS with an existing Hadoop environment, you must have the following:
● A Hadoop cluster that is already installed and configured. The following distributions are supported:
○ Hortonworks HDP 2.6.2
● A Hadoop cluster that is installed and configured to support ECS HDFS, which requires:
○ A file system-enabled bucket for HDFS access.
NOTE: Only one bucket is supported per Hadoop cluster and the ECS HDFS must be the default file system.
○ The ECS Client Library that is deployed to the cluster.
● For a Hadoop cluster that uses Kerberos or Kerberos with Active Directory.
○ Kerberos configuration files and service principal keytab files that are deployed to the ECS cluster.
○ Secure metadata that is deployed to the bucket.
When modifying configuration files, you should use the management interface (Ambari) rather than manually editing files.
Changes that you make using the Ambari management interface are persisted across the cluster.
NOTE: HDFS now supports automatic trash removal for HDFS files that a user removes. In traditional Hadoop, the
fs.rash.interval hadoop setting defines the minimum time that is taken to clean up the removed files from a
users trash directory, and fs.trash.checkpoint.interval defines the time interval between active and inactive
period, the trash cleanup thread takes before checking for removal of the candidates. In this release of ECS, the storage
administrator manages the trash removal on the ECS. Use the cf_client command, the bucket, namespace of a Hadoop
file system, and maintenance interval settings to define maintenance intervals for all trash folders.
Simple In simple mode, the identity of a client process is determined by the host operating system. On Unix-like
systems, the user name is the equivalent of whoami.
Kerberos In a Hadoop environment with Kerberos, the identity of a client process is determined by its Kerberos
credentials. For example, you can use the kinit utility to obtain a Kerberos ticket-granting-ticket (TGT)
and use klist to determine your current principal. When mapping a Kerberos principal to an HDFS
username, using the auth_to_local Hadoop property, all components except for the primary are
dropped. For example, a principal todd/[email protected] acts as the simple username
"todd" on HDFS.
ECS HDFS integrates with Hadoop clusters configured to use either simple or Kerberos authentication modes.
When the Hadoop cluster uses Kerberos, you can configure ECS to grant access to users with Kerberos principals in the form
[email protected]. Alternatively, where ECS uses AD to authenticate users, you can configure a one-way trust between the
Kerberos environment and AD so that users can authenticate using their AD credentials, in the form [email protected].
The permissions of newly created files and directories are restricted by the umask (fs.permissions.umask-mode). The
recommended umask is 022.
If a Default Group of hadoop is defined, the ownership and permissions display as shown in the following example.
Proxy user
ECS HDFS supports the use of the Hadoop proxy user.
A proxy user allows a Hadoop user to submit jobs or access HDFS on behalf of another user. The proxy user functionality can
be compared to the UNIX/Linux effective user capabilities where running a command as one user assumes the identity of a
different user as identified by the permission settings on the executable.
You configure proxy users for secure impersonation on a per-namespace (or per-bucket) basis. Proxy users are
supported in simple and Kerberos mode. In either mode, the administrator can restrict proxy impersonations using the
hadoop.proxyuser.*.* properties.
Equivalence user
ECS converts three part principals to two part principals.
A Kerberos principal is generally in the form primary/instance@realm, although the instance is not required, so
primary@realm principal applies to all hosts in the realm. If the instance is specified, it may be used to designate a
specific host, such as joe/[email protected] or joe/[email protected]. These
two principals are for the same primary user (joe), but are targeted to only be granted authentication on the hosts (host1 or
host2).
This type of user principal is recommended to provide an enhanced level of security. From an ECS perspective, each principal
would have to be added to ECS. This becomes quite cumbersome, so the equivalence user feature allows ECS authorization to
be performed by using a two-part principal (primary@realm), even if three-part principals are being used.
ambari-server setup -s
ambari-server start
5. Browse to http://ambari.example.com:8080/
6. On the Select Stack page, select the Hadoop version, HDP 2.6.2, and select the OS version.
7. Select the Hadoop services that you want to enable.
8. Complete the installation wizard.
Do not use underscores in bucket names as they are not supported by the URI Java class. For example, viprfs://
my_bucket.ns.site/ does not work as it is an invalid URI and is thus not understood by Hadoop.
3. In the Namespace field, select the namespace that the bucket will belong to.
4. In the Replication Group field, select a replication group or leave this field blank to use the default replication group for the
namespace.
5. In the Bucket Owner field, type the name of the bucket owner.
For a HDFS bucket, the bucket owner will usually be hdfs, or [email protected] for Kerberos buckets. The Hadoop hdfs
user requires superuser privileges on the HDFS; this can be achieved by making hdfs the owner of the bucket. Other
Hadoop users may also require superuser privileges and these privileges are granted by assigning users to a group and
making that group a superuser group.
6. Do not turn on CAS.
NOTE: A bucket that is intended for use as HDFS cannot be used for CAS. The CAS field is turned off when File
System is turned on.
A bucket that is compliance-enabled cannot be written to using the HDFS protocol. However, data written using object
protocols can be read from HDFS.
Table 50. Example bucket permissions for file system access in a simple Hadoop cluster
Hadoop users and groups Bucket permissions Bucket/file system access
Bucket access using Group ACL
Custom Group ACLs must be set on the
Users (service) hdfs. mapred, yarn, Bucket owner hdfs
bucket in the ECS Portal assign Full Control
hive, pig
Default Group Default on the bucket/root file system to the
Users sally, fred hadoop,users, hive, and spark groups.
Custom Group hadoop,
(applications) This example assumes that hdfs is the
ACL users,
superuser - the user that started the
Groups hdfs (hdfs) hive,
namenode.
hadoop (hdfs, spark
mapred, yarn, hive, (Full
pig) Control)
users (sally, fred) User ACL hdfs
(owner)
Supergroup hdfs
Supergroup hdfs
NOTE:
● When you upgrade to a later version of ECS, you must deploy the ECS HDFS Client Library for the release to which you
have upgraded.
1. Log in to a node that has password-less SSH access to all Hadoop nodes.
2. Run the classpath command to get the list of directories in the classpath:
# hadoop classpath
3. Deploy the client JAR file to all Hadoop nodes by performing the following steps:
a. Create a text file named masters that contains a list of IP addresses or FQDNs for all Hadoop master nodes, one per
line.
b. Create a text file named workers that contains a list of IP addresses or FQDNs for all Hadoop worker nodes, one per
line.
c. Create the directory /usr/lib/hadoop/lib on all nodes. Use the following command:
d. Copy the ECS client jar to all nodes using the following command:
/usr/lib/hadoop/lib/*
/usr/lib/hadoop/lib/*
/usr/lib/hadoop/lib/*
export HADOOP_CLASSPATH=$
{HADOOP_CLASSPATH}:/usr/lib/
hadoop/lib/*
export SPARK_DIST_CLASSPATH="$
{SPARK_DIST_CLASSPATH}:/usr/lib/
hadoop/lib/*:/usr/hdp/current/
hadoop-client/client/guava.jar"
Set up Hive
The additional steps provided in this procedure a required to configure Hive.
When using Hive, you should also ensure that the Hive metastore warehouse is being directed to the ViPRFS location. Assuming
that mysql is being used to identify the Hive metastore location, start mysql, go to the Hive databases, and show the contents
of the DBS table and set it as below.
1. If Hive is using templeton, you should modify the following properties, and these properties are already defined.
templeton.pig.archive viprfs://hdfsBucket2.s3.site1/hdp/apps/$
{hdp.version}/pig/pig.tar.gz
templeton.streaming.jar viprfs://hdfsBucket2.s3.site1/hdp/
apps/${hdp.version}/mapreduce/hadoop-
streaming.jar
2. Start mysql.
[hdfs@hadoop-0 ~]$
fs=viprfs://bucket.ns.fed
hadoop fs -chmod 750 $fs/
hadoop fs -chown hdfs:hdfs $fs/
2. Specific groups and users should be added to the root directory object ACL using the setfacl command.
Note that these permissions duplicate the bucket's Custom Group ACLs to ensure that all HDFS APIs have the same
effective permissions.
[hdfs@mycluster1-master-0~]$
hadoop fs -chmod 777 /apps/hive/warehouse
hadoop fs -chown hive:hdfs /apps/hive/warehouse
hadoop fs -chmod -R 770 /user/ambari-qa
hadoop fs -chown -R ambari-qa:hdfs /user/ambari-qa
[hdfs.fs.request]
prefer_secure_metadata_bucket_for_groups = true
If you want ECS to determine group information from AD instead of bucket metadata, define the parameter as follows:
[hdfs.fs.request]
prefer_secure_metadata_bucket_for_groups = false
The default value is true, so if this value is not defined, ECS determines group details for a Kerberos principal from the bucket
metadata. You must apply any change to all ECS nodes and you must restart dataheadsvc on all nodes.
[data_nodes]
192.168.2.[100:200]
[kdc]
192.168.2.10
4. Download the unlimited JCE policy archive from oracle.com, and extract it to an UnlimitedJCEPolicy directory in
viprfs-client-<ECS version>-<version>/playbooks/samples.
NOTE: You should only perform this step if you are using strong encryption type.
You can configure Kerberos to use a strong encryption type, such as AES-256. In that case, you must reconfigure the JRE
within the ECS nodes to use the policy.
5. Change to the working directory in the container.
For example:
cd /home/admin/ecs.ansible/viprfs-client-<ECS version>-<version>/playbooks
6. Create a requirements.yml file in the playbooks directory as below (use appropriate ECS version for the version field).
- src: vipr_common.tar.gz
version: 3.3.0.1
name: vipr_common
- src: vipr_jce_config.tar.gz
version: 3.3.0.1
name: vipr_jce_config
- src: vipr_kerberos_config.tar.gz
version: 3.3.0.1
name: vipr_kerberos_config
- src: vipr_kerberos_principal.tar.gz
version: 3.3.0.1
name: vipr_kerberos_principal
8. Cd samples then copy the krb5.conf file from the KDC or Hadoop node to the current directory.
9. Edit the generate-vipr-keytabs.yml as necessary and set the domain name.
NOTE: If you are using Active Directory instead of a KDC, you can skip this step and perform the next step.
For example:
- hosts: data_nodes
serial: 1
roles:
- role: vipr_kerberos_principal
kdc: "{{ groups.kdc | first }}"
principals:
In this example, the default value (vipr/[email protected]) has been replaced with (vipr/[email protected])
and the domain is MA.EMC.COM.
export ANSIBLE_HOST_KEY_CHECKING=False
11. If you are using a KDC without Active Directory, run the Ansible playbook command in this step to generate the vipr keytabs,
and then proceed to step 13.
12. If you are using an Active Directory for authentication, you must first manually pre-create vipr service principals for every
ECS node as follows.
a. Create an Active Directory user: vipr/ECSFQDN.
b. Run setspn command for every vipr principal as follows:
d. Copy all the keytab files generated to the Ansible host and move them to the keytabs directory located in samples.
NOTE: In these steps, ECSFQDN/FQDN is the ECS fully qualified domain name, REALM is the Hadoop krb5.conf
REALM, and HOSTNAME is the ECS hostname without the domain.
# cat setup-vipr-kerberos.yml
---
###
# Configures ViPR/ECS for Kerberos authentication.
# - Configures krb5 client
# - Installs keytabs
# - Installs JCE policy
###
- hosts: data_nodes
roles:
- role: vipr_kerberos_config
krb5:
config_file: krb5.conf
service_principal:
name: vipr/[email protected]
keytab: keytabs/[email protected]
- role: vipr_jce_config
jce_policy:
name: unlimited
src: UnlimitedJCEPolicy/
In this example, the default value (vipr/[email protected]) has been replaced with (vipr/[email protected])
and the domain is MA.EMC.COM.
14. Run the Ansible playbook to configure the data nodes with the ECS service principal.
Make sure the /ansible/samples/keytab directory exists and the krb5.conf file is in the working directory /
ansible/samples.
Verify that the correct ECS service principal, one per data node, has been created (from the KDC):
Verify that the correct keytab is generated and stored in the location: /data/hdfs/krb5.keytab on all ECS data nodes.
You can use the strings command on the keytab to extract the human readable text, and verify that it contains the
correct principal. For example:
Kerberos users
Information about every Kerberos user (not AD users) that requires Hadoop access to a bucket must be uploaded to ECS. The
following data is required:
● Principal name
{
"name": "internal.kerberos.user.hdfs.name",
"value": "hdfs-cluster999@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.hdfs.shortname",
"value": "hdfs"
},
{
"name": "internal.kerberos.user.hdfs.groups",
"value": "hadoop,hdfs"
},
The value between the prefix and suffix can be anything, as long is it uniquely identifies the entry. For example, you could use:
"name": "internal.kerberos.user.1.name",
"name": "internal.kerberos.user.1.shortname",
"name": "internal.kerberos.user.1.groups",
Principals can map to a different users. For example, the rm principal user is usually mapped to the yarn users using
auth_to_local setting for the Hadoop cluster, like this.
RULE:[2:$1@$0](rm@EXAMPLE_HDFS.EMC.COM)s/.*/yarn/
So for any principal that maps to a different principal (for example, the rm principal maps to the yarn principal), you must use
the mapped principal in the shortname value, so the entry for the rm principal would be:
{
"name": "internal.kerberos.user.rm.name",
"value": "rm@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.yarn.shortname",
"value": "yarn@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.yarn.groups",
"value": "hadoop"
},
Supergroup
You must tell ECS which Linux group of users on the Hadoop nodes get superuser privileges based on their group. Only one
entry in the JSON input file is expected for the supergroup designation. It must be like the following:
{
"name": "dfs.permissions.supergroup",
"value": "hdfs"
}
Proxy settings
For proxy support, you must identify all proxy settings that are allowed for each Hadoop application, where application means
one of the Hadoop-supported applications, for example, hive, and so on.
{
"name": "hadoop.proxyuser.hive.hosts",
"value": "*"
},
{
"name": "hadoop.proxyuser.hive.groups",
"value": "s3users"
}
{
"head_type": "hdfs",
"metadata": [
{
"name": "METADATANAME_1",
"value": "METADATAVALUE_1"
},
{
"name": "METADATANAME_2",
"value": "METADATAVALUE_2"
},
{
"name": "METADATANAME_N",
"value": "METADATAVALUE_N"
}
]
}
NOTE:
The last name/value pair does not have a trailing "," character.
An example of a JSON file is shown in: Secure bucket metadata.
3. Run the PUT object/bucket/<bucketname>/metadata ECS Management REST API command to deploy the
metadata, as shown in the following example
For more information on each core_site.xml parameter, see Hadoop core-site.xml properties for ECS HDFS.
Workaround
If you cannot successfully authenticate as an AD/LDAP user with the KDC on the Hadoop cluster, you should address this
before proceeding to ECS Hadoop configuration.
An example of a successful login is shown below:
If the above is not successful, you can investigate using the following checklist:
● Check the /etc/krb5.conf file on the KDC server for correctness and syntax. Realms can be case sensitive in the
configuration files as well as when used with the kinit command.
● Check that the /etc/krb5.conf file from the KDC server is copied to all the Hadoop nodes.
● Check that one-way trust between AD/LDAP and the KDC server was successfully made.
● Make sure that the encryption type on the AD/LDAP server matches that on the KDC server.
● Check that the /var/kerberos/krb5kdc/kadm5.acl and /var/kerberos/krb5kdc/kdc.conf files are correct.
● Try logging in as a service principal on the KDC server to indicate that the KDC server itself is working correctly.
● Try logging in as the same AD/LDAP user on the KDC server directly. If that does not work, the issue is likely to be on the
KDC server directly.
181
Pig test fails: unable to obtain Kerberos principal
Pig test fails with the error: Info:Error: java.io.IOException: Unable to obtain the Kerberos
principal even after kinit as AD user, or with Unable to open iterator for alias firstten.
This issue is caused due to the fact that Pig ( release 0.13 and lower) does not generate a delegation token for ViPRFS as a
secondary storage.
Workaround
Append viprfs://bucket.ns.installation/ to the mapreduce.job.hdfs-servers configuration setting. For
example:
Workaround
Set the permissions for the /user directory as:
Permissions errors
Insufficient permissions errors can occur for a number of reasons. You may receive this type of error when running a hadoop
fs command, or you may see it in an application log, such as the log for mapreduce or hive.
INSUFFICIENT_PERMISSIONS errors
In the following example, the jhs principal tried to create a directory (/tmp) and received an INSUFFICIENT_PERMISSIONS
error. In this case, the permissions of the root directory did not allow this user to create a directory.
When the case of an insufficient permissions error is not obvious on the client, you may have to look at the server logs. Start
with dataheadsvc-error.log to find the error. Open a terminal window to each ECS node, and edit the dataheadsvc-
error.log file. Find the error that corresponds to the time you saw the error on the client.
182
Failed to get credentials
Where you see an error like the following in the dataheadsvc-error.log:
This is not an error. The message means that the server tried to look up the principal's name to see if there are any cached
Active Directory(AD) groups for the principal user making the request. This error is returned for a Kerberos user.
The error indicates the user name making the request. Make a note of it.
In this case, you should either add an explicit user ACL for the bucket, or add a custom group ACL for one of the groups that
the user is a member of.
183
The two important items to note here are the requested action (stat) and the path of the object (mr-history/done).
Note that the leading slash character is not displayed, so the real path is /mr-history/done. Now you have three pieces of
information that are important for debugging:
● user principal (jhs@HOP171_HDFS.EMC.COM)
● action (stat is hadoop fs -ls)
● path (/mr-history/done)
There are two approaches for additional debugging are described below:
● Blobsvc log debugging
● Hadoop client debugging
2018-02-26 22:36:21,994
[TaskScheduler-BlobService-COMMUNICATOR-ParallelExecutor-5892]
ERROR ObjectAclChecker.java (line 101) not permit, cred
jhs@HOP171_HDFS.EMC.COM[hadoop]false1 with
action GET_OBJECT_ACL on object with acl/owner/group
user={hdfs@hop171_hdfs.emc.com=[FULL_CONTROL]},
groups={hdfs=[READ_ACL, EXECUTE, READ]}, other=[], owner=hdfs@hop171_hdfs.emc.com,
group=hdfs
Look for not permit. This tells us the user making the request (jhs), the object's owner (hdfs), object group (hdfs) and
the permissions for owner, group, and others. What it does not tell us is the actual object that failed the permission check. On
the Hadoop node, become the hdfs principal, and start with the path, and work up the tree, which leads to the other method
of debugging, looking at the Hadoop file system from the client.
The following example shows that the jhs principal should have had access to list this directory.
Likewise, the following output shows that the directory has no access issues.
The problem here, is that the root directory is owned by hdfs, the group name is hdfs, but the others setting is - (0). The
user making the request is jhs@REALM, and this user is a member of hadoop, but not hdfs, so this user has no object ACL
permissions to list the /mr-history/done directory. Performing the chmod command on the root directory enables this user
to perform their task.
184
Failed to process request
The Failed to Process Request is displayed when listing a bucket.
When performing the list bucket command, for example:
ERROR_FAILED_TO_PROCESS_REQUEST
Workaround
Possible reasons for this error are:
1. The viprfs-client JAR file on the Hadoop node is not in sync with the ECS software.
2. You are attempting to access a secure (Kerberos) bucket from a non-secure (non-Kerberos) Hadoop node.
3. You are attempting to access a non-secure (non-Kerberos) bucket from a secure (Kerberos) Hadoop node.
export HADOOP_OPTS="-Dsun.security.krb5.debug=true"
export HADOOP_ROOT_LOGGER="Debug,console"
tail -f /var/log/krb5kdc.log
185
2. Run the following commands:
a. w32tm /config /syncfromflags:manual /manualpeerlist:<ntp-server1>,<ntp-server2>
b. net stop w32time
c. net start w32time
/home/admin/ansible/viprfs-client-<ECS version>-<version>/playbooks
2. Edit the inventory.txt file in the playbooks/samples directory to add the ECS nodes.
The default entries are shown in the following extract.
[data_nodes]
192.168.2.[100:200]
[kdc]
192.168.2.10
3. Start the utility container on ECS Node 1 and make the Ansible playbooks available to the container.
a. Load the utility container image.
Example:
In the example, the location to which the Ansible playbooks were unzipped /home/admin/ansible/viprfs-
client-3.0.0.0.85325.a05145b/playbooks is mapped to the /ansible directory in the utility container.
4. Change to the working directory in the container.
186
Example:
cd /ansible
6. Run the Ansible playbook to configure the data nodes with the ECS service principal.
Make sure the /ansible/samples/keytab directory exists and the krb5.conf file is in the working directory /
ansible/samples directory.
Verify that the correct ECS service principal, one per data node, has been created (from the KDC):
Verify that correct keytab is generated and stored in location: /data/hdfs/krb5.keytab on all ECS data nodes. You
can use the strings command on the keytab to extract the human readable text, and verify that it contains the correct
principal. For example:
c. If it does not resolve to the correct hostname, add the ECS DNS to the /etc/resolv.conf on the Hadoop nodes.
You can check that the DNS entries are there by running:
cat /etc/resolv.conf
2. Check the system time in the Hadoop node, ECS nodes, and KDC.
187
Use:
# date
If the time of the systems is not consolidated, they should be synced to the same NTP server.
Information on enabling NTP on the cluster and on the browser host is described Ambari Security Guide.
3. If the previous steps do not work, you can try to manually create folder done or active under /ats.
Found 2 items
drwxrwxrwt - yarn hadoop 0 2016-07-12 09:00 /ats/active
drwx------ - yarn hadoop 0 2016-07-12 09:00 /ats/done
188
B
Topics:
• Set up the Kerberos KDC
• Configure AD user authentication for Kerberos
# rm -rf /dev/random
b. Recreate using:
# mknod /dev/random c 1 9
# kdb5_util create -s
NOTE: If you made a mistake with the initial principals. For example, you ran "kdb5_util create -s" incorrectly, you might
need to delete these principals explicitly in the /var/kerberos/krb5kdc/ directory.
7. Modify /var/kerberos/krb5kdc/kdc.conf and take out any encryption type except des-cbc-crc:normal. Also
modify the realm name.
8. Ensure that iptables and selinux are off on all nodes (KDC server as well as Hadoop nodes).
9. Start KDC services and create a local admin principal.
kadmin.local
# kinit root/admin
189
Any time you make a modification to any of the configuration files restart the below services and copy the krb5.conf file
over to relevant Hadoop host and ECS nodes.
11. Restart the services.
On Active Directory
You must set up a one-way cross-realm trust from the KDC realm to the AD realm. To do so, run the following commands at a
command prompt.
For example:
For this example, encryption des-cbc-crc was used. However, this is a weak encryption that was only chosen for demonstration
purposes. Whatever encryption you choose, the AD, KDC, and clients must support it.
# kadmin
kadmin: addprinc -e "des-cbc-crc:normal" krbtgt/[email protected]
NOTE: When deploying, it is best to limit the encryption types to the one you chose. Once this is working, additional
encryption types can be added.
2. Add the following rules to your core-site.xml hadoop.security.auth_to_local property:
RULE:[1:$1@$0](^.*@CAMBRIDGE\.ACME\.COM$)s/^(.*)@CAMBRIDGE\.ACME\.COM$/$1/g
RULE:[2:$1@$0](^.*@CAMBRIDGE\.ACME\.COM$)s/^(.*)@CAMBRIDGE\.ACME\.COM$/$1/g
3. Verify that AD or LDAP is correctly setup with the Kerberos (KDC) server. User should be able to "kinit" against an AD user
and list local HDFS directory.
NOTE: If you are configuring your Hadoop cluster and ECS to authenticate through an AD, create local Linux user
accounts on all Hadoop nodes for the AD user you will be kinit'ed as, and also make sure that all Hadoop host are kinit'ed
190
using that AD user. For example, if you kinit as userX@ADREALM, create userX as a local user on all Hadoop hosts, and
kinit using: 'kinit userX@ADREALM' on all hosts for that user.
In the example below, we will authenticate as "kinit [email protected]", so will create a user called "detscr" and
kinit as this user on the Hadoop host. As shown below:
191
C
Topics:
• Secure bucket metadata
{
"head_type": "hdfs",
"metadata": [
{
"name": "internal.kerberos.user.ambari-qa.name",
"value": "ambari-qa@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.ambari-qa.shortname",
"value": "ambari-qa"
},
{
"name": "internal.kerberos.user.ambari-qa.groups",
"value": "hadoop,users"
},
{
"name": "internal.kerberos.user.cmaurer.name",
"value": "cmaurer@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.cmaurer.shortname",
"value": "cmaurer"
},
{
"name": "internal.kerberos.user.cmaurer.groups",
"value": "cmaurer,adm,cdrom,sudo,dip,plugdev,users,lpadmin,sambashare"
},
{
"name": "internal.kerberos.user.dn.name",
"value": "dn@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.dn.shortname",
"value": "hdfs@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.dn.groups",
"value": "hadoop,hdfs"
},
{
"name": "internal.kerberos.user.hdfs.name",
"value": "hdfs@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.hdfs.shortname",
"value": "hdfs"
},
{
"name": "internal.kerberos.user.hdfs.groups",
"value": "hadoop,hdfs"
},
{
"name": "internal.kerberos.user.hive.name",
"value": "hive@EXAMPLE_HDFS.EMC.COM"
192
},
{
"name": "internal.kerberos.user.hive.shortname",
"value": "hive"
},
{
"name": "internal.kerberos.user.hive.groups",
"value": "hadoop"
},
{
"name": "internal.kerberos.user.jhs.name",
"value": "jhs@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.jhs.shortname",
"value": "mapred"
},
{
"name": "internal.kerberos.user.jhs.groups",
"value": "hadoop"
},
{
"name": "internal.kerberos.user.nm.name",
"value": "nm@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.nm.shortname",
"value": "yarn@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.nm.groups",
"value": "hadoop"
},
{
"name": "internal.kerberos.user.nn.name",
"value": "nn@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.nn.shortname",
"value": "hdfs@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.nn.groups",
"value": "hadoop,hdfs"
},
{
"name": "internal.kerberos.user.rm.name",
"value": "rm@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.rm.shortname",
"value": "yarn@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.rm.groups",
"value": "hadoop"
},
{
"name": "internal.kerberos.user.spark.name",
"value": "spark@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.spark.shortname",
"value": "spark"
},
{
"name": "internal.kerberos.user.spark.groups",
"value": "hadoop"
},
{
"name": "internal.kerberos.user.yarn.name",
"value": "yarn@EXAMPLE_HDFS.EMC.COM"
},
193
{
"name": "internal.kerberos.user.yarn.shortname",
"value": "yarn"
},
{
"name": "internal.kerberos.user.yarn.groups",
"value": "hadoop"
},
{
"name": "internal.kerberos.user.zookeeper.name",
"value": "zookeeper@EXAMPLE_HDFS.EMC.COM"
},
{
"name": "internal.kerberos.user.zookeeper.shortname",
"value": "ams"
},
{
"name": "internal.kerberos.user.zookeeper.groups",
"value": "hadoop"
},
{
"name": "hadoop.proxyuser.hcat.groups",
"value": "*"
},
{
"name": "hadoop.proxyuser.hcat.hosts",
"value": "*"
},
{
"name": "hadoop.proxyuser.yarn.users",
"value": "*"
},
{
"name": "hadoop.proxyuser.yarn.hosts",
"value": "*"
},
{
"name": "hadoop.proxyuser.hive.hosts",
"value": "10.247.179.42"
},
{
"name": "hadoop.proxyuser.hive.users",
"value": "*"
},
{
"name": "hadoop.proxyuser.hcat.groups",
"value": "*"
},
{
"name": "hadoop.proxyuser.hcat.hosts",
"value": "*"
},
{
"name": "dfs.permissions.supergroup",
"value": "hdfs"
}
]
}
194
D
Topics:
• Hadoop core-site.xml properties for ECS HDFS
• Hadoop core-site.xml properties for ECS S3
fs.AbstractFileSystem.v
iprfs.impl <property>
<name>fs.AbstractFileSystem.viprfs.impl</name>
<value>com.emc.hadoop.fs.vipr.ViPRAbstractFileSystem</value>
</property>
Properties that define the authority section of the ECS HDFS file system URI
fs.vipr.installations A comma-separated list of names. The names are further defined by the fs.vipr.installation.
[federation].hosts property to uniquely identify sets of ECS data nodes. The names are used as
a component of the authority section of the ECS HDFS file system URI. For example:
<property>
<name>fs.vipr.installations</name>
<value><federation>,<site1>,<testsite></value>
</property>
fs.vipr.installation. The IP addresses of the ECS cluster's data nodes or the load balancers for each name listed in the
[federation].hosts fs.vipr.installations property. Specify the value in the form of a comma-separated list of IP addresses
or FQDNs. For example:
<property>
<name>fs.vipr.installation.<federation>.hosts</name>
<value>203.0.113.10,203.0.113.11,203.0.113.12</value>
</property>
fs.vipr.installation. Specifies how the ECS HDFS software knows how to access the ECS data nodes. Values are:
[installation_name].reso ● dynamic: Use this value when accessing ECS data nodes directly without a load balancer.
lution ● fixed: Use this value when accessing ECS data nodes through a load balancer.
<property>
<name>fs.vipr.installation.<federation>.resolution</name>
<value>dynamic</value>
195
Table 58. Hadoop core-site.xml properties (continued)
Property Description
</property>
<property>
<name>fs.vipr.installation.<federation>.resolution.dynamic.time_to_li
ve_ms</name>
<value>600000</value>
</property>
viprfs://[bucket_name].[namespace].[federation]
● bucket_name: The name of the HDFS-enabled bucket that contains the data you want to use
when you run Hadoop jobs.
● namespace : The tenant namespace associated with the HDFS-enabled bucket.
● federation: The name associated with the set of ECS data nodes that Hadoop can use to
access ECS data. The value of this property must match one of the values specified in the
fs.vipr.installations property.
For example:
<property>
<name>fs.defaultFS</name>
<value>viprfs://testbucket.s3.federation1</value>
</property>
umask property
fs.permissions.umask- This standard Hadoop property specifies how ECS HDFS should compute permissions on objects.
mode Permissions are computed by applying a umask on the input permissions. The recommended value
for both simple and Kerberos configurations is: 022. For example:
<property>
<name>fs.permissions.umask-mode</name>
<value>022</value>
</property>
196
Table 58. Hadoop core-site.xml properties (continued)
Property Description
● CURRENT_USER_REALM: Valid when Kerberos is present. The user's realm is auto-detected,
and it is the realm of the currently signed in user. In the example below, the realm is EMC.COM
because sally is in the EMC.COM realm. The file ownership is changed [email protected].
# kinit [email protected]
# hdfs dfs -chown john /path/to/file
Realms provided at the command line takes precedence over the property settings.
<property>
<name>fs.viprfs.auth.identity_translation
</name>
<value>CURRENT_USER_REALM</value>
</property>
fs.viprfs.auth.anonymou This property is used to determine how users and groups are assigned to newly created files.
s_translation NOTE: This property was used to determine what happened to files that had no owner. These
files were said to be owned by anonymous. Files and directories are no longer anonymously
owned. The values are:
● LOCAL_USER: Use this setting with a Hadoop cluster that uses simple security. Assigns the Unix
user and group of the Hadoop cluster to newly created files and directories.
● CURRENT_USER: Use this setting for a Hadoop cluster that uses Kerberos. Assigns the Kerberos
principal ([email protected]) as the file or directory owner, and uses the group that has been
assigned as the default for the bucket.
● NONE: (Deprecated) Previously indicated that no mapping from the anonymously owned objects
to the current user should be performed.
<property>
<name>fs.viprfs.auth.anonymous_translation</name>
<value>CURRENT_USER</value>
</property>
<property>
<name>viprfs.security.principal</name>
<value>vipr/[email protected]</value>
</property>
<property>
197
<name>fs.viprfs.impl</name>
<value>com.emc.hadoop.fs.vipr.ViPRFileSystem</value>
</property>
<property>
<name>fs.AbstractFileSystem.viprfs.impl</name>
<value>com.emc.hadoop.fs.vipr.ViPRAbstractFileSystem</value>
</property>
<property>
<name>fs.vipr.installations</name>
<value>federation1</value>
</property>
<property>
<name>fs.vipr.installation.federation1.hosts</name>
<value>203.0.113.10,203.0.113.11,203.0.113.12</value>
</property>
<property>
<name>fs.vipr.installation.federation1.resolution</name>
<value>dynamic</value>
</property>
<property>
<name>fs.vipr.installation.federation1.resolution.dynamic.time_to_live_ms</name>
<value>900000</value>
</property>
<property>
<name>fs.defaultFS</name>
<value>viprfs://mybucket.mynamespace.federation1/</value>
</property>
<property>
<name>fs.viprfs.auth.anonymous_translation</name>
<value>LOCAL_USER</value>
</property>
<property>
<name>fs.viprfs.auth.identity_translation</name>
<value>NONE</value>
</property>
198
Table 59. Hadoop core-site.xml properties for ECS S3 (continued)
Property Description
fs.s3a.connection.establish.timeout=500 Socket connection setup timeout in milliseconds.
0
fs.s3a.connection.timeout=200000 Socket connect timeout (default: 5000)
fs.s3a.paging.maximum=1000 How many keys to request from S3 when doing directory listings at a time (default:
5000)
fs.s3a.threads.max=10 The total number of threads available in the filesystem for data uploads *or any
other queued filesystem operation*.
fs.s3a.socket.send.buffer=8192 Socket send buffer hint to amazon connector. Represented in bytes.
fs.s3a.socket.recv.buffer=8192 Socket receive buffer hint to amazon connector. Represented in bytes.
fs.s3a.threads.keepalivetime=60 Number of seconds a thread can be idle before being terminated.
fs.s3a.max.total.tasks=5 The number of operations which can be queued for execution.
fs.s3a.multipart.size=100M How big (in bytes) to split a upload or copy operation up into (default: 100 MB)
fs.s3a.multipart.threshold=2147483647 Until a file is this large (in bytes), use non-parallel upload (default: 2 GB)
fs.s3a.multiobjectdelete.enable=true When enabled, multiple single-object delete requests are replaced by a single 'delete
multiple objects'-request, reducing the number of requests. Beware: legacy S3-
compatible object stores might not support this request.
fs.s3a.acl.default=PublicReadWrite Set a canned ACL on newly created/copied objects (Private | PublicRead |
PublicReadWrite | AuthenticatedRead | LogDeliveryWrite | BucketOwnerRead |
BucketOwnerFullControl)
fs.s3a.multipart.purge=false True if you want to purge existing multipart uploads that may not have been
completed/aborted correctly (default: false)
fs.s3a.multipart.purge.age=86400 Minimum age in seconds of multipart uploads to purge (default: 86400)
fs.s3a.block.size=32M Block size to use when reading files using s3a: file system. A suffix from the set
{K,M,G,T,P} may be used to scale the numeric value.
fs.s3a.readahead.range=64K Bytes to read ahead during a seek() before closing and re-opening the S3 HTTP
connection. This option will be overridden if any call to setReadahead() is made
to an open stream. A suffix from the set {K,M,G,T,P} may be used to scale the
numeric value.
fs.s3a.buffer.dir=${hadoop.tmp.dir}/s3a Comma separated list of directories that will be used to buffer file writes out of
(default: uses fs.s3.buffer.dir)
<configuration xmlns:xi="http://www.w3.org/2001/XInclude">
<property>
<name>fs.azure.user.agent.prefix</name>
<value>User-Agent: APN/1.0 Hortonworks/1.0 HDP/</value>
</property>
<property>
<name>fs.defaultFS</name>
<value>hdfs://<<hostname:8020>></value>
<final>true</final>
</property>
199
<property>
<name>fs.s3a.access.key</name>
<value><<userid>></value>
</property>
<property>
<name>fs.s3a.acl.default</name>
<value>PublicReadWrite</value>
</property>
<property>
<name>fs.s3a.block.size</name>
<value>32M</value>
</property>
<property>
<name>fs.s3a.bucket.s3aTestBucket.access.key</name>
<value>ambari-qa</value>
</property>
<property>
<name>fs.s3a.bucket.s3aTestBucket.secret.key</name>
<value>secret_key</value>
</property>
<property>
<name>fs.s3a.buffer.dir</name>
<value>${hadoop.tmp.dir}/s3a</value>
</property>
<property>
<name>fs.s3a.connection.establish.timeout</name>
<value>5000</value>
</property>
<property>
<name>fs.s3a.connection.maximum</name>
<value>15</value>
</property>
<property>
<name>fs.s3a.connection.ssl.enabled</name>
<value>false</value>
</property>
<property>
<name>fs.s3a.connection.timeout</name>
<value>200000</value>
</property>
<property>
<name>fs.s3a.endpoint</name>
<value><<Host IP address>></value>
</property>
<property>
<name>fs.s3a.fast.upload</name>
<value>true</value>
</property>
<property>
<name>fs.s3a.fast.upload.buffer</name>
<value>disk</value>
</property>
<property>
<name>fs.s3a.max.total.tasks</name>
<value>5</value>
</property>
<property>
<name>fs.s3a.multiobjectdelete.enable</name>
<value>true</value>
200
</property>
<property>
<name>fs.s3a.multipart.purge</name>
<value>false</value>
</property>
<property>
<name>fs.s3a.multipart.purge.age</name>
<value>86400</value>
</property>
<property>
<name>fs.s3a.multipart.size</name>
<value>67108864</value>
</property>
<property>
<name>fs.s3a.multipart.threshold</name>
<value>2147483647</value>
</property>
<property>
<name>fs.s3a.paging.maximum</name>
<value>1000</value>
</property>
<property>
<name>fs.s3a.path.style.access</name>
<value>false</value>
</property>
<property>
<name>fs.s3a.readahead.range</name>
<value>64K</value>
</property>
<property>
<name>fs.s3a.secret.key</name>
<value><<secret key>></value>
</property>
<property>
<name>fs.s3a.socket.recv.buffer</name>
<value>8192</value>
</property>
<property>
<name>fs.s3a.socket.send.buffer</name>
<value>8192</value>
</property>
<property>
<name>fs.s3a.threads.keepalivetime</name>
<value>60</value>
</property>
<property>
<name>fs.s3a.threads.max</name>
<value>10</value>
</property>
<property>
<name>fs.s3a.user.agent.prefix</name>
<value>User-Agent: APN/1.0 Hortonworks/1.0 HDP/</value>
</property>
<property>
<name>fs.trash.interval</name>
<value>360</value>
</property>
<property>
201
<name>ha.failover-controller.active-standby-elector.zk.op.retries</name>
<value>120</value>
</property>
<property>
<name>ha.zookeeper.acl</name>
<value>sasl:nn:rwcda</value>
</property>
<property>
<name>hadoop.http.authentication.cookie.domain</name>
<value>centera.lab.emc.com</value>
</property>
<property>
<name>hadoop.http.authentication.kerberos.keytab</name>
<value>/etc/security/keytabs/spnego.service.keytab</value>
</property>
<property>
<name>hadoop.http.authentication.kerberos.principal</name>
<value>HTTP/[email protected]</value>
</property>
<property>
<name>hadoop.http.authentication.signature.secret.file</name>
<value>/etc/security/http_secret</value>
</property>
<property>
<name>hadoop.http.authentication.simple.anonymous.allowed</name>
<value>false</value>
</property>
<property>
<name>hadoop.http.authentication.type</name>
<value>kerberos</value>
</property>
<property>
<name>hadoop.http.cross-origin.allowed-headers</name>
<value>X-Requested-With,Content-Type,Accept,Origin,WWW-Authenticate,Accept-
Encoding,Transfer-Encoding</value>
</property>
<property>
<name>hadoop.http.cross-origin.allowed-methods</name>
<value>GET,PUT,POST,OPTIONS,HEAD,DELETE</value>
</property>
<property>
<name>hadoop.http.cross-origin.allowed-origins</name>
<value>*</value>
</property>
<property>
<name>hadoop.http.cross-origin.max-age</name>
<value>1800</value>
</property>
<property>
<name>hadoop.http.filter.initializers</name>
<value>org.apache.hadoop.security.AuthenticationFilterInitializer,org.apache.hadoop.secur
ity.HttpCrossOriginFilterInitializer</value>
</property>
<property>
<name>hadoop.proxyuser.ambari-server.groups</name>
<value>*</value>
</property>
<property>
202
<name>hadoop.proxyuser.ambari-server.hosts</name>
<value><Ambari server fully qualified name>></value>
</property>
<property>
<name>hadoop.proxyuser.hdfs.groups</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.hdfs.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.hive.groups</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.hive.hosts</name>
<value><<hive host>></value>
</property>
<property>
<name>hadoop.proxyuser.HTTP.groups</name>
<value>users</value>
</property>
<property>
<name>hadoop.proxyuser.knox.groups</name>
<value>users</value>
</property>
<property>
<name>hadoop.proxyuser.knox.hosts</name>
<value><<knox host>></value>
</property>
<property>
<name>hadoop.proxyuser.livy.groups</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.livy.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.yarn.groups</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.yarn.hosts</name>
<value><<yarn host>></value>
</property>
<property>
<name>hadoop.rpc.protection</name>
<value>authentication,privacy</value>
</property>
<property>
<name>hadoop.security.auth_to_local</name>
<value>RULE:[1:$1@$0]([email protected])s/.*/ambari-qa/
RULE:[1:$1@$0]([email protected])s/.*/hbase/
RULE:[1:$1@$0]([email protected])s/.*/hdfs/
RULE:[1:$1@$0]([email protected])s/.*/spark/
RULE:[1:$1@$0]([email protected])s/.*/yarn-ats/
RULE:[1:$1@$0](.*@SM.EMC.COM)s/@.*//
RULE:[2:$1@$0]([email protected])s/.*/activity_analyzer/
203
RULE:[2:$1@$0]([email protected])s/.*/activity_explorer/
RULE:[2:$1@$0]([email protected])s/.*/ams/
RULE:[2:$1@$0]([email protected])s/.*/ams/
RULE:[2:$1@$0]([email protected])s/.*/ams/
RULE:[2:$1@$0]([email protected])s/.*/atlas/
RULE:[2:$1@$0]([email protected])s/.*/hdfs/
RULE:[2:$1@$0]([email protected])s/.*/hbase/
RULE:[2:$1@$0]([email protected])s/.*/hive/
RULE:[2:$1@$0]([email protected])s/.*/mapred/
RULE:[2:$1@$0]([email protected])s/.*/knox/
RULE:[2:$1@$0]([email protected])s/.*/yarn/
RULE:[2:$1@$0]([email protected])s/.*/hdfs/
RULE:[2:$1@$0]([email protected])s/.*/yarn/
RULE:[2:$1@$0]([email protected])s/.*/spark/
RULE:[2:$1@$0]([email protected])s/.*/yarn/
RULE:[2:$1@$0]([email protected])s/.*/yarn-ats/
DEFAULT</value>
</property>
<property>
<name>hadoop.security.authentication</name>
<value>kerberos</value>
</property>
<property>
<name>hadoop.security.authorization</name>
<value>true</value>
</property>
<property>
<name>hadoop.security.instrumentation.requires.admin</name>
<value>false</value>
</property>
<property>
<name>io.compression.codecs</name>
<value>org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec
,org.apache.hadoop.io.compress.SnappyCodec</value>
</property>
<property>
<name>io.file.buffer.size</name>
<value>131072</value>
</property>
<property>
<name>io.serializations</name>
<value>org.apache.hadoop.io.serializer.WritableSerialization</value>
</property>
<property>
<name>ipc.client.connect.max.retries</name>
<value>50</value>
</property>
<property>
<name>ipc.client.connection.maxidletime</name>
<value>30000</value>
</property>
<property>
<name>ipc.client.idlethreshold</name>
<value>8000</value>
</property>
<property>
<name>ipc.server.tcpnodelay</name>
<value>true</value>
</property>
<property>
<name>mapreduce.jobtracker.webinterface.trusted</name>
204
<value>false</value>
</property>
<property>
<name>net.topology.script.file.name</name>
<value>/etc/hadoop/conf/topology_script.py</value>
</property>
</configuration>
205
E
Topics:
• External key management
206
F
Topics:
• Document feedback
Document feedback
If you have any feedback or suggestions regarding this document, mailto:[email protected].
207
Index
B
Bucket Policies 18
C
CloudDVR 71
D
DELETE Object Tagging 20
E
ECS IAM 78, 98
ECS IAM entities 78
ECS IAM limitations 96
F
File system enabled 34
G
GET Object Tagging 20
L
Lifecycle Management 18
O
Object Lock 22
Object tag 18
object tagging parameters 20
P
PUT object tagging 20
S
s3bucketoperation 99
T
Tag set 18