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

implement custom templated launch for sso browser option #750

Merged
merged 3 commits into from
Sep 24, 2024

Conversation

meyerjrr
Copy link
Contributor

What changed?

Custom browser launch templates were added in #731. This PR extends on the work done there to include this functionality in adding custom launch templates for the sso browser launch process.

The current logic added will prioritise a custom SSOBrowserLaunchTemplate being set, then CustomSSOBrowserPath and finally with os default open()

Why?

Fixes/provides a builtin workaround for #602

How did you test it?

  • Set up custom template for new SSOBrowserLaunchTemplate
[SSOBrowserLaunchTemplate]
  Command = "open -a Safari {{ .URL }}"

Confirmed safari opened correctly when authenticating with SSO.

Potential risks

Is patch release candidate?

Link to relevant docs PRs

@meyerjrr
Copy link
Contributor Author

meyerjrr commented Sep 18, 2024

I have updated this PR to work more extensively. Specifically I was attempting to use it to solve this issue: #713

I found the adding the following custom browser launch template would not work due to the spaces in "Google Chrome" and the toml reading did not respect the escaping I tried.

[SSOBrowserLaunchTemplate]
  Command = "open -a Google\ Chrome --args --profile-directory=default {{ .URL }}"

I have added a workaround to get this working:

[SSOBrowserLaunchTemplate]
  Command = "\"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome\" {{ .URL }} --args \"--profile-directory=Profile 2\" "

Where Granted will now handle anything within quotes as a single argument in the command.

Will need to be added to docs but to find the name of your default profile. Open chrome in your profile of choice and go to chrome://version/ and you should see the profile path:

Profile Path: /Users/<name>/Library/Application Support/Google/Chrome/Profile 2

So "Profile 2" is the profile to set in the above command for --profile-directory

@meyerjrr meyerjrr merged commit 058ea6c into main Sep 24, 2024
3 checks passed
@meyerjrr meyerjrr deleted the add-templated-browser-launch-for-sso-browser branch September 24, 2024 06:44
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Oct 11, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [common-fate/granted](https://github.com/common-fate/granted) | minor | `v0.33.0` -> `v0.35.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>common-fate/granted (common-fate/granted)</summary>

### [`v0.35.1`](https://github.com/common-fate/granted/releases/tag/v0.35.1)

[Compare Source](common-fate/granted@v0.35.0...v0.35.1)

This release includes bug fixes for the RDS plugin.

#### What's Changed

-   Remove Grant is activated message, use new Grant Output API by [@&#8203;JoshuaWilkes](https://github.com/JoshuaWilkes) in common-fate/granted#769
-   Improve how RDS proxy command handles grant expiry and proxy connection errors by [@&#8203;JoshuaWilkes](https://github.com/JoshuaWilkes) in common-fate/granted#770

**Full Changelog**: common-fate/granted@v0.35.0...v0.35.1

### [`v0.35.0`](https://github.com/common-fate/granted/releases/tag/v0.35.0)

[Compare Source](common-fate/granted@v0.34.1...v0.35.0)

#### AWS IAM Identity Center phishing protection

![Frame 13](https://github.com/user-attachments/assets/4e315c6c-694f-45bf-84bc-7f56f1df47d2)

This release adds support for the new [Granted browser extension for Chrome](https://chromewebstore.google.com/detail/granted/cjjieeldgoohbkifkogalkmfpddeafcm), which confirms the user code automatically when logging in to AWS IAM Identity Center. This makes authenticating faster and protects against being phished for your AWS credentials. [Read more in our announcement blog post here.](https://www.commonfate.io/blog/granted-mitigates-aws-phishing).

[Follow our install guide here to get set up with Granted.](https://docs.commonfate.io/granted/getting-started)

#### What's Changed

-   add fixes to setting custom browser by [@&#8203;meyerjrr](https://github.com/meyerjrr) in common-fate/granted#760
-   Fix the version output when running `assume -v` by [@&#8203;chrnorm](https://github.com/chrnorm) in common-fate/granted#762
-   Added support for manual setting of PassDir to avoid pass password pollution in default location by [@&#8203;VigneshSelvaraj96](https://github.com/VigneshSelvaraj96) in common-fate/granted#761
-   Add apigw -> apigateway service shortcut by [@&#8203;alexjurkiewicz](https://github.com/alexjurkiewicz) in common-fate/granted#763
-   Add AWS IAM Identity Center device code flow automation by [@&#8203;chrnorm](https://github.com/chrnorm) in common-fate/granted#765

#### New Contributors

-   [@&#8203;VigneshSelvaraj96](https://github.com/VigneshSelvaraj96) made their first contribution in common-fate/granted#761

**Full Changelog**: common-fate/granted@v0.34.2...v0.35.0

### [`v0.34.1`](https://github.com/common-fate/granted/releases/tag/v0.34.1)

[Compare Source](common-fate/granted@v0.34.0...v0.34.1)

This release fixes a folder permissions issue introduced in v0.34.0, and fixes an issue with using `assume -s ram` to open Resource Access Manager. A big thankyou to contributors [@&#8203;jpbelleau](https://github.com/jpbelleau) and [@&#8203;wayne-folkes](https://github.com/wayne-folkes).

#### What's Changed

-   Add RAM (Resource Access Manager) by [@&#8203;wayne-folkes](https://github.com/wayne-folkes) in common-fate/granted#757
-   Revert "update file permissions to read/write ([#&#8203;751](common-fate/granted#751))" by [@&#8203;chrnorm](https://github.com/chrnorm) and [@&#8203;jpbelleau](https://github.com/jpbelleau) in common-fate/granted#755

**Full Changelog**: common-fate/granted@v0.34.0...v0.34.1

### [`v0.34.0`](https://github.com/common-fate/granted/releases/tag/v0.34.0)

[Compare Source](common-fate/granted@v0.33.0...v0.34.0)

#### What's Changed

-   Sort sso profiles by profile name by [@&#8203;shwethaumashanker](https://github.com/shwethaumashanker) in common-fate/granted#733
-   Fix using default duration on auto approved requests by [@&#8203;meyerjrr](https://github.com/meyerjrr) in common-fate/granted#748
-   Update file permissions to read/write by [@&#8203;meyerjrr](https://github.com/meyerjrr) in common-fate/granted#751
-   Implement custom templated launch for sso browser option by [@&#8203;meyerjrr](https://github.com/meyerjrr) in common-fate/granted#750

**Full Changelog**: common-fate/granted@v0.33.0...v0.34.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants