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

Change profile endpoint on Carbon Masthead for signed in state #4701

Closed
ljcarot opened this issue Dec 10, 2020 · 5 comments
Closed

Change profile endpoint on Carbon Masthead for signed in state #4701

ljcarot opened this issue Dec 10, 2020 · 5 comments
Assignees
Labels
Feature request A new adopter requested feature package: services Work necessary for the Carbon for IBM.com services package sprint demo Sprint Must Have
Milestone

Comments

@ljcarot
Copy link
Member

ljcarot commented Dec 10, 2020

This work must be done by the end of Jan 2021

IDaaS is being replaced with new ISV. This change will impact the endpoint that is currently part of the Profile Icon on the masthead which displays if a user is signed out or signed in.

Describe the solution you'd like
Rick McCarty has provided the solution here:
With respect to the status API calls made by the masthead, these will need some changes for ISV.

Currently, if the current page is under www.ibm.com, the masthead makes a request to the following endpoint:

https://idaas.iam.ibm.com/v1/mgmt/idaas/user/status/

If the page is under another domain, for example myibm.ibm.com, etc, the call is a bit different - it adds a callback parameter for JSONP to avoid CORS issues:

https://idaas.iam.ibm.com/v1/mgmt/idaas/user/status/?callback=__jp1

With the change to ISV, the new endpoint will be:

https://login.ibm.com/v1/mgmt/idaas/user/status/

Also, ISV will no longer support the "callback=" parameter, meaning that JSONP can no longer be used to get around CORS issues. Instead, we will have to include a more comprehensive list of domains in our ISV configuration to handle CORS.

Original request is here: https://jsw.ibm.com/browse/IRFC-8

@RobertaJHahn
Copy link

@ljcarot Can you let us know when this ISV change is being made and when our change is required? Thanks.

@ljcarot
Copy link
Member Author

ljcarot commented Dec 15, 2020

This change is needed now. The Carbon change should be in January release and v18 can be any time before end of January. It needs to be done in advance of ISV cut over tentatively set for late January.

@jeffchew
Copy link
Member

@RobertaJHahn can you add to the next engineering refinement meeting to size? I also will need to get back to Rick McCarty on a whitelist for lower environment testing.

@RobertaJHahn
Copy link

@jeffchew Done

@RobertaJHahn RobertaJHahn added the package: services Work necessary for the Carbon for IBM.com services package label Jan 4, 2021
@RobertaJHahn RobertaJHahn added this to the Sprint 21-01 milestone Jan 4, 2021
@RobertaJHahn RobertaJHahn changed the title Change profile endpoint on V18 and Carbon Masthead for signed in state Change profile endpoint on Carbon Masthead for signed in state Jan 4, 2021
@annawen1 annawen1 self-assigned this Jan 6, 2021
@annawen1
Copy link
Member

annawen1 commented Jan 6, 2021

@jeffchew has provided Rick with a list of domains we need whitelisted. Waiting for those domains to be whitelisted so we can test the new endpoint locally.

kodiakhq bot pushed a commit that referenced this issue Jan 15, 2021
### Related Ticket(s)

Change profile endpoint on Carbon Masthead for signed in state #4701

### Description

Change profile endpoint which no longer allows for jsonp to get around CORS errors. Set the new preprod profile endpoint as default. 

### Changelog

**Changed**

- use `axios` for the profile calls
- set default host endpoint to preprod url

**Removed**

- `jsonp` package - no longer needed

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "package: styles": Carbon Expressive -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
jeffchew pushed a commit that referenced this issue Jan 19, 2021
…nvs (#4923)

### Related Ticket(s)

Change profile endpoint on Carbon Masthead for signed in state #4701

### Description

Add the profile host env var to various testing envs
previously added the variable to only react testing envs

deploy-canary:
- react-experimental
- react-rtl
- web-components
- web-components-rtl
- web-components-experimental
- web-components-react
- services

deploy-staging:
- web-components
kodiakhq bot pushed a commit that referenced this issue Jan 20, 2021
…g and unit tests (#4926)

### Related Ticket(s)

Change profile endpoint on Carbon Masthead for signed in state #4701

### Description

Update naming and unit tests from feedback: #4909

### Changelog

**Changed**

- update `getUserStatus` action to `loadUserStatus` in accordance to naming strategy
- create `Unauthenticated` const in ProfileAPI type
- use `request` instead of `status` for the `setRequestUserStatusInProgress` and `setUserStatus` actions

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "package: styles": Carbon Expressive -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
IgnacioBecerra pushed a commit to IgnacioBecerra/ibm-dotcom-library that referenced this issue Feb 22, 2021
### Related Ticket(s)

Change profile endpoint on Carbon Masthead for signed in state carbon-design-system#4701

### Description

Change profile endpoint which no longer allows for jsonp to get around CORS errors. Set the new preprod profile endpoint as default. 

### Changelog

**Changed**

- use `axios` for the profile calls
- set default host endpoint to preprod url

**Removed**

- `jsonp` package - no longer needed

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "package: styles": Carbon Expressive -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
IgnacioBecerra pushed a commit to IgnacioBecerra/ibm-dotcom-library that referenced this issue Feb 22, 2021
…nvs (carbon-design-system#4923)

### Related Ticket(s)

Change profile endpoint on Carbon Masthead for signed in state carbon-design-system#4701

### Description

Add the profile host env var to various testing envs
previously added the variable to only react testing envs

deploy-canary:
- react-experimental
- react-rtl
- web-components
- web-components-rtl
- web-components-experimental
- web-components-react
- services

deploy-staging:
- web-components
IgnacioBecerra pushed a commit to IgnacioBecerra/ibm-dotcom-library that referenced this issue Feb 22, 2021
…g and unit tests (carbon-design-system#4926)

### Related Ticket(s)

Change profile endpoint on Carbon Masthead for signed in state carbon-design-system#4701

### Description

Update naming and unit tests from feedback: carbon-design-system#4909

### Changelog

**Changed**

- update `getUserStatus` action to `loadUserStatus` in accordance to naming strategy
- create `Unauthenticated` const in ProfileAPI type
- use `request` instead of `status` for the `setRequestUserStatusInProgress` and `setUserStatus` actions

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "package: styles": Carbon Expressive -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request A new adopter requested feature package: services Work necessary for the Carbon for IBM.com services package sprint demo Sprint Must Have
Projects
None yet
Development

No branches or pull requests

4 participants