TritonDataCenter / TritonDataCenter/sdc-cloudapi
sub user account running sdc-docker-setup script
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 8
- Forks
- 22
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
I wanted to start a discussion on using triton/docker containers with a Joyent subuser account.
I'm not sure if I should file this report against sdc-docker repo or here at sdc-cloudapi.
As an FYI - I've also read this section of the Triton FAQ:
Does Triton support RBAC?
Yes, on an account level basis. We are evaluating how to best extend RBAC to sub-account users, given current limitations of the Docker API.
I'm guessing the above means, the "owner account" is the only place that triton/docker containers can run right now.
I've created a subuser account using the documentation for creating an administrator role and added a user to it:
sdc-role create --name=administrator
sdc-user create --login=cmosetick/testadmin --password=MyPasswd --email=hello@mydomain.com
sdc-role update 9a7e4afa-2946-4a4b-8805-4e5e36240c77 --members=testadmin --default-members=testadmin
I also added a ssh key to the testadmin subuser account, and confirmed that it is there in the web GUI.
I've added the testadmin ssh key to my ssh-agent session.
IMO, there is no way the output of this error message could be accurate:
bash ./sdc-docker-setup.sh -k us-east-3b.api.joyent.com cmosetick/testadmin ~/.ssh/testadmin-joyent 1 ↵
Setting up Docker client for SDC using:
CloudAPI: https://us-east-3b.api.joyent.com
Account: cmosetick/testadmin
Key: /Users/chris/.ssh/testadmin-joyent
If you have a pass phrase on your key, the openssl command will
prompt you for your pass phrase now and again later.
Verifying CloudAPI access.
* * *
sdc-docker-setup.sh: fatal error: invalid credentials
You must add create the 'cmosetick/testadmin' account and/or add your SSH
public key (/Users/chris/.ssh/testadmin-joyent.pub) to the
given SmartDataCenter.
Since the administrator role is supposed to be a 'special admin role', IMO, the setup script should work, or at the very least, a more meaningful error message should be returned to a subuser running the setup script. I do also want to note here that the "Docker" section of my.joyent.com web GUI is missing from this sub users account, which again, is outlined in the current Triton FAQ.
I think adding a special "triton" or "docker" role to the sdc-cloudapi would be a straight forward path to allowing subusers to create containers. Allowing the account owner to specify a corresponding policy with a hard limit of max number of containers, max amount of disk space for all containers would be the most logical start for this.
FYI the ssh key in my test is actually associated with the sub user account as far as I can tell, which would leave the sdc-cloudapi or the Docker API as the hurdle to allowing this to work.
Let me know how I can help out with this.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing sdc-docker-setup.sh's CloudAPI credential check and the documented administrator-role and subuser flow. Compare the observed invalid-credentials output with the Triton FAQ's RBAC limitations; done means the supported subuser behavior, Docker API or GUI access, and any resulting error message are clearly defined and addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- api, authentication, authorization, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100