我收到一个错误:
UnauthorizedError:InvalidSignature:令牌的签名无效
当我尝试从Azure中Kubernetes集群内运行的nodejs docker容器访问Azure Service Bus时。
有趣的是,当我在本地运行代码时,或者只是在我的开发笔记本电脑上的docker容器内部时,我没有收到此错误,但是一旦我将容器部署到K8集群,我就会收到该错误。
我在K8集群机密文件中验证了服务总线SAS主键是否正确。
以下是K8集群中错误对象的外观:
UnauthorizedError: InvalidSignature: The token has an invalid signature. {"timestamp":"2019-01-08T05:43:48.918Z"}
debug: condition: com.microsoft:auth-failed {"timestamp":"2019-01-08T05:43:48.920Z"}
debug: info: undefined {"timestamp":"2019-01-08T05:43:48.920Z"}
debug: message: InvalidSignature: The token has an invalid signature. {"timestamp":"2019-01-08T05:43:48.924Z"}
debug: name: UnauthorizedError {"timestamp":"2019-01-08T05:43:48.924Z"}
debug: retryable: false {"timestamp":"2019-01-08T05:43:48.924Z"}
debug: stack: UnauthorizedError: InvalidSignature: The token has an invalid signature.
at Object.translate (/usr/src/app/node_modules/@azure/amqp-common/dist/lib/errors.js:527:17)
at Receiver.messageCallback (/usr/src/app/node_modules/@azure/amqp-common/dist/lib/requestResponseLink.js:109:44)
at Receiver.emit (events.js:182:13)
at emit (/usr/src/app/node_modules/rhea-promise/dist/lib/util/utils.js:129:24)
at Object.emitEvent (/usr/src/app/node_modules/rhea-promise/dist/lib/util/utils.js:140:9)
at Receiver._link.on (/usr/src/app/node_modules/rhea-promise/dist/lib/link.js:249:25)
at Receiver.emit (events.js:182:13)
at Receiver.link.dispatch (/usr/src/app/node_modules/rhea/lib/link.js:59:37)
at Incoming.on_transfer (/usr/src/app/node_modules/rhea/lib/session.js:360:22)
at Session.on_transfer (/usr/src/app/node_modules/rhea/lib/session.js:736:19) {"timestamp":"2019-01-08T05:43:48.925Z"}
debug: translated: true {"timestamp":"2019-01-08T05:43:48.925Z"}
我正在使用@ azure / service-bus作为节点包来处理azure服务总线。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。