HSDS Domain - bucket validation

Hi,

Attempting to use HSDS with nrel.

I’m running into an issue regarding the changeset made from this MR:

Restrict bucket names to alphanumeric characters and underscores by mattjala · Pull Request #319 · HDFGroup/hsds · GitHub and nrel-pds-hsds bucket.

Seems like AWS allows:
Bucket names can consist only of lowercase letters, numbers, dots (.), and hyphens (-).

but we’re stricting to just underscores and alphabets. Any reason why?

Thanks,
Phou

The commit message is a little misleading. Dots and hyphens are allowed as well - see testIsValidBucketName. Could you provide more detail about the issue you’re running into? HSDS should be strictly more permissive than AWS about bucket names.

Locally, if I build without the re.match validation logic, everything works perfectly.

def testIsValidBucketName(self):
    # Illegal characters
    self.assertTrue(isValidBucketName("nrel-pds-hsds"))

curl localhost:5101/domains
400: Invalid bucket name:

this is what I was getting

Ah, I was looking at an old commit. HSDS does currently disallow periods and hyphens. I’ve made a PR to allow these characters in bucket names again.

1 Like

The PR has been merged with master. Let us know if there’s still a problem.