Creation of Azure storage from connection string failed for shared key credentials

Aperta
#66 7 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
azure, csharp
Ambito
backend, cloud

Direzione di ricerca

Start with StorageFactory.Blobs.FromConnectionString and FluentStorage.ConnectionString.StorageConnectionString.Parse, which the issue identifies as the path that decodes every property value. Check how the Azure account key and password values are handled, then reproduce the failure with a key containing +. Done means shared key credentials work without corrupting the Base64 key, with connection string parsing behavior covered by a regression test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Azure Blob bug

the creation of a Azure file or blob storage instance failes if doing so via StorageFactory.Blobs.FromConnectionString

Reason:
The factory uses FluentStorage.ConnectionString.StorageConnectionString internally to parse the connection string. For each property value the method UrlDecode is called by the Parse method. This makes a lot of sense to be able to pass special characters in passwords.

The Azure account key is Base64 encoded, though. If it contains + characters, those get replaced by spaces, other characters might also get replaced falsely. Therefore the Azure account key must not be tampered with.

One workaround would be to store the account key urlencoded in the connection string in the application configuration - not very user friendly, its base64 already...

The StorageConnectionString on the other hand side has no knowledge if the secret key is urlencoded or base64 encoded... not sure how to solve this.

Maybe it would make sense to mention the url-encoding for passwords in the documentation.

Lingua principale
C#
Stelle
464
Fork
78
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di robinrodricks/FluentStorage

Tutte le issue di robinrodricks/FluentStorage

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.