Skip to content

Allow package based permission scoping #36880

Description

@swcarter007

I'm running into an issue trying to balance security and ease of use. In my case, I have a particular library I'm attempted to use @google-cloud/secret-manager. I'm also attempting to define the net security permissions on the application when running to limit outbound calls to known domains. The problem I'm running into is that the particular SDK is doing a few things that require some specific outbound calls to IP addresses. The feature request I'm looking for would be the ability to granularly define permissions based on the library using that particular permission.

Perhaps some structure like this

{
  "permissions": {
    "libs": {  // special global property to identify its not a normal permission
       "@google-cloud/secret-manager": {
         "net": true
      }
    },
   "default": {
      "net": [] // some restricted list by default
    },
    "dev": {
       "libs": {
          "@google-cloud/secret-manager": {
                    //special override when using the "dev" permission 
           }
       }        
     }
  }
}

The reason why I think this could be a reasonable use case is because sometimes there are libraries that you can trust more than others, so you may want to specify permissions slightly differently for those libraries compared to more unknown libraries.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions