xhiroga / aws-peacock-management-console

Browser Extension to show account alias and change color of AWS Management Console, even if AWS SSO.
MIT License
86 stars 11 forks source link

Apply background color earlier by retrieving AWS session data from meta #89

Open KojiAndoJC opened 2 months ago

KojiAndoJC commented 2 months ago

Description

There is a meta tag named awsc-session-data which contains accountId and infrastructureRegion. I would appreciate if the extension could use this data to apply background colors earlier.

Motivation

Even after setting colors with this extension, the default color of the AWS Management Console is displayed for a few seconds. This is confusing for users.

Additionally, I attempted to implement this feature, but encountered some difficulties:

You can see my implementation attempt here: https://github.com/KojiAndoJC/aws-peacock-management-console/commit/be123329be2c166832f162d9bc4bff83f0463a2d

Sign in Method

Acknowledge

xhiroga commented 2 months ago

Thank you for your excellent suggestion about using the awsc-session-data meta tag, @KojiAndoJC san!

I've verified its presence in the AWS console, and it seems to contain the right information even for Assume Role and root user scenarios. This approach looks nice for improving color application speed and make code easy to understand.

I'm considering incorporating this method in an upcoming release, but contributions are also very welcome if you'd like to implement it yourself. Your feedback is truly appreciated😀

KojiAndoJC commented 2 months ago

Thank you for considering my suggestion, @xhiroga! I'm looking forward to your implementation and happy to provide any additional input if needed.