GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Implement ACL abstraction for Cloud Storage API · Issue #285 · googleapis/google-cloud-node

Implement ACL abstraction for Cloud Storage API #285

New issue
Copy link
New issue
Copy link
Closed
Closed
Implement ACL abstraction for Cloud Storage API#285
Copy link
Assignees
ryanseys
Labels
🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.
Milestone
Storage Stable

Description

@silvolu
silvolu
opened on Nov 6, 2014
Issue body actions

@ryanseys' refactoring proposal contained a stub at an ACL API that we deprioritized in favor of support for more API.
The time has come to implement it. I like the gcloud-python approach, where you can do things like:

bucket.acl.user('[email protected]').grant_read()
bucket.acl.all_authenticated().grant_write()
bucket.acl.save()

Activity

Next
  1. silvolu
    added this to the This milestone has been deleted milestone on Nov 6, 2014
  2. stephenplusplus commented on Nov 7, 2014

    @stephenplusplus
    stephenplusplus
    on Nov 7, 2014
    Contributor
    More actions

    Snipped this out from the post linked above.

    ACL class

    var myACL = storage.acl(['entity', 'permission', 'entity2', 'permission2']);

    Buckets:

    myBucket.clearDefaultACL(cb);
    myBucket.getDefaultACL(cb);
    myBucket.setDefaultACL(myACL, cb);
    
    myBucket.clearACL(cb);
    myBucket.getACL(cb);
    myBucket.setACL(myACL, cb);

    Files:

    myFile.clearACL(cb);
    myFile.getACL(cb);
    myFile.setACL(myACL, cb);

    And here's another variation to consider, which is more like @silvolu's model above. The demos below use myBucket but should work with myFile as well.

    myBucket.acl.grant('[email protected]', ['read', 'write'], function(err) {});
    myBucket.acl.revoke('allUsers', 'read', function(err) {});
    
    // array variations:
    myBucket.acl.grant(['[email protected]', 'someotherdude'], ['read', 'write'], function(err) {});
    myBucket.acl.revoke(['[email protected]', 'allAuthenticatedUsers'], 'write', function(err) {});
    
    myBucket.acl.get(function(err, acl) {
      acl = [
        { account: '[email protected]', permissions: ['read', 'write'] },
        { account: 'someotherdude', permissions: ['read', 'write'] }
      ]
    });
    
    myBucket.acl.get('[email protected]', function(err, acl) {
      acl = {
        account: '[email protected]', permissions: ['read', 'write']
      }
    });
    • Maybe get/set/delete instead of get/grant/revoke?
    • Should we allow easier ACL setting when creating a bucket, or is letting them configure the metadata object enough?
  3. stephenplusplus commented on Nov 14, 2014

    @stephenplusplus
    stephenplusplus
    on Nov 14, 2014
    Contributor
    More actions

    * bump * :)

  4. ryanseys commented on Nov 14, 2014

    @ryanseys
    ryanseys
    on Nov 14, 2014
    Contributor
    More actions

    Whoops overlooked this. So just to simplify we have:

    Get acl is .get([user,] cb)
    Set acl is .grant(users, sharedPermissions, cb) and .revoke(users, permission, cb)

    Questions:

    • How will be setting default permissions for new objects in a bucket?
    • Should allAuthenticatedUsers be abstracted to its own method call? e.g. grantAllAuthenticated() or something?
    • How can I make all my bucket objects public for everyone, including new objects that I might add later? (I imagine this is a common use case)
  5. silvolu commented on Nov 14, 2014

    @silvolu
    silvolu
    on Nov 14, 2014
    ContributorAuthor
    More actions

    How will be setting default permissions for new objects in a bucket?

    Something like:

    acl = [
        { account: '[email protected]', permissions: ['read', 'write'] },
        { account: 'someotherdude', permissions: ['read', 'write'] }
      ]
    myBucket.defaultAcl.set(acl, function(err, acl) {
      // whatever
    });

    Should allAuthenticatedUsers be abstracted to its own method call? e.g. grantAllAuthenticated() or something?

    Might be nice as an addition. I guess we should provide both grant/revokeAllAuthenticated.

    How can I make all my bucket objects public for everyone, including new objects that I might add later? (I imagine this is a common use case)

    You mean how to make that happen or how to better expose it?

    (edit): replaced get with set in the example
    (edit): I think the example makes more sense now

  6. ryanseys commented on Nov 24, 2014

    @ryanseys
    ryanseys
    on Nov 24, 2014
    Contributor
    More actions

    Fixed by #304

  7. ryanseys
    closed this as completedon Nov 24, 2014
  8. jgeewax
    added
    api: storageIssues related to the Cloud Storage API.
    on Feb 2, 2015
  9. jgeewax
    modified the milestones: This milestone has been deleted, Storage Stable on Feb 2, 2015
  10. yoshi-automation
    added
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Apr 6, 2020
  11. JustinBeckwith
    assigned
    ryanseys
    on Feb 1, 2021
  12. 27 remaining items

  13. sofisl
    added a commit that references this issue on Feb 5, 2026

    chore(build): inject yoshi automation key (#285)

    14e2482
  14. GautamSharda
    added a commit that references this issue on Feb 5, 2026

    chore(build): inject yoshi automation key (#285)

    26c803d
  15. sofisl
    added a commit that references this issue on Feb 17, 2026

    chore(build): inject yoshi automation key (#285)

    40dc175
  16. GautamSharda
    added a commit that references this issue on Feb 23, 2026

    chore(build): inject yoshi automation key (#285)

    868102e
  17. sofisl
    added a commit that references this issue on Feb 25, 2026

    chore(deps): lock file maintenance (#285)

    ee09411
  18. GautamSharda
    added 2 commits that reference this issue on Feb 25, 2026

    chore(main): release 3.1.0 (#285)

    e5495e9

    chore(build): inject yoshi automation key (#285)

    dd4acff
  19. sofisl
    added 2 commits that reference this issue on Feb 26, 2026

    chore(deps): lock file maintenance (#285)

    9234595

    chore: update npm scripts and synth.py (#285)

    f5349a7
  20. thiyaguk09
    added a commit that references this issue on Mar 18, 2026

    chore(deps): lock file maintenance (googleapis#285)

    10ad910
  21. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    chore(deps): update dependency nyc to v13 (#285)

    f9940de

    chore(deps): update dependency nyc to v13 (#285)

    211bb95
  22. feywind
    added a commit that references this issue on Mar 27, 2026

    chore(deps): update dependency sinon to v7 (#285)

    d2bd0e5
  23. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    chore(deps): update dependency nyc to v13 (#285)

    31af867
  24. thiyaguk09
    added a commit that references this issue on May 5, 2026

    chore(deps): update dependency nyc to v13 (googleapis#285)

    c6a0fa4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @ryanseys
    ryanseys

Labels

🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.

Type

No type

Projects

No projects

    Milestone

    • Storage Stable

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.