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

DSR when approved through ui error #1901

Closed
Roger-Ethyca opened this issue Nov 29, 2022 · 1 comment · Fixed by #1907
Closed

DSR when approved through ui error #1901

Roger-Ethyca opened this issue Nov 29, 2022 · 1 comment · Fixed by #1907
Assignees
Labels
bug Something isn't working

Comments

@Roger-Ethyca
Copy link
Contributor

Roger-Ethyca commented Nov 29, 2022

Bug Description

A description of what the bug is.

Steps to Reproduce

  1. Log in to the admin ui and setup a connector (i used shopify)
  2. Submit a DSR request through the PC using email only (do not add anything else)
  3. Log into the admin UI and approve the DSR
  4. The request will return ERROR right away

Expected behavior

The request should be processed through the connector however it looks like when the DSR is submitted on the backend the phone number is empty

Screen Shot 2022-11-29 at 3 20 59 PM
Screen Shot 2022-11-29 at 3 18 35 PM
Screen Shot 2022-11-29 at 3 01 52 PM

If applicable, add screenshots to help explain your problem.

Environment

  • Version:
  • OS:
  • Python Version:
  • Docker Version:

Additional context

The persist_identity function in privacy_request.py does not correctly filter out the empty string phone number "" so the SaaS connector validation fails because it sees two identities defined instead of one.

def persist_identity(self, db: Session, identity: Identity) -> None:
        """
        Stores the identity provided with the privacy request in a secure way, compatible with
        blind indexing for later searching and audit purposes.
        """
        identity_dict: Dict[str, Any] = dict(identity)
        for key, value in identity_dict.items():
            if value is not None:
               ...

In saas_query_config.py

def _get_identity(self) -> Optional[str]:
    """
    Returns a single identity or raises an exception if more than one identity is defined
    """

    identities: List[str] = []
    if self.privacy_request:
        identities = list(self.privacy_request.get_cached_identity_data().keys())
        if len(identities) > 1:
            raise FidesopsException(
                "Only one identity can be specified for SaaS connector traversal"
            )
            ...
@Roger-Ethyca
Copy link
Contributor Author

Verified
Screen Shot 2022-11-30 at 3 10 06 PM
Screen Shot 2022-11-30 at 3 10 31 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants