当前位置: 首页 > news >正文

AWS中国区IAM相关凭证自行管理策略(只读CodeCommit版)

目标

需要从CodeCommit读取代码。除了设置AWS托管策略:AWSCodeCommitReadOnly。还需要自定义策略,让用户能够自行管理IAM自己的相关凭证。

IAM自定义策略

{"Version": "2012-10-17","Statement": [{"Sid": "AllowViewAccountInfo","Effect": "Allow","Action": ["iam:GetAccountPasswordPolicy","iam:GetAccountSummary"],"Resource": "*"},{"Sid": "AllowManageOwnPasswords","Effect": "Allow","Action": ["iam:ChangePassword","iam:GetUser"],"Resource": "arn:aws-cn:iam::*:user/${aws:username}"},{"Sid": "AllowManageOwnAccessKeys","Effect": "Allow","Action": ["iam:CreateAccessKey","iam:DeleteAccessKey","iam:ListAccessKeys","iam:UpdateAccessKey","iam:GetAccessKeyLastUsed"],"Resource": "arn:aws-cn:iam::*:user/${aws:username}"},{"Sid": "AllowManageOwnSigningCertificates","Effect": "Allow","Action": ["iam:DeleteSigningCertificate","iam:ListSigningCertificates","iam:UpdateSigningCertificate","iam:UploadSigningCertificate"],"Resource": "arn:aws-cn:iam::*:user/${aws:username}"},{"Sid": "AllowManageOwnSSHPublicKeys","Effect": "Allow","Action": ["iam:DeleteSSHPublicKey","iam:GetSSHPublicKey","iam:ListSSHPublicKeys","iam:UpdateSSHPublicKey","iam:UploadSSHPublicKey"],"Resource": "arn:aws-cn:iam::*:user/${aws:username}"},{"Sid": "AllowManageOwnGitCredentials","Effect": "Allow","Action": ["iam:CreateServiceSpecificCredential","iam:DeleteServiceSpecificCredential","iam:ListServiceSpecificCredentials","iam:ResetServiceSpecificCredential","iam:UpdateServiceSpecificCredential"],"Resource": "arn:aws-cn:iam::*:user/${aws:username}"}]
}

总结

有了AWS托管策略:AWSCodeCommitReadOnly和自定义策略,就让用户对CodeCommit代码只读权限了。

参考

  • AWS:允许 IAM 用户在“安全凭证”页面上管理自己的凭证
http://www.dtcms.com/a/230246.html

相关文章:

  • bug:undefined is not iterable (cannot read property Symbol(Symbol.iterator))
  • AI炼丹日志-28 - Audiblez 将你的电子书epub转换为音频mp3 做有声书
  • CATIA-CAD 拆图
  • 【从零学习JVM|第二篇】字节码文件
  • Kubernetes 网络方案:Flannel 插件全解析
  • MyBatis-Plus LambdaQuery 高级用法:JSON 路径查询与条件拼接的全场景解析
  • 判断:有那种使用了局部变量的递归过程在转换成非递归过程时才必须使用栈
  • 【从前端到后端导入excel文件实现批量导入-笔记模仿芋道源码的《系统管理-用户管理-导入-批量导入》】
  • 信号与系统汇总
  • OpenCV计算机视觉实战(10)——形态学操作详解
  • 【WPF】WPF 项目实战:构建一个可增删、排序的光源类型管理界面(含源码)
  • 2025 5 月 学习笔记
  • 705SJBH超市库存管理系统文献综述
  • 目标检测任务的评估指标P-R曲线
  • 企业私有化部署DeepSeek实战指南:从硬件选型到安全运维——基于国产大模型的安全可控落地实践
  • 图像处理、图像分析和图像理解的定义、联系与区别
  • OpenCV CUDA模块图像处理------创建CUDA加速的Canny边缘检测器对象createCannyEdgeDetector()
  • Github 2025-06-04 C开源项目日报 Top7
  • 如何轻松地将文件从 PC 传输到 iPhone?
  • https和http有什么区别-http各个版本有什么区别
  • excel从不同的excel表匹配数据
  • 使用pgAdmin导入sql文件
  • Python 隐藏法宝:双下划线 _ _Dunder_ _
  • 【2025】使用docker compose一键部署项目到服务器(4)
  • 多分辨率 LCD 的 GUI 架构设计与实现
  • python版若依框架开发:python版若依部署
  • 【推荐算法】推荐系统核心算法深度解析:协同过滤 Collaborative Filtering
  • MCP协议重构AI Agent生态:万能插槽如何终结工具孤岛?
  • JAVASE:网络编程
  • 【会员专享数据】1960—2023年我国省市县三级逐年降水量数据(Shp/Excel格式)