<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>접근 제어 on 얼쑤 · Team Edo</title><link>https://team-edo.github.io/tags/%EC%A0%91%EA%B7%BC-%EC%A0%9C%EC%96%B4/</link><description>Recent content in 접근 제어 on 얼쑤 · Team Edo</description><generator>Hugo</generator><language>ko-kr</language><lastBuildDate>Wed, 28 Oct 2026 00:00:00 +0900</lastBuildDate><atom:link href="https://team-edo.github.io/tags/%EC%A0%91%EA%B7%BC-%EC%A0%9C%EC%96%B4/index.xml" rel="self" type="application/rss+xml"/><item><title>MySQL 모니터링 계정에 회원 테이블 9개 열만 허용</title><link>https://team-edo.github.io/posts/2026/10/mysql-monitoring-column-privileges/</link><pubDate>Wed, 28 Oct 2026 00:00:00 +0900</pubDate><guid>https://team-edo.github.io/posts/2026/10/mysql-monitoring-column-privileges/</guid><description>&lt;p>모니터링 화면에는 회원 수와 최근 가입 시점이 필요했습니다. 그 화면을 만드는 SQL에는 이메일이나 인증 토큰이 필요 없었지만, 모니터링 계정의 데이터베이스 전체 조회 권한으로는 그런 값도 읽을 수 있었습니다. 화면 쿼리에서 열을 빼는 것과 계정이 그 열을 읽을 수 없는 것은 다른 문제였습니다.&lt;/p>
&lt;h2 id="넓은-권한을-회수하고-필요한-열을-적었다">전체 조회 권한을 열 단위로 축소&lt;/h2>
&lt;p>MySQL은 계정에 부여된 조회 권한을 합칩니다. 데이터베이스 전체에 &lt;code>SELECT&lt;/code>가 남아 있는 상태에서 특정 열만 다시 &lt;code>GRANT&lt;/code>하면, 이전 권한으로 여전히 모든 열을 읽을 수 있습니다. 먼저 넓은 권한을 회수한 뒤, 모니터링에 필요한 테이블과 열을 다시 부여했습니다. 회원 테이블에서는 &lt;strong>9개 열&lt;/strong>만 열었습니다. &lt;a href="https://dev.mysql.com/doc/refman/8.4/en/grant.html">MySQL의 열 단위 GRANT 문서&lt;/a>&lt;/p></description></item></channel></rss>