{"id":3090,"date":"2025-12-03T17:12:17","date_gmt":"2025-12-03T08:12:17","guid":{"rendered":"https:\/\/www.agile-software.site\/?p=3090"},"modified":"2025-12-19T14:24:46","modified_gmt":"2025-12-19T05:24:46","slug":"snowflake%e3%81%aerba","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=3090","title":{"rendered":"Snowflake\u306eRBAC"},"content":{"rendered":"\n<p>Snowflake\u306f\u3001\u3053\u306e\u30ed\u30fc\u30eb\u30d9\u30fc\u30b9\u306e\u30a2\u30af\u30bb\u30b9\u5236\u5fa1\uff08Role-Based Access Control: RBAC\uff09\u30b7\u30b9\u30c6\u30e0\u3092\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3068\u30ac\u30d0\u30ca\u30f3\u30b9\u306e<strong>\u4e2d\u5fc3\u7684\u306a\u67f1<\/strong>\u3068\u3057\u3066\u8a2d\u8a08\u3057\u3066\u304a\u308a\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30a6\u30a7\u30a2\u30cf\u30a6\u30b9\u74b0\u5883\u3067\u8907\u96d1\u306a\u6a29\u9650\u7ba1\u7406\u3092\u52b9\u7387\u7684\u306b\u884c\u3046\u305f\u3081\u306e\u72ec\u81ea\u306e\u5f37\u529b\u306a\u4ed5\u7d44\u307f\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">&#x1f512; Snowflake\u306b\u304a\u3051\u308b\u30ed\u30fc\u30eb\u30d9\u30fc\u30b9\u306e\u30a2\u30af\u30bb\u30b9\u5236\u5fa1\uff08RBAC\uff09<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. RBAC\u306e\u57fa\u672c\u6982\u5ff5\u3068Snowflake\u306b\u304a\u3051\u308b\u5f79\u5272<\/h3>\n\n\n\n<p>Snowflake\u306eRBAC\u30e2\u30c7\u30eb\u306f\u3001\u6a29\u9650\u7ba1\u7406\u3092\u30b7\u30f3\u30d7\u30eb\u304b\u3064\u30bb\u30ad\u30e5\u30a2\u306b\u3059\u308b\u305f\u3081\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30a2\u30af\u30bb\u30b9\u5236\u5fa1\u306e\u57fa\u672c\u7684\u306a\u8981\u7d20\u306f\u4ee5\u4e0b\u306e3\u3064\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>\u8981\u7d20<\/strong><\/td><td><strong>\u5b9a\u7fa9<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>\u30e6\u30fc\u30b6\u30fc (User)<\/strong><\/td><td>Snowflake\u3092\u5229\u7528\u3059\u308b\u500b\u4eba\u307e\u305f\u306f\u30d7\u30ed\u30bb\u30b9\u3002<\/td><\/tr><tr><td><strong>\u30ed\u30fc\u30eb (Role)<\/strong><\/td><td>\u6a29\u9650\u3092\u4ed8\u4e0e\u3055\u308c\u308b\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u3002\u30e6\u30fc\u30b6\u30fc\u306f\u4e00\u3064\u4ee5\u4e0a\u306e\u30ed\u30fc\u30eb\u3092\u4ed8\u4e0e\u3055\u308c\u307e\u3059\u3002<\/td><\/tr><tr><td><strong>\u6a29\u9650 (Privilege)<\/strong><\/td><td>\u30ed\u30fc\u30eb\u304c\u5b9f\u884c\u3067\u304d\u308b\u7279\u5b9a\u306e\u30a2\u30af\u30b7\u30e7\u30f3\uff08\u4f8b\uff1a<code>SELECT<\/code> on table\u3001<code>CREATE WAREHOUSE<\/code>\u306a\u3069\uff09\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Snowflake\u3067\u306f\u3001\u300c\u30e6\u30fc\u30b6\u30fc\u300d\u306b\u76f4\u63a5\u300c\u6a29\u9650\u300d\u3092\u4ed8\u4e0e\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u300c\u30ed\u30fc\u30eb\u300d\u306b\u6a29\u9650\u3092\u4ed8\u4e0e\u3057\u3001\u305d\u306e\u30ed\u30fc\u30eb\u3092\u30e6\u30fc\u30b6\u30fc\u306b\u5272\u308a\u5f53\u3066\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u7d44\u7e54\u5909\u66f4\u3084\u30e6\u30fc\u30b6\u30fc\u306e\u7570\u52d5\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u3067\u3082\u3001\u6a29\u9650\u7ba1\u7406\u3092<strong>\u30ed\u30fc\u30eb\u5358\u4f4d<\/strong>\u3067\u8fc5\u901f\u304b\u3064\u5bb9\u6613\u306b\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u30ed\u30fc\u30eb\u306e\u968e\u5c64\u69cb\u9020\uff08\u7d99\u627f\uff09\u304c\u9375<\/h3>\n\n\n\n<p>Snowflake\u306eRBAC\u306e\u6700\u5927\u306e\u7279\u5fb4\u306f\u3001<strong>\u30ed\u30fc\u30eb\u304c\u4ed6\u306e\u30ed\u30fc\u30eb\u306b\u6a29\u9650\u3092\u7d99\u627f\u3067\u304d\u308b<\/strong>\u70b9\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3042\u308b\u30ed\u30fc\u30eb\u3092\u5225\u306e\u30ed\u30fc\u30eb\u306b\u4ed8\u4e0e\u3059\u308b\u3068\u3001\u305d\u306e<strong>\u4e0a\u4f4d\u30ed\u30fc\u30eb<\/strong>\u306f<strong>\u4e0b\u4f4d\u30ed\u30fc\u30eb\u304c\u6301\u3064\u3059\u3079\u3066\u306e\u6a29\u9650\u3092\u81ea\u52d5\u7684\u306b\u7d99\u627f<\/strong>\u3057\u307e\u3059\u3002\u3053\u306e\u4ed5\u7d44\u307f\u306b\u3088\u308a\u3001\u6a29\u9650\u7ba1\u7406\u304c\u975e\u5e38\u306b\u52b9\u7387\u7684\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4e2d\u592e\u96c6\u6a29\u7684\u306a\u7ba1\u7406:<\/strong> \u6a29\u9650\u304c\u5fc5\u8981\u306a\u30e6\u30fc\u30b6\u30fc\u306b\u76f4\u63a5\u4ed8\u4e0e\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u5f79\u5272\u306b\u5fdc\u3058\u3066\u4f5c\u6210\u3055\u308c\u305f\u30ed\u30fc\u30eb\uff08\u4f8b\uff1a<code>HR_ANALYST<\/code>\uff09\u3092\u3001\u3088\u308a\u4e0a\u4f4d\u306e\u30ed\u30fc\u30eb\uff08\u4f8b\uff1a<code>SYSADMIN<\/code>\uff09\u306b\u7d44\u307f\u8fbc\u3080\u3053\u3068\u3067\u3001\u7d44\u7e54\u5168\u4f53\u306e\u6a29\u9650\u69cb\u9020\u3092\u30c4\u30ea\u30fc\u72b6\u306b\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u7ba1\u7406\u30b3\u30b9\u30c8\u524a\u6e1b:<\/strong> \u3042\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08\u4f8b\uff1a\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\uff09\u306b\u5bfe\u3059\u308b\u6a29\u9650\u3092\u4ed8\u4e0e\u3059\u308b\u5834\u5408\u3001\u4e0a\u4f4d\u30ed\u30fc\u30eb\uff08\u4f8b\uff1a<code>SYSADMIN<\/code>\uff09\u306b\u4e00\u5ea6\u4ed8\u4e0e\u3059\u308b\u3060\u3051\u3067\u3001\u305d\u306e\u4e0b\u4f4d\u306e\u3059\u3079\u3066\u306e\u30ed\u30fc\u30eb\u304c\u305d\u306e\u6a29\u9650\u3092\u7d99\u627f\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u30b7\u30b9\u30c6\u30e0\u5b9a\u7fa9\u30ed\u30fc\u30eb\uff08\u7d44\u307f\u8fbc\u307f\u30ed\u30fc\u30eb\uff09<\/h3>\n\n\n\n<p>Snowflake\u306b\u306f\u3001\u5927\u304d\u304f\u5206\u3051\u30662\u7a2e\u985e\u306e\u30ed\u30fc\u30eb\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30ed\u30fc\u30eb\uff08Database Role\uff09<\/strong>: \u7279\u5b9a\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u3067\u306e\u307f\u5b9a\u7fa9\u3055\u308c\u3001\u305d\u306eDB\u5185\u306e\u6a29\u9650\u7ba1\u7406\u306b\u7279\u5316\u3057\u305f\u30ed\u30fc\u30eb\u3002<\/li>\n\n\n\n<li><strong>\u30a2\u30ab\u30a6\u30f3\u30c8\u30ed\u30fc\u30eb\uff08Account Role\uff09<\/strong>: \u5f93\u6765\u304b\u3089\u3042\u308b\u6a19\u6e96\u7684\u306a\u30ed\u30fc\u30eb\u3002\u30a2\u30ab\u30a6\u30f3\u30c8\u5168\u4f53\u3067\u5171\u6709\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<p>Snowflake\u306b\u306f\u3001\u30a2\u30af\u30bb\u30b9\u5236\u5fa1\u306e\u521d\u671f\u8a2d\u5b9a\u3068\u3057\u3066\u5229\u7528\u3055\u308c\u308b\u3001\u3044\u304f\u3064\u304b\u306e\u7279\u5225\u306a\u300c\u30b7\u30b9\u30c6\u30e0\u5b9a\u7fa9\u30ed\u30fc\u30eb\u300d\u304c\u5b58\u5728\u3057\u307e\u3059\u3002\u7279\u306b\u91cd\u8981\u306a3\u3064\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>\u30ed\u30fc\u30eb\u540d<\/strong><\/td><td><strong>\u6a29\u9650\u306e\u6982\u8981<\/strong><\/td><td><strong>\u8077\u52d9\u306e\u5206\u96e2\uff08\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\uff09<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>ACCOUNTADMIN<\/strong><\/td><td>\u30a2\u30ab\u30a6\u30f3\u30c8\u5168\u4f53\u306b\u5bfe\u3059\u308b<strong>\u6700\u9ad8\u7ba1\u7406\u8005\u6a29\u9650<\/strong>\u3002\u3059\u3079\u3066\u306e\u64cd\u4f5c\u304c\u53ef\u80fd\u3002<\/td><td><strong>\u65e5\u5e38\u7684\u306a\u64cd\u4f5c\u306b\u306f\u4f7f\u7528\u305b\u305a<\/strong>\u3001\u7dca\u6025\u6642\u3084\u6700\u9ad8\u30ec\u30d9\u30eb\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u7ba1\u7406\u306b\u9650\u5b9a\u3059\u3079\u304d\u3002<\/td><\/tr><tr><td><strong>SECURITYADMIN<\/strong><\/td><td>\u30ed\u30fc\u30eb\u3068\u30e6\u30fc\u30b6\u30fc\u306e\u7ba1\u7406\u3001\u304a\u3088\u3073\u30a2\u30af\u30bb\u30b9\u5236\u5fa1\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u8a2d\u5b9a\u6a29\u9650\u3002<\/td><td><strong>\u30a2\u30ab\u30a6\u30f3\u30c8\u7ba1\u7406\u304b\u3089\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u6a5f\u80fd\u3092\u5206\u96e2<\/strong>\u3057\u3001\u5c02\u9580\u306e\u62c5\u5f53\u8005\u306b\u5272\u308a\u5f53\u3066\u308b\u3079\u304d\u3002<\/td><\/tr><tr><td><strong>SYSADMIN<\/strong><\/td><td>\u30a6\u30a7\u30a2\u30cf\u30a6\u30b9\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3001\u30b9\u30ad\u30fc\u30de\u3001\u30c6\u30fc\u30d6\u30eb\u306a\u3069\u306e<strong>\u65e5\u5e38\u7684\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u30fb\u7ba1\u7406<\/strong>\u3059\u308b\u6a29\u9650\u3002<\/td><td>\u5927\u534a\u306e\u958b\u767a\u30fb\u904b\u7528\u696d\u52d9\u306f\u3053\u306e\u30ed\u30fc\u30eb\u3001\u307e\u305f\u306f\u3053\u306e\u30ed\u30fc\u30eb\u306e\u4e0b\u4f4d\u306e\u30ab\u30b9\u30bf\u30e0\u30ed\u30fc\u30eb\u3067\u884c\u3046\u3079\u304d\u3002<\/td><\/tr><tr><td><strong>PUBLIC<\/strong><\/td><td><strong>\u3059\u3079\u3066\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u81ea\u52d5\u7684\u306b\u4ed8\u4e0e\u3055\u308c\u308b\u30ed\u30fc\u30eb\u3002<\/strong><\/td><td>\u3059\u3079\u3066\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u516c\u958b\u3057\u305f\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e<code>USAGE<\/code>\u306a\u3069\u306e\u6700\u4f4e\u9650\u306e\u6a29\u9650\u3092\u4ed8\u4e0e\u3059\u308b\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">4. RBAC\u904b\u7528\u306b\u304a\u3051\u308b\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/h3>\n\n\n\n<p>Snowflake\u74b0\u5883\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3068\u52b9\u7387\u3092\u6700\u5927\u5316\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u304c\u63a8\u5968\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u2460 \u30ab\u30b9\u30bf\u30e0\u30ed\u30fc\u30eb\u306e\u4f5c\u6210\u3068\u968e\u5c64\u5316<\/h4>\n\n\n\n<p>\u30b7\u30b9\u30c6\u30e0\u5b9a\u7fa9\u30ed\u30fc\u30eb\u3092\u76f4\u63a5\u30e6\u30fc\u30b6\u30fc\u306b\u4ed8\u4e0e\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001<strong>\u696d\u52d9\u5185\u5bb9\u3084\u30c7\u30fc\u30bf\u3078\u306e\u30a2\u30af\u30bb\u30b9\u30ec\u30d9\u30eb\u306b\u5fdc\u3058\u305f\u30ab\u30b9\u30bf\u30e0\u30ed\u30fc\u30eb<\/strong>\uff08\u4f8b\uff1a<code>DB_READ_ONLY<\/code>, <code>FINANCE_WRITER<\/code>\u306a\u3069\uff09\u3092\u4f5c\u6210\u3057\u3001\u305d\u308c\u3089\u3092<code>SYSADMIN<\/code>\u3084<code>SECURITYADMIN<\/code>\u306e\u4e0b\u4f4d\u306b\u4f4d\u7f6e\u3065\u3051\u308b\u968e\u5c64\u69cb\u9020\u3092\u5fb9\u5e95\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-jin-gb-block-box-with-headline kaisetsu-box1\"><div class=\"kaisetsu-box1-title\"><\/div>\n<p><strong>\u30e6\u30fc\u30b6\u30fc\u304c\u81ea\u5206\u306e\u7d44\u7e54\u306e\u904b\u7528\u306b\u5408\u308f\u305b\u3066\u81ea\u7531\u306b\u4f5c\u6210\u3057\u305f\u30ed\u30fc\u30eb<\/strong>\u306e\u3053\u3068\u3067\u3059\u3002<br>1. \u30ab\u30b9\u30bf\u30e0\u30ed\u30fc\u30eb\u3068\u306f\uff1f<\/p>\n\n\n\n<p>\u30b7\u30b9\u30c6\u30e0\u5b9a\u7fa9\u30ed\u30fc\u30eb\uff08SYSADMIN\u306a\u3069\uff09\u306f\u975e\u5e38\u306b\u5f37\u529b\u306a\u6a29\u9650\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u5b9f\u969b\u306e\u696d\u52d9\u3067\u306f\u300c\u30c7\u30fc\u30bf\u3092\u898b\u308b\u3060\u3051\u306e\u55b6\u696d\u62c5\u5f53\u8005\u300d\u3084\u300c\u7279\u5b9a\u306e\u30c6\u30fc\u30d6\u30eb\u3060\u3051\u3092\u7ba1\u7406\u3059\u308b\u904b\u7528\u62c5\u5f53\u8005\u300d\u306a\u3069\u3001\u5fc5\u8981\u6700\u5c0f\u9650\u306e\u6a29\u9650\uff08\u6700\u5c0f\u7279\u6a29\u306e\u539f\u5247\uff09\u3092\u5272\u308a\u5f53\u3066\u305f\u3044\u306f\u305a\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u306e\u305f\u3081\u306b\u3001\u7528\u9014\u306b\u5408\u308f\u305b\u3066\u4f5c\u308b\u72ec\u81ea\u306e\u300c\u5f79\u5272\u300d\u304c\u30ab\u30b9\u30bf\u30e0\u30ed\u30fc\u30eb\u3067\u3059\u3002<\/p>\n\n\n\n<p><strong>\u4f8b<\/strong>: <code>DEVELOPER_ROLE<\/code>\uff08\u958b\u767a\u8005\u7528\uff09\u3001<code>SALES_ANALYST_ROLE<\/code>\uff08\u55b6\u696d\u5206\u6790\u7528\uff09\u3001<code>SECURITY_VIEWER_ROLE<\/code>\uff08\u76e3\u67fb\u7528\uff09\u306a\u3069\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u30ab\u30b9\u30bf\u30e0\u30ed\u30fc\u30eb\u306e\u91cd\u8981\u30eb\u30fc\u30eb\uff1a\u30ed\u30fc\u30eb\u306e\u968e\u5c64\u5316<\/h3>\n\n\n\n<p>\u30ab\u30b9\u30bf\u30e0\u30ed\u30fc\u30eb\u306f\u3001\u4f5c\u3063\u3066\u7d42\u308f\u308a\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002Snowflake\u3067\u306f\u300c\u30ab\u30b9\u30bf\u30e0\u30ed\u30fc\u30eb\u3092\u4e0a\u4f4d\u306e\u30b7\u30b9\u30c6\u30e0\u5b9a\u7fa9\u30ed\u30fc\u30eb\u306b\u7d10\u3065\u3051\u308b\uff08\u7d99\u627f\u3055\u305b\u308b\uff09\u300d\u3053\u3068\u304c\u5fc5\u9808\u306e\u30eb\u30fc\u30eb\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u306a\u305c\u968e\u5c64\u5316\u3059\u308b\u306e\u304b\uff1f<\/strong>: \u4e0a\u4f4d\u306e <code>SYSADMIN<\/code> \u304c\u3059\u3079\u3066\u306e\u30ab\u30b9\u30bf\u30e0\u30ed\u30fc\u30eb\u3092\u7ba1\u7406\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u3067\u3059\u3002\u3082\u3057\u7d10\u3065\u3051\u3092\u884c\u308f\u306a\u3044\u3068\u3001\u7ba1\u7406\u8005\uff08SYSADMIN\uff09\u3067\u3042\u3063\u3066\u3082\u3001\u305d\u306e\u30ab\u30b9\u30bf\u30e0\u30ed\u30fc\u30eb\u304c\u4f5c\u3063\u305f\u30c6\u30fc\u30d6\u30eb\u3092\u7ba1\u7406\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/div>\n\n\n\n<h4 class=\"wp-block-heading\">\u2461 ACCOUNTADMIN\u306e\u5229\u7528\u5236\u9650<\/h4>\n\n\n\n<p><code>ACCOUNTADMIN<\/code>\u306f\u3001\u74b0\u5883\u3092\u7834\u58ca\u3059\u308b\u53ef\u80fd\u6027\u306e\u3042\u308b\u975e\u5e38\u306b\u5f37\u529b\u306a\u6a29\u9650\u3092\u6301\u3064\u305f\u3081\u3001<strong>\u65e5\u5e38\u7684\u306a\u904b\u7528\u3084\u958b\u767a\u3067\u7d76\u5bfe\u306b\u4f7f\u7528\u3057\u3066\u306f\u3044\u3051\u307e\u305b\u3093<\/strong>\u3002\u4f7f\u7528\u306f\u76e3\u67fb\u76ee\u7684\u3084\u7dca\u6025\u6642\u306b\u9650\u5b9a\u3057\u3001\u305d\u306e\u4f7f\u7528\u30ed\u30b0\u306f\u53b3\u5bc6\u306b\u76e3\u8996\u3055\u308c\u308b\u3079\u304d\u3067\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u2462 \u6700\u5c0f\u6a29\u9650\u306e\u539f\u5247 (Principle of Least Privilege)<\/h4>\n\n\n\n<p>\u30e6\u30fc\u30b6\u30fc\u3084\u30ed\u30fc\u30eb\u306b\u306f\u3001<strong>\u696d\u52d9\u9042\u884c\u306b\u5fc5\u8981\u6700\u4f4e\u9650\u306e\u6a29\u9650\u306e\u307f<\/strong>\u3092\u4ed8\u4e0e\u3057\u307e\u3059\u3002\u3053\u306e\u539f\u5247\u3092\u5fb9\u5e95\u3059\u308b\u3053\u3068\u3067\u3001\u6a29\u9650\u306e\u60aa\u7528\u3084\u8aa4\u64cd\u4f5c\u306b\u3088\u308b\u60c5\u5831\u6f0f\u6d29\u306e\u30ea\u30b9\u30af\u3092\u6700\u5c0f\u9650\u306b\u6291\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>Snowflake\u306eRBAC\u3092\u9069\u5207\u306b\u8a2d\u8a08\u30fb\u904b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u5f37\u56fa\u306a\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ac\u30d0\u30ca\u30f3\u30b9\u3092\u78ba\u7acb\u3057\u3001\u5b89\u5168\u306a\u30c7\u30fc\u30bf\u6d3b\u7528\u74b0\u5883\u3092\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">&#x1f511; Snowflake\u306e\u4e3b\u8981\u306a\u6a29\u9650\u30ab\u30c6\u30b4\u30ea<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u30c7\u30fc\u30bf\u64cd\u4f5c\u6a29\u9650\uff08DML: Data Manipulation Language\uff09<\/h3>\n\n\n\n<p>\u30c7\u30fc\u30bf\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08\u30c6\u30fc\u30d6\u30eb\u3001\u30d3\u30e5\u30fc\u306a\u3069\uff09\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u3092\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u6700\u3082\u4e00\u822c\u7684\u306a\u6a29\u9650\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>\u6a29\u9650\u540d<\/strong><\/td><td><strong>\u6982\u8981<\/strong><\/td><td><strong>\u9069\u7528\u4f8b<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>SELECT<\/strong><\/td><td>\u30c7\u30fc\u30bf\u306e<strong>\u8aad\u307f\u53d6\u308a<\/strong>\u3092\u8a31\u53ef\u3059\u308b\u3002\u30c7\u30fc\u30bf\u5206\u6790\u306e\u57fa\u672c\u3002<\/td><td><code>SELECT<\/code> on TABLE <code>&lt;table_name&gt;<\/code><\/td><\/tr><tr><td><strong>INSERT<\/strong><\/td><td>\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u3092<strong>\u8ffd\u52a0<\/strong>\uff08\u633f\u5165\uff09\u3059\u308b\u3053\u3068\u3092\u8a31\u53ef\u3059\u308b\u3002<\/td><td><code>INSERT<\/code> on TABLE <code>&lt;table_name&gt;<\/code><\/td><\/tr><tr><td><strong>UPDATE<\/strong><\/td><td>\u65e2\u5b58\u306e\u30c7\u30fc\u30bf\u3092<strong>\u66f4\u65b0<\/strong>\uff08\u5909\u66f4\uff09\u3059\u308b\u3053\u3068\u3092\u8a31\u53ef\u3059\u308b\u3002<\/td><td><code>UPDATE<\/code> on TABLE <code>&lt;table_name&gt;<\/code><\/td><\/tr><tr><td><strong>DELETE<\/strong><\/td><td>\u30c7\u30fc\u30bf\u3092<strong>\u524a\u9664<\/strong>\u3059\u308b\u3053\u3068\u3092\u8a31\u53ef\u3059\u308b\u3002<\/td><td><code>DELETE<\/code> on TABLE <code>&lt;table_name&gt;<\/code><\/td><\/tr><tr><td><strong>TRUNCATE<\/strong><\/td><td>\u30c6\u30fc\u30d6\u30eb\u5185\u306e<strong>\u5168\u30c7\u30fc\u30bf\u3092\u9ad8\u901f\u3067\u524a\u9664<\/strong>\u3059\u308b\u3053\u3068\u3092\u8a31\u53ef\u3059\u308b\u3002<\/td><td><code>TRUNCATE<\/code> on TABLE <code>&lt;table_name&gt;<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u30c7\u30fc\u30bf\u5b9a\u7fa9\u6a29\u9650\uff08DDL: Data Definition Language\uff09<\/h3>\n\n\n\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3084\u30b9\u30ad\u30fc\u30de\u5185\u306b\u3001\u65b0\u3057\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u305f\u308a\u3001\u65e2\u5b58\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u69cb\u9020\u3092\u5909\u66f4\u30fb\u524a\u9664\u3057\u305f\u308a\u3059\u308b\u305f\u3081\u306e\u6a29\u9650\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u6a29\u9650\u306f\u901a\u5e38\u3001<strong>\u30b9\u30ad\u30fc\u30de\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30ec\u30d9\u30eb<\/strong>\u3067\u4ed8\u4e0e\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>\u6a29\u9650\u540d<\/strong><\/td><td><strong>\u6982\u8981<\/strong><\/td><td><strong>\u9069\u7528\u4f8b<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>CREATE DATABASE<\/strong><\/td><td>\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3092\u8a31\u53ef\u3059\u308b\u3002<\/td><td><code>CREATE DATABASE<\/code> on ACCOUNT<\/td><\/tr><tr><td><strong>CREATE SCHEMA<\/strong><\/td><td>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u306b\u65b0\u3057\u3044\u30b9\u30ad\u30fc\u30de\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3092\u8a31\u53ef\u3059\u308b\u3002<\/td><td><code>CREATE SCHEMA<\/code> on DATABASE <code>&lt;db_name&gt;<\/code><\/td><\/tr><tr><td><strong>CREATE TABLE<\/strong><\/td><td>\u30b9\u30ad\u30fc\u30de\u5185\u306b\u65b0\u3057\u3044\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3092\u8a31\u53ef\u3059\u308b\u3002<\/td><td><code>CREATE TABLE<\/code> on SCHEMA <code>&lt;schema_name&gt;<\/code><\/td><\/tr><tr><td><strong>CREATE VIEW<\/strong><\/td><td>\u30b9\u30ad\u30fc\u30de\u5185\u306b\u30d3\u30e5\u30fc\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3092\u8a31\u53ef\u3059\u308b\u3002<\/td><td><code>CREATE VIEW<\/code> on SCHEMA <code>&lt;schema_name&gt;<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u30a2\u30af\u30bb\u30b9\u304a\u3088\u3073\u4f7f\u7528\u6a29\u9650\uff08Usage &amp; Access\uff09<\/h3>\n\n\n\n<p>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u81ea\u4f53\u3092\u5229\u7528\u3057\u305f\u308a\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5185\u306e\u30c7\u30fc\u30bf\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u308a\u3059\u308b\u305f\u3081\u306e\u57fa\u672c\u7684\u306a\u300c\u901a\u884c\u8a31\u53ef\u8a3c\u300d\u3068\u306a\u308b\u6a29\u9650\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>\u6a29\u9650\u540d<\/strong><\/td><td><strong>\u6982\u8981<\/strong><\/td><td><strong>\u9069\u7528\u4f8b<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>USAGE<\/strong><\/td><td>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e<strong>\u5229\u7528<\/strong>\u3092\u8a31\u53ef\u3059\u308b\u3002\u7279\u306b\u30a6\u30a7\u30a2\u30cf\u30a6\u30b9\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u5229\u7528\u306b\u5fc5\u9808\u3002<\/td><td><code>USAGE<\/code> on WAREHOUSE <code>&lt;wh_name&gt;<\/code><\/td><\/tr><tr><td><strong>MONITOR<\/strong><\/td><td>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e<strong>\u4f7f\u7528\u72b6\u6cc1\u3084\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u76e3\u8996<\/strong>\u3059\u308b\u3053\u3068\u3092\u8a31\u53ef\u3059\u308b\u3002<\/td><td><code>MONITOR<\/code> on WAREHOUSE <code>&lt;wh_name&gt;<\/code><\/td><\/tr><tr><td><strong>OPERATE<\/strong><\/td><td>\u30a6\u30a7\u30a2\u30cf\u30a6\u30b9\u306e**\u8d77\u52d5\u30fb\u505c\u6b62\uff08\u30b5\u30b9\u30da\u30f3\u30c9\u30fb\u30ec\u30b8\u30e5\u30fc\u30e0\uff09**\u3092\u5236\u5fa1\u3059\u308b\u3053\u3068\u3092\u8a31\u53ef\u3059\u308b\u3002<\/td><td><code>OPERATE<\/code> on WAREHOUSE <code>&lt;wh_name&gt;<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">4. \u6240\u6709\u6a29\u3068\u7ba1\u7406\u6a29\u9650<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>\u6a29\u9650\u540d<\/strong><\/td><td><strong>\u6982\u8981<\/strong><\/td><td><strong>\u7279\u5fb4<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>OWNERSHIP<\/strong><\/td><td>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u3059\u308b<strong>\u5b8c\u5168\u306a\u6240\u6709\u6a29<\/strong>\u3002\u305d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u3059\u308b\u3059\u3079\u3066\u306e\u64cd\u4f5c\u3068\u3001\u4ed6\u306e\u30ed\u30fc\u30eb\u3078\u306e\u6a29\u9650\u4ed8\u4e0e\u304c\u53ef\u80fd\u3067\u3059\u3002<\/td><td>\u7d99\u627f\u3067\u304d\u306a\u3044<strong>\u7279\u5225\u306a\u6a29\u9650<\/strong>\u3067\u3042\u308a\u3001\u3053\u306e\u6a29\u9650\u3092\u6301\u3064\u30ed\u30fc\u30eb\u306b\u3088\u3063\u3066\u306e\u307f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u69cb\u9020\u5909\u66f4\u306a\u3069\u304c\u53ef\u80fd\u3067\u3059\u3002<\/td><\/tr><tr><td><strong>MANAGE GRANTS<\/strong><\/td><td>\u4ed6\u306e\u30e6\u30fc\u30b6\u30fc\u3084\u30ed\u30fc\u30eb\u306b\u5bfe\u3057\u3001<strong>\u6a29\u9650\u3092\u4ed8\u4e0e<\/strong>\uff08GRANT\uff09\u3057\u305f\u308a\u3001<strong>\u5265\u596a<\/strong>\uff08REVOKE\uff09\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u3092\u8a31\u53ef\u3059\u308b\u3002<\/td><td>\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u7ba1\u7406\u3092\u5c02\u9580\u3068\u3059\u308b\u30ed\u30fc\u30eb\uff08\u4f8b\uff1a<code>SECURITYADMIN<\/code>\uff09\u306b\u4ed8\u4e0e\u3055\u308c\u307e\u3059\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">2. \u30bb\u30ab\u30f3\u30c0\u30ea\u30ed\u30fc\u30eb\uff08Secondary Roles\uff09\u3068\u306f\uff1f<\/h2>\n\n\n\n<p>\u30bb\u30ab\u30f3\u30c0\u30ea\u30ed\u30fc\u30eb\u3068\u306f\u3001\u300c\u73fe\u5728\u4f7f\u7528\u4e2d\u306e\u30e1\u30a4\u30f3\u306e\u30ed\u30fc\u30eb\uff08\u30d7\u30e9\u30a4\u30de\u30ea\u30ed\u30fc\u30eb\uff09\u4ee5\u5916\u306b\u3001\u81ea\u5206\u304c\u6301\u3063\u3066\u3044\u308b\u4ed6\u306e\u5168\u3066\u306e\u30ed\u30fc\u30eb\u306e\u6a29\u9650\u3092\u540c\u6642\u306b\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b\u6a5f\u80fd\u300d\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u306a\u305c\u5fc5\u8981\u306a\u306e\u304b\uff1f\uff08\u3053\u308c\u307e\u3067\u306e\u4e0d\u4fbf\u3055\uff09<\/h3>\n\n\n\n<p>\u901a\u5e38\u3001Snowflake\u3067\u306f\u4e00\u5ea6\u306b1\u3064\u306e\u30ed\u30fc\u30eb\uff08\u30d7\u30e9\u30a4\u30de\u30ea\u30ed\u30fc\u30eb\uff09\u3057\u304b\u300c\u30a2\u30af\u30c6\u30a3\u30d6\u300d\u306b\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30ed\u30fc\u30ebA\uff1a\u30c6\u30fc\u30d6\u30eb1\u304c\u898b\u308c\u308b<\/li>\n\n\n\n<li>\u30ed\u30fc\u30ebB\uff1a\u30c6\u30fc\u30d6\u30eb2\u304c\u898b\u308c\u308b \u3068\u3044\u3046\u5834\u5408\u3001\u3053\u308c\u307e\u3067\u306f <code>USE ROLE A;<\/code> \u3068 <code>USE ROLE B;<\/code> \u3092\u3044\u3061\u3044\u3061\u5207\u308a\u66ff\u3048\u3066\u30af\u30a8\u30ea\u3092\u6295\u3052\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u30bb\u30ab\u30f3\u30c0\u30ea\u30ed\u30fc\u30eb\u3092\u4f7f\u3046\u3068\u3069\u3046\u306a\u308b\u304b\uff1f<\/h3>\n\n\n\n<p>\u30bb\u30ab\u30f3\u30c0\u30ea\u30ed\u30fc\u30eb\u3092\u6709\u52b9\u306b\u3059\u308b\u3068\u3001\u81ea\u5206\u304c\u4ed8\u4e0e\u3055\u308c\u3066\u3044\u308b\u5168\u3066\u306e\u30ed\u30fc\u30eb\u306e\u6a29\u9650\u304c\u300c\u5408\u7b97\u300d\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>-- \u30bb\u30ab\u30f3\u30c0\u30ea\u30ed\u30fc\u30eb\u3092\u6709\u52b9\u306b\u3059\u308b\nUSE SECONDARY ROLES ALL;<\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u308c\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001<strong>\u30ed\u30fc\u30ebA\u306e\u6a29\u9650\uff08\u30c6\u30fc\u30d6\u30eb1\uff09\u3068\u30ed\u30fc\u30ebB\u306e\u6a29\u9650\uff08\u30c6\u30fc\u30d6\u30eb2\uff09\u3092\u3001\u5207\u308a\u66ff\u3048\u308b\u3053\u3068\u306a\u304f\u4e00\u5ea6\u306e\u30af\u30a8\u30ea\u3067\u540c\u6642\u306b\u4f7f\u3048\u308b<\/strong>\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-jin-gb-block-icon-box jin-icon-caution jin-iconbox\"><div class=\"jin-iconbox-icons\"><i class=\"jic jin-ifont-caution jin-icons\"><\/i><\/div><div class=\"jin-iconbox-main\">\n<p>\u30bb\u30ab\u30f3\u30c0\u30ea\u30fc\u30ed\u30fc\u30eb\u306b\u306f\u4ed6\u306e\u30ed\u30fc\u30eb\u306b\u4e0e\u3048\u3089\u308c\u3066\u3044\u308bCREATE\u6a29\u9650\u304c\u542b\u307e\u308c\u3066\u3044\u306a\u3044<\/p>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u30d7\u30e9\u30a4\u30de\u30ea\u3068\u30bb\u30ab\u30f3\u30c0\u30ea\u306e\u9055\u3044<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><td><strong>\u9805\u76ee<\/strong><\/td><td><strong>\u30d7\u30e9\u30a4\u30de\u30ea\u30ed\u30fc\u30eb\uff08Primary\uff09<\/strong><\/td><td><strong>\u30bb\u30ab\u30f3\u30c0\u30ea\u30ed\u30fc\u30eb\uff08Secondary\uff09<\/strong><\/td><\/tr><\/thead><tbody><tr><td><strong>\u5f79\u5272<\/strong><\/td><td>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210\u8005\uff08\u6240\u6709\u8005\uff09\u306b\u306a\u308b<\/td><td>\u65e2\u5b58\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u53c2\u7167\u3084\u64cd\u4f5c\u306e\u307f<\/td><\/tr><tr><td><strong>DDL\u64cd\u4f5c<\/strong><\/td><td><strong>\u53ef\u80fd<\/strong>\uff08\u4f5c\u6210\u3057\u305f\u3082\u306e\u306f\u3053\u306e\u30ed\u30fc\u30eb\u306e\u6240\u6709\u306b\u306a\u308b\uff09<\/td><td><strong>\u4e0d\u53ef<\/strong>\uff08\u57fa\u672c\u7684\u306b\u53c2\u7167\u30fbDML\u7528\uff09<\/td><\/tr><tr><td><strong>\u6a29\u9650\u306e\u7bc4\u56f2<\/strong><\/td><td>\u9078\u3093\u3067\u3044\u308b1\u3064\u306e\u30ed\u30fc\u30eb\u306e\u307f<\/td><td>\u81ea\u5206\u304c\u6301\u3064\u300c\u5168\u30ed\u30fc\u30eb\u300d\u306e\u5408\u7b97<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">1. GRANT\u30b3\u30de\u30f3\u30c9\u306e\u57fa\u672c\u69cb\u9020<\/h2>\n\n\n\n<p>\u6700\u3082\u57fa\u672c\u7684\u306a\u69cb\u6587\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>GRANT &lt;\u6a29\u9650\u540d&gt; ON &lt;\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u7a2e\u985e&gt; &lt;\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u540d&gt; TO ROLE &lt;\u30ed\u30fc\u30eb\u540d&gt;;<\/code><\/pre><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6a29\u9650\u540d<\/strong>: <code>SELECT<\/code>, <code>INSERT<\/code>, <code>USAGE<\/code>, <code>CREATE TABLE<\/code> \u306a\u3069\u3002<\/li>\n\n\n\n<li><strong>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>: <code>DATABASE<\/code>, <code>SCHEMA<\/code>, <code>TABLE<\/code>, <code>WAREHOUSE<\/code> \u306a\u3069\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u3088\u304f\u4f7f\u3046GRANT\u306e\u5b9f\u4f8b<\/h3>\n\n\n\n<p>\u5b9f\u52d9\u3067\u983b\u7e41\u306b\u4f7f\u3046\u30d1\u30bf\u30fc\u30f3\u30923\u3064\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u2460 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3084\u30a6\u30a7\u30a2\u30cf\u30a6\u30b9\u3092\u4f7f\u3048\u308b\u3088\u3046\u306b\u3059\u308b\uff08USAGE\uff09<\/h4>\n\n\n\n<p>Snowflake\u3067\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u8eab\u3092\u898b\u308b\u524d\u306b\u3001\u307e\u305a\u305d\u306e\u300c\u7bb1\uff08DB\/\u30b9\u30ad\u30fc\u30de\uff09\u300d\u3068\u300c\u8a08\u7b97\u6a5f\uff08\u30a6\u30a7\u30a2\u30cf\u30a6\u30b9\uff09\u300d\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u6a29\u5229\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>-- \u30a6\u30a7\u30a2\u30cf\u30a6\u30b9\u306e\u4f7f\u7528\u6a29\u9650\nGRANT USAGE ON WAREHOUSE compute_wh TO ROLE analyst_role;\n\n-- \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u30b9\u30ad\u30fc\u30de\u306e\u4f7f\u7528\u6a29\u9650\nGRANT USAGE ON DATABASE sales_db TO ROLE analyst_role;\nGRANT USAGE ON SCHEMA sales_db.public TO ROLE analyst_role;<\/code><\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">\u2461 \u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u66f8\u304d\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/h4>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>-- \u8aad\u307f\u53d6\u308a\u5c02\u7528\uff08SELECT\uff09\nGRANT SELECT ON TABLE sales_db.public.orders TO ROLE analyst_role;\n\n-- \u66f8\u304d\u8fbc\u307f\u3082\u8a31\u53ef\uff08INSERT, UPDATE, DELETE\uff09\nGRANT INSERT, UPDATE ON TABLE sales_db.public.orders TO ROLE developer_role;<\/code><\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">\u2462 \u30ed\u30fc\u30eb\u3092\u30e6\u30fc\u30b6\u30fc\uff08\u307e\u305f\u306f\u4ed6\u306e\u30ed\u30fc\u30eb\uff09\u306b\u4ed8\u4e0e\u3059\u308b<\/h4>\n\n\n\n<p>\u6a29\u9650\u3092\u30bb\u30c3\u30c8\u3057\u305f\u300c\u30ed\u30fc\u30eb\u300d\u3092\u3001\u6700\u7d42\u7684\u306b\u4eba\uff08\u30e6\u30fc\u30b6\u30fc\uff09\u306b\u7d10\u4ed8\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>GRANT ROLE analyst_role TO USER taro_yamada;<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><\/h2>\n\n\n\n<p>Snowflake\u306e\u6a29\u9650\u306f\u3001\u7384\u95a2\u30fb\u5eca\u4e0b\u30fb\u90e8\u5c4b\u306e\u3059\u3079\u3066\u306e\u9375\u3092\u6301\u3063\u3066\u3044\u306a\u3044\u3068\u3001\u76ee\u7684\u306e\u5834\u6240\u306b\u8fbf\u308a\u7740\u3051\u306a\u3044\u300d\u3068\u3044\u3046\u30eb\u30fc\u30eb<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>GRANT SELECT<\/code>: \u300c\u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u8eab\u3092\u898b\u3066\u3044\u3044\u3088\u300d\u3068\u3044\u3046\u8a31\u53ef\u3002<\/li>\n\n\n\n<li><code>GRANT USAGE ON WAREHOUSE<\/code>: \u300c\u8a08\u7b97\u6a5f\uff08\u30a6\u30a7\u30a2\u30cf\u30a6\u30b9\uff09\u3092\u4f7f\u3063\u3066\u3044\u3044\u3088\u300d\u3068\u3044\u3046\u8a31\u53ef\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u3053\u308c\u3060\u3051\u898b\u308b\u3068\u6e96\u5099\u4e07\u7aef\u306b\u898b\u3048\u307e\u3059\u304c\u3001\u5b9f\u306f<strong>\u809d\u5fc3\u306e\u300c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u300d\u3068\u300c\u30b9\u30ad\u30fc\u30de\u300d\u3068\u3044\u3046\u5eca\u4e0b\u306e\u9375\u304c\u629c\u3051\u3066\u3044\u307e\u3059\u3002<\/strong><\/p>\n\n\n\n<p>\u3053\u306e\u89e3\u8aac\u304c\u8a00\u308f\u3093\u3068\u3057\u3066\u3044\u308b\u3053\u3068\u306f\u3001**\u300cSnowflake\u306e\u6a29\u9650\u306f\u3001\u7384\u95a2\u30fb\u5eca\u4e0b\u30fb\u90e8\u5c4b\u306e\u3059\u3079\u3066\u306e\u9375\u3092\u6301\u3063\u3066\u3044\u306a\u3044\u3068\u3001\u76ee\u7684\u306e\u5834\u6240\u306b\u8fbf\u308a\u7740\u3051\u306a\u3044\u300d**\u3068\u3044\u3046\u30eb\u30fc\u30eb\u306b\u3064\u3044\u3066\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3054\u63d0\u793a\u306eSQL\u6587\u306f\u3001\u3042\u3048\u3066\u300c\u4e00\u90e8\u306e\u9375\uff08\u6a29\u9650\uff09\u3092\u6e21\u3055\u306a\u3044\u300d\u3053\u3068\u3067\u3001\u6a29\u9650\u306e\u4ed5\u7d44\u307f\u3092\u5b66\u3076\u305f\u3081\u306e\u5b9f\u9a13\u7684\u306a\u30b9\u30c6\u30c3\u30d7\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u306a\u305c\u300c\u610f\u5473\u304c\u308f\u304b\u3089\u306a\u3044\u300d\u3068\u611f\u3058\u308b\u306e\u304b\uff1f<\/h3>\n\n\n\n<p>\u304a\u305d\u3089\u304f\u3001**\u300c\u6a29\u9650\u3092\u4e0e\u3048\u3066\u3044\u308b\u306e\u306b\u3001\u5b9f\u969b\u306b\u306f\u4f7f\u3048\u306a\u3044\u72b6\u614b\u3092\u4f5c\u3063\u3066\u3044\u308b\u300d**\u304b\u3089\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>GRANT SELECT<\/code>: \u300c\u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u8eab\u3092\u898b\u3066\u3044\u3044\u3088\u300d\u3068\u3044\u3046\u8a31\u53ef\u3002<\/li>\n\n\n\n<li><code>GRANT USAGE ON WAREHOUSE<\/code>: \u300c\u8a08\u7b97\u6a5f\uff08\u30a6\u30a7\u30a2\u30cf\u30a6\u30b9\uff09\u3092\u4f7f\u3063\u3066\u3044\u3044\u3088\u300d\u3068\u3044\u3046\u8a31\u53ef\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u3053\u308c\u3060\u3051\u898b\u308b\u3068\u6e96\u5099\u4e07\u7aef\u306b\u898b\u3048\u307e\u3059\u304c\u3001\u5b9f\u306f<strong>\u809d\u5fc3\u306e\u300c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u300d\u3068\u300c\u30b9\u30ad\u30fc\u30de\u300d\u3068\u3044\u3046\u5eca\u4e0b\u306e\u9375\u304c\u629c\u3051\u3066\u3044\u307e\u3059\u3002<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u300c\u6a29\u9650\u306e\u968e\u5c64\u69cb\u9020\u300d\u306e\u30a4\u30e1\u30fc\u30b8<\/h3>\n\n\n\n<p>Snowflake\u3067\u30c6\u30fc\u30d6\u30eb\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f\u3001\u4e0a\u304b\u3089\u9806\u756a\u306b\u300c\u4f7f\u7528\u6a29\u9650\uff08USAGE\uff09\u300d\u3092\u6301\u3063\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>WAREHOUSE<\/strong>\uff08\u8a08\u7b97\u6a5f\uff09\u306e\u9375 \u2794 <strong>\u3010\u4ed8\u4e0e\u6e08\u307f\u3011<\/strong><\/li>\n\n\n\n<li><strong>DATABASE<\/strong>\uff08\u5efa\u7269\uff09\u306e\u9375 \u2794 <strong>[\u672a\u4ed8\u4e0e]<\/strong><\/li>\n\n\n\n<li><strong>SCHEMA<\/strong>\uff08\u90e8\u5c4b\uff09\u306e\u9375 \u2794 <strong>[\u672a\u4ed8\u4e0e]<\/strong><\/li>\n\n\n\n<li><strong>TABLE<\/strong>\uff08\u5b9d\u7bb1\uff09\u306e\u9375 \u2794 <strong>\u3010\u4ed8\u4e0e\u6e08\u307f\u3011<\/strong><\/li>\n<\/ol>\n\n\n\n<p>\u305f\u3068\u3048\u5b9d\u7bb1\uff08TABLE\uff09\u306e\u9375\u3092\u6301\u3063\u3066\u3044\u3066\u3082\u3001\u5efa\u7269\uff08DATABASE\uff09\u306b\u5165\u308c\u306a\u3051\u308c\u3070\u3001\u5b9d\u7bb1\u306b\u89e6\u308b\u3053\u3068\u3059\u3089\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u304c\u89e3\u8aac\u306b\u3042\u308b\u300c\u968e\u5c64\u5168\u4f53\u306e\u3059\u3079\u3066\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u9069\u5207\u306a\u6a29\u9650\u3092\u6709\u3057\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308b\u300d\u3068\u3044\u3046\u610f\u5473\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u300c\u9375\u3092\u6e21\u3059\u4eba\u300d\u3082\u300c\u9375\u300d\u3092\u6301\u3063\u3066\u3044\u306a\u3044\u3068\u3044\u3051\u306a\u3044<\/h3>\n\n\n\n<p>Snowflake\u3067\u306f\u3001\u8ab0\u3067\u3082\u81ea\u7531\u306b\u6a29\u9650\u3092\u914d\u308c\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u3042\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08\u4eca\u56de\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3084\u30b9\u30ad\u30fc\u30de\uff09\u306e\u6a29\u9650\u3092\u4ed6\u4eba\u306b\u4e0e\u3048\u308b\u305f\u3081\u306b\u306f\u3001\u5b9f\u884c\u3059\u308b\u4eba\u304c\u4ee5\u4e0b\u306e\u3069\u3061\u3089\u304b\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u305d\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u6240\u6709\u8005\uff08OWNER\uff09\u3067\u3042\u308b<\/strong><\/li>\n\n\n\n<li><strong>\u7ba1\u7406\u8005\u6a29\u9650\uff08MANAGE GRANTS\uff09\u3092\u6301\u3063\u3066\u3044\u308b<\/strong><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Snowflake\u306f\u3001\u3053\u306e\u30ed\u30fc\u30eb\u30d9\u30fc\u30b9\u306e\u30a2\u30af\u30bb\u30b9\u5236\u5fa1\uff08Role-Based Access Control: RBAC\uff09\u30b7\u30b9\u30c6\u30e0\u3092\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3068\u30ac\u30d0\u30ca\u30f3\u30b9\u306e\u4e2d\u5fc3\u7684\u306a\u67f1\u3068\u3057\u3066\u8a2d\u8a08\u3057\u3066\u304a\u308a\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30a6\u30a7\u30a2\u30cf\u30a6\u30b9\u74b0\u5883\u3067\u8907\u96d1<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3090","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/3090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3090"}],"version-history":[{"count":3,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/3090\/revisions"}],"predecessor-version":[{"id":3271,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/3090\/revisions\/3271"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}