Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for additional condition keys #1

Open
noamsdahan opened this issue Mar 3, 2022 · 0 comments
Open

Add support for additional condition keys #1

noamsdahan opened this issue Mar 3, 2022 · 0 comments
Labels
good first issue Good for newcomers

Comments

@noamsdahan
Copy link
Contributor

Adding support for additional condition keys, such as AWS global context keys or service-specific condition keys (KMS, IAM).

To add support for a condition key (that isn't multi-part, i.e. doesn't have / in it):

  • Add a function to simulate_custom_policy_generator.py
    def _get_aws_username(self) -> Optional[ContextEntryTypeDef]
    The function should return ContextEntryTypeDef or None if not applicable.
    If more information is needed from the event, add parsing that information to event.py.
  • Add a reference to that function to KEY_FUNCTION_DICT
    "aws:username": _get_aws_username,
@noamsdahan noamsdahan added the good first issue Good for newcomers label Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant