summaryrefslogtreecommitdiffstats
path: root/src/modules/aws.rs
AgeCommit message (Collapse)Author
2024-03-20chore: fix upcoming rust 1.77 clippy issues and chrono deprecations (#5850)David Knaack
2024-01-06test(aws): fix flaky tests `expiration_date_set` ↵Xiaohan Ni
`expiration_date_set_from_file` (#5685) * fix(aws): fix flaky test `expiration_date_set` * fix(aws): fix flaky test `expiration_date_set_from_file`
2023-12-17feat(aws): Adding the AWS SSO CLI env variable to profile list (#5640)Stefan Richter
Adding the AWS SSO CLI env variable to profile list Adding support for the profile env variable used by https://github.com/synfinatic/aws-sso-cli
2023-11-11refactor(modules): use whoami crate to get usernamebestgopher
Signed-off-by: bestgopher <84328409@qq.com>
2023-05-09feat(aws): support aws sso with automatic authentication refresh (#5170)kensasongko
* feat(aws): support aws sso with automatic authentication refresh * docs(aws): add sso_session for profile detection
2023-04-02feat(aws): add support for source_profile (#4859)Cosimo Matteini
feat(aws): add support for source_profile (#3834) Co-authored-by: @luiscamaral
2023-03-20feat(aws): Adds support for AWS_CREDENTIAL_EXPIRATION environment variable ↵Harry Hodge
(#5002) feat(aws): supports AWS_CREDENTIAL_EXPIRATION environment variable Adds support for the AWS_CREDENTIAL_EXPIRATION environment variable which was adopted as the standard way to set the expiration for temporary credentials. The existing AWS_SESSION_EXPIRATION environment variable is not dropped for backwards compatibility. See https://github.com/aws/aws-cli/pull/7398
2023-01-11chore(aws): fix unintended test failure of `aws::missing_any_credentials` ↵かわえもん
(#4805) chore(aws): fix unintended test failure of `aws::missing_any_credentials` Because its mocking is not enough, The test may unintentionally fail if `~/.aws/credentials` exists. This commit fixes this issue by mocking `credentials` file as well.
2022-12-17chore: fix clippy warnings for rust 1.66 (#4715)David Knaack
chore: fix new clippy lints
2022-11-27fix(aws): enable when using .aws/credentials (#4604)Chris Rose
2022-11-13build(deps): update rust crate chrono to 0.4.23 (#4599)David Knaack
* build(deps): update rust crate chrono to 0.4.23 * chore: remove chrono deprecations Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-05chore: fix new clippy lints (#4557)David Knaack
2022-10-15feat(aws): add a fallback for `expiration` key (#4455)Liang Yun Gong
* feat(aws): add a fallback for `expiration` * fix(aws): intermittent test failures - extend the time range from `-2s,0s` to `-5s,+2s` * fix: `docs/config/README.md` readability Co-authored-by: David Knaack <davidkna@users.noreply.github.com> Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2022-09-04refactor: replace `ansi_term` with `nu_ansi_term` (#4339)David Knaack
2022-08-11fix(aws): support official `AWS_SHARED_CREDENTIALS_FILE` variable (#4242)David Knaack
* fix(aws): use AWS_SHARED_CREDENTIALS_FILE instead Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com> * fix tests & keep support for older variant Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com> Co-authored-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>
2022-05-23chore(clippy): fix new lints (#4002)David Knaack
2022-04-21chore(aws): adds space to the duration variable (#3872)Fábio Antunes
2022-04-08refactor(aws): improve parsing of config files (#3842)David Knaack
2022-03-26refactor: replace module_config_derive with serde (#3786)David Knaack
* refactor: replace module_config_derive with serde Changes include: * Removing `starship_module_config_derive` and replacing it with `serde::Deserialize` * Removing `RootModuleConfig::load_config`. While potentially useful, it was only used in tests. And it would require something like `serde::DeserializeSeed` which is not derived by serde. * Merging `RootModuleConfig` into `ModuleConfig` * Implementing a `ValueDeserializer` that holds a reference to a `toml::Value` in `serde_utils.rs` * Deserialization errors (invalid type) are now logged and include the current key and the struct names * Unknown keys are now considered an error. "Did you mean?"-messages are still possible * fix typo Co-authored-by: Matan Kushner <hello@matchai.dev> Co-authored-by: Matan Kushner <hello@matchai.dev>
2022-03-25feat(aws): add option to force AWS display (#3720)Alex Douze
* add option to force AWS display Even if no credentials or credential_process have been setup * change README wording * Include sso_start_url in the description * Change option name to force_display
2022-03-16fix(aws): accept sso credentials (#3718)David Knaack
2022-03-14fix(aws): Make AWS_REGION orverrides AWS_DEFAULT_REGION (#3619) (#3733)kuno
* fix(aws): Make AWS_REGION orverrides AWS_DEFAULT_REGION (#3619) * fix(aws): Align the coding style of region and profile env var (#3619)
2022-03-12feat(aws): Add profile aliases (#3699)Anders Eurenius Runvald
* Rename m.aws.alias_region to alias_name * Add aws profile aliases * Document aws.profile_aliases, with examples * Add tests for new aws.profile_aliases feature * Tidy alias_handling a bit
2022-02-16fix(aws): Only display AWS if there are credentials configured (#3504)Allan Lago
* only display aws on credential_process defined * add check for both credential_process and valid credentials * fix tests * update aws module documentation * add better explanation of requirements to documentation * add support for AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, and update docs * remove credential_process env var
2022-01-22ci: Fix aws::expiration_date_set_from_file race (#3484)Kevin Song
* ci: Fix aws::expiration_date_set_from_file race While aws::expiration_date_set_from_file will almost-always work perfectly locally, it is theoretically possible for the thread running the test to be scheduled away betwen writing the file with timing information and then actually reading it, resulting in a shorter-than-expected time appearing in the module. This can also happen if the test triggers right at the very end of a second (e.g. at 10:45:47.999995). This appears to actually happen sometimes on heavily-loaded GitHub Actions runners. To fix this issue, we allow for up to a two-second delay between when the file is written and when the test actually fires (allowing "30m", "29m59s", and "29m58s" as possible values). * Fix typo
2021-12-20fix(aws): prevent endless loop when AWS config file is a directory (#3335)Denis Cornehl
When opening a directory as a file the intial open works, while subsequent line-reads will fail with _is a directory_. Since erroring line-reads were just skipped this lead to an endless loop.
2021-11-01fix(escaping): move escaping to individual variables (#3107)Fred Cox
2021-07-29fix(clippy): fix new clippy lints (#2939)David Knaack
2021-05-12feat(aws): add temporary credentials countdown (#2464)Carl-Louis Van Brandt
2021-04-20feat(aws): Add support for profile from awsume (#2609)Andrew McClenaghan
2021-03-13feat(aws): add support for getting profile from awsu (#2451)nils måsén
2021-03-06style(aws): Add spacing between profile and region (#2417)Eric Nielsen
and also after the symbol when using the Nerd font glyph.
2021-02-11refactor(clippy): fix new lints (#2297)David Knaack
2021-01-19test: avoid setting $HOME (#2155)David Knaack
* test: avoid setting $HOME * add comment to get_home * move everything to context.get_home
2020-10-14test(aws): Ignore tests that check .aws files (#1775)Thomas O'Donnell
When running the AWS module it will parse the AWS config found in `~/.aws/config` to get the region. This means that tests that expect no region to be set will fail if there exists a default profile with a region set, which is probably true for most AWS users. To avoid this have set the AWS tests that depend on the non-existance of a `.aws/config` to be ignored.
2020-09-28feat: add error messaging (#1576)Tilmann Meyer
This creates a custom logger for the log crate which logs everything to a file (/tmp/starship/session_$STARSHIP_SESSION_KEY.log) and it logs everything above Warn to stderr, but only if the log file does not contain the line that should be logged resulting in an error or warning to be only logged at the first starship invocation after opening the shell.
2020-08-07test: introduce env variable mocking (#1490)Tilmann Meyer
2020-07-07feat: refactor modules to use format strings (#1374)Zhenhui Xie
2020-06-20Replace `dirs` with `dirs-next` dependency (#1361)Julian Gehring
`dirs` will be unmaintained for the foreseeable future, so switch to the maintained fork `dirs-next`. Closes #1319.
2020-04-06feat(aws): Use AWS_VAULT as the profile if set (#984)Kevin Pullin
* Use AWS_VAULT as the profile if set [aws-vault](https://github.com/99designs/aws-vault) sets the `AWS_VAULT` env var instead of `AWS_PROFILE` when an aws-vault session is active. This PR adds support for reading the AWS profile value from the `AWS_VAULT` env var, giving priority to `AWS_VAULT` if both it and `AWS_PROFILE` are set. * Update docs for AWS_VAULT
2019-12-20perf: Dereference before to_string in aws moduleMatan Kushner
2019-12-20feat: Implement AWS region aliases (#646)Mike Sampson
2019-11-02feat: Add configuration to set how much AWS profile info is shown (#556)Cédric Da Fonseca
2019-10-15feat: Show AWS region in `aws` module (#482)Thomas Lee
2019-10-05chore: Import shared types from super (#492)Zhenhui Xie
Changes imports statements to make imports more uniform.
2019-10-04refactor: Go from Rust workspaces to a package with nested packages (#480)Matan Kushner
2019-09-30refactor: Refactoring config (#383)Zhenhui Xie
This PR refactors config and puts configuration files for all modules in `configs/`.
2019-09-25feat: Add AWS module (#419)Thomas O'Donnell
Adds a module for displaying the current AWS profile based on the AWS_PROFILE envar.