-
Notifications
You must be signed in to change notification settings - Fork 638
Closed
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
If I create an IAM service account with the View and Subscribe roles, I am unable to subscribe to an existing topic in pub/sub. It seems I must use an admin role. Some clarification on the roles required to do various things would be nice. I'm not sure if the issue is being cause by the node client or if I am actually missing roles that are needed.
Environment details
- OS: Mac OSX
- Node.js version: v6.3.0
- npm version: 3.10.3
- @google-cloud/pubsub version: 0.1.1
Steps to reproduce
const pubsub = require('@google-cloud/pubsub');
const JOB_QUEUE = 'new_job';
const pubsubClient = pubsub({
projectId: 'myproject-goes-here',
keyFilename: '/Users/Mark/creds.json'
});
const newJobTopic = pubsubClient.topic(JOB_QUEUE);
newJobTopic.subscribe(JOB_QUEUE, {
reuseExisting: true
}, function(err, subscription) {
console.error(err); // Error: User not authorized to perform this action.
});
If I create a service account that has an admin pub/sub role, I can connect to the service as expected.
ScottBrenner, Emixam23-FCMS and Nosmoht
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.