script-lab-2017 icon indicating copy to clipboard operation
script-lab-2017 copied to clipboard

Helper and infrastructure to enable a snippet to do authentication with Azure AD

Open jakobpn opened this issue 8 years ago • 2 comments

image

image

  • https://dev.office.com/docs/add-ins/develop/auth-external-add-ins

jakobpn avatar May 23 '17 23:05 jakobpn

See also https://github.com/OfficeDev/script-lab/issues/85

Zlatkovsky avatar May 23 '17 23:05 Zlatkovsky

The feature is now partially in-place, but very much alpha level. In particular:

  1. It lacks a security review.
  2. It does not cache tokens (i.e., it pops a dialog every time), nor auto-renew them.
  3. It makes no use of existing auth libraries.

In order to integrate OfficeJsHelpers -- which would fix all three of the above issues -- we would need to make sure that it has (or be expanded to include) :

  1. Only store tokens in-memory, not in local storage
  2. Allow to substitute strings instead of assuming English.

There would also be some (several hours? a day?) work to actually integrate OfficeJsHelpers.

Also, should consider if can make it a non-Script-Lab-only feature (i.e., use OfficeJsHelpers just as normal, without having a special ScriptLab.getAccessToken). Or at least have a very clearly documented bit of code that maps the proprietary ScriptLab.getAccessToken to the underlying OfficeJsHelpers documentation.

Note: Counter-point to the above -- we also want to enable just-in-time registration via AAD... so there may need to be ScriptLab-specific functionality there after all. Though perhaps we could build it in as more of a clientID fetching (e.g., authenticator.endpoints.registerAzureADAuth(await ScriptLab.getAzureADClientId()).

Zlatkovsky avatar Sep 08 '17 18:09 Zlatkovsky