Answered by:
Connect golang app with Queue Storage

Question
-
Hello!
I need an updated "definitive" tutorial or explanation of how to connect my golang app to queue storage services, since authenticate untill post and get messages.If you tell me, for example, SDK, please show me how to generate and use credentials, because based only on the docs I'm walking in circles.
Thank you!
Friday, June 1, 2018 9:40 PM
Answers
-
We (The Azure Storage team) are building new Go SDKs. Today, the SDKs for our Blobs and Files services are available on GitHub at these two links:
Our Go Queues SDK should be ready for public preview by June 15, 2018 and will be available here:
These SDKs will have a long lifetime and be fully supported by the Azure Storage team.
-- Jeffrey Richter (https://azure.microsoft.com/training/distributed-cloud-apps/)
- Edited by Jeffrey Richter Sunday, June 3, 2018 8:56 PM
- Marked as answer by Open Vista Pragier Monday, June 4, 2018 5:09 PM
Sunday, June 3, 2018 8:47 PM
All replies
-
Suggest you refer below link for better understanding.
https://github.com/Azure/azure-sdk-for-go/blob/master/storage/queue.go
Just for clarification, what kind of authentication you are looking? If you want users to log in interactively, the best way to offer that capability is through device token authentication. This authentication flow passes the user a token to paste into a Microsoft login site, where they then log in with an Azure Active Directory (AAD) account. This authentication method supports accounts that have multi-factor authentication enabled, unlike standard username/password authentication. Refer different kind of Authentication methods in the Azure SDK for Go.
--------------------------------------------------------------------------------------------------
If this answer was helpful, click “Mark as Answer” or Up-Vote. To provide additional feedback on your forum experience, click here
- Proposed as answer by Sandeep BR Saturday, June 2, 2018 2:07 PM
Saturday, June 2, 2018 2:07 PM -
We (The Azure Storage team) are building new Go SDKs. Today, the SDKs for our Blobs and Files services are available on GitHub at these two links:
Our Go Queues SDK should be ready for public preview by June 15, 2018 and will be available here:
These SDKs will have a long lifetime and be fully supported by the Azure Storage team.
-- Jeffrey Richter (https://azure.microsoft.com/training/distributed-cloud-apps/)
- Edited by Jeffrey Richter Sunday, June 3, 2018 8:56 PM
- Marked as answer by Open Vista Pragier Monday, June 4, 2018 5:09 PM
Sunday, June 3, 2018 8:47 PM -
Hi Sandeep.
It's not easy to explain, but I gonna do my best: :-)
I made a microservice ( small backend golang app ) that send short messages for another microservice. These messages should be sent through messageQueues.
Once this app is a typical microservice, there will be one/single authentication credential for the entire app.
Some years ago, I made microservices with c#, then authenticating sending application-id and application-secret, both obtainable on Azure Portal > Storage Settings.
But today, according documentation, there are a few ways to connect/authenticate for storage, but doesn't seem the same ways present in SDK.
And, at last, I'm not sure if I should use SDK or only some http client. I may could use simply http, but I couldn't find out how to generate the Authorization content ( for the headers ).
That's why I decided to wait this new SDK version, commented by @JeffreyRitcher.
- Edited by Open Vista Pragier Monday, June 4, 2018 7:50 PM Completeness
Monday, June 4, 2018 5:09 PM -
All Azure Storage services (of which Queues is one of them), support 3 authentication mechanisms:
- Shared-Key: This is the most complicated and is also the slowest. Each HTTP request has some of its attributes (query params and headers) converted to a string and the string is then signed (hashed) using your storage account's key (password). Constructing the string and signing it is complicated and performance intensive.
- Shared Access Signatures (SAS): This technique requires a set of permissions (like access, expiry time, etc.). These permissions and then constructed into a string and the string is signed with your storage account's key (password). The result is a set of query parameters that you append to the URL when making an HTTPS (don't use HTTP) request. While the string construction and signing is performance intensive, it happens just once and the resulting query parameters can be used for making many HTTPS requests. This is probably your best choice (today).
- We are adding OAUTH support for authenticating against our services. The support for this is still rolling out across our various services and I don't think our queue service supports it yet.
All our new Go SDKs support all three authentication mechanisms. This link shows you how to use an account SAS to access blobs; the code will be almost identical for access queues when we ship our Go Queue SDK later this month.
Azure Storage never allowed authentication via an application-id/secret. It always shared key or SAS; OAUTH is new.
-- Jeffrey Richter (http://Wintellect.com)
Tuesday, June 5, 2018 1:21 AM