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

[QP-6630] WHERE 조건문 내에서 사용한 column에 대한 순회 구현 #81

Closed
wants to merge 4 commits into from

Conversation

challenger71498
Copy link
Contributor

개요

WHERE 절 내에서 사용한 column에 대한 접근 제한을 구현하기 위해, 사용한 column에 대한 순회를 구현합니다.

예시

상황

  • actor 테이블의 first_name에 대해 마스킹 정책을 걸었습니다.
  • 다음 쿼리를 수행합니다.
SELECT * FROM actor where last_name = "GUINESS" && first_name = ‘�Mason’

AS-IS

  • WHERE 절의 조건을 만족하는 row들의 결과가 내려옵니다.
  • 즉, 사용자는 row 결과가 마스킹되어 있더라도 해당 row들의 first_name'Mason'임을 알 수 있습니다.

TO-BE

  • WHERE 절 내에 Data Access 또는 Data Masking이 걸려 있을 경우, 접근 정책 위반 예외를 내립니다.

상세

  • Where 절 내에서 사용하는 column은 실제 조회하는 테이블을 구성하지 않을 수도 있기 때문에, IndirectColumn으로 명명했습니다.
  • Where 절 노드 내에서 column을 추출하는 IndirectColumnResolver를 추가했습니다.
    • 참고로 ColumnResolver는 기존 로직과 동일합니다.
  • IndirectColumn을 디버거에서 볼 수 있는 기능을 추가했습니다.

한계

  • 현재 조사하는 내용은 where 절 내의 column에 국한되어 있습니다.
    • 즉, table 단위로 정책을 적용할 경우 접근 제한이 동작하지 않습니다.
  • 이후 table 정보와 column 정보 모두 내려주는 방법으로 구현할 예정입니다.

Copy link

@orca-security-us orca-security-us bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@challenger71498
Copy link
Contributor Author

challenger71498 commented May 21, 2024

해당 PR은 #82 로 이동하였습니다.

@Web-Engine
Copy link
Contributor

@challenger71498 더 이상 사용하지 않는 브랜치면 Delete branch도 눌러주세요.

@challenger71498 challenger71498 deleted the feature/QP-6630 branch May 21, 2024 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants