domainaware / parsedmarc

A Python package and CLI for parsing aggregate and forensic DMARC reports
https://domainaware.github.io/parsedmarc/
Apache License 2.0
981 stars 212 forks source link

MSGraph: add option to allow unencrypted fallback for token cache #375

Closed aroldxd closed 1 year ago

aroldxd commented 1 year ago

Add option in configuration file to set the allow_unencrypted_storage flag, referring to the azure identity token cache

What happens if this new option is omitted?

If this flag is not specified in the configuration file, the default will remain unchanged (meaning unencrypted storage is disallowed).

What will this do if manually set to True?

The cache will still try to encrypt the token data, but in case this fails, it will fall back to unencrypted storage. For detailed information, see: https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity.tokencachepersistenceoptions

Why is this needed?

Some environments do not supply the required modules (libsecret, etc) to store with encryption.