Example of Registry and Repository Policies
After creating the Samsung Cloud Platform Container Registry (hereinafter SCR) service, an endpoint is provided. This endpoint provides an example policy that grants specific permissions when using SCR.
- IAM > Policy > Policy List page lets you create permission policies for registries and repositories, and view or edit existing policies.
- For detailed information on policy management, please refer to the Samsung Cloud Platform User Guide’s Management > IAM > 정책.
- Please refer to the required permissions for using Container Registry with the CLI in Using Container Registry with the CLI.
Allow pulling all repository images created in all registries
If you apply the ScrPullOnlyAccess policy provided as an IAM default policy, you can grant IAM users and user groups permission to pull all repository images created in all registries within the account.
To allow pulling all repository images created in all registries, follow these steps.
- All Services > Management > IAM Click the menu. 1. Navigate to the Service Home page of Identity and Access Management (IAM).
- On the Service Home page, click the Policy menu. 2. Go to the Policy List page.
- On the Policy List page, select ScrPullOnlyAccess. 3. Policy Details navigate to the page.
- On the Policy Details page, select the Connected Targets tab.
- On the Connection Target tab page, connect the target to which you will grant permissions.
- User: Click User Connection above the list to go to the User Connection page. * Select the user to connect and click Done to complete the user connection.
- User Group: Click User Group Link above the list to go to the User Group Link page. * Select the user group to connect and click Done, and the user group connection will be completed.
- Role: Click Role Link above the list to go to the role link page. * Select the role to connect and click Done to complete the role linking.
The ScrPullOnlyAccess policy consists of the following permissions.
- Permission to allow the LoginContainerRegistry Action required for Registry authentication
- Permission to allow the PullRepositoryImages action required for repository image pull
IP access control for SCR endpoints is provided via Private Endpoint Access Control and Public Endpoint Access Control on the Registry detail page.
- Please note that when IP access control is used in the IAM policy for the SCR endpoint, you cannot use Registy and Repository Image via the SCR endpoint.
- Set the IP access control entries to Applied IP: All IPs, Excluded IP: Not used.
Allow pulling and pushing all repository images created in all registries
If you apply the ScrPullPushOnlyAccess policy provided as an IAM default policy, you can grant IAM users and user groups permission to allow Pull and Push for all repository images created in all registries within the account.
To allow Pull and Push for all Repository Images created in all Registries, follow these steps.
- Click the All Services > Management > IAM menu. 1. Navigate to the Service Home page of Identity and Access Management (IAM).
- On the Service Home page, click the Policy menu. 2. Go to the Policy List page.
- On the Policy List page, select ScrPullPushOnlyAccess. 3. Navigate to the Policy Details page.
- On the Policy Details page, select the Connection Targets tab.
- On the Connection Target tab page, connect the target to which you will grant permissions.
- User: Click User Connection above the list to go to the User Connection page. * Select the user to connect and click Done to complete the user connection.
- User Group: Clicking User Group Link above the list navigates to the User Group Link page. * Select the user group to connect and click Done, and the user group connection will be completed.
- Role: Click Role Link above the list to go to the role link page. * Select the role to connect and click Complete, then the role connection will be completed.
The ScrPullPushOnlyAccess policy consists of the following permissions.
- Permission to allow the LoginContainerRegistry Action required for Registry authentication
- Permission to allow the PullRepositoryImages Action required for Repository Image Pull
- Permission to allow the PushRepositoryImages Action required for Push
IP access control for SCR endpoints is provided via Private Endpoint Access Control and Public Endpoint Access Control on the Registry detail page.
- Please note that when IP access control is used in the IAM policy for the SCR endpoint, you cannot use Registy and Repository Image via the SCR endpoint.
- Set the IP access control entries to Applied IP: All IPs, Excluded IP: Not used.
Allow pulling all repository images created in a specific registry
By applying the ScrPullOnlyAccess policy provided as an IAM default policy, you can create a policy that allows only Pull for all repository images created in a specific Registry.
To create a pull permission policy for all repository images created in a specific registry, follow these steps.
- All Services > Management > IAM Click the menu. 1. Navigate to the Service Home page of Identity and Access Management (IAM).
- On the Service Home page, click the Policy menu. 2. Go to the Policy List page.
- On the Policy List page, click Create Policy.
- On the Policy Creation page, enter the Basic Information Input fields and click Next.
- On the Permission Settings page, click Load Policy.
- Load Policy in the window’s list, select ScrPullOnlyAccess and click OK.
- On the Permission Settings page, select the Individual Resource of the Applied Resources item.
- Click Add Resource in the applied resource list.
- In the Add Resource window, select container-registy from the resource type list. 9. In the resource detail list, check the registy resource you want to add, then click Confirm.
- Check the individual resources you added in the applied resources list and click Next.
- Check the input information and click Create. 11. Policy creation is complete.
The ScrPullOnlyAccess policy consists of the following permissions.
- LoginContainerRegistry Action permission
- Permission to allow the PullRepositoryImages action required for repository image pull
IP access control for SCR endpoints is provided via Private Endpoint Access Control and Public Endpoint Access Control on the Registry detail page.
- When creating an IAM policy for using the SCR endpoint, if you use IP access control, please note that you cannot use Registy and Repository Image through the SCR endpoint.
- Set the IP access control entries to Applied IP: All IPs, Excluded IP: Not used.
Allow Image Pull and Push for a Specific Repository Created in a Specific Registry
If you apply the ScrPullPushOnlyAccess policy provided as a default IAM policy, you can create a policy that allows Pull and Push for a specific repository image created in a particular registry.
To create a policy that allows Pull and Push for a specific Repository Image created in a specific Registry, follow these steps.
- All Services > Management > IAM Click the menu. 1. Navigate to the Service Home page of Identity and Access Management (IAM).
- On the Service Home page, click the Policy menu. 2. Go to the Policy List page.
- On the Policy List page, click Create Policy.
- On the Policy List page, enter the items of Basic Information Input and click Next.
- On the Permission Settings page, click Load Policy.
- In the Load Policy window’s list, select ScrPullPushOnlyAccess and click OK.
- On the Permission Settings page, select the Individual Resource of the Applied Resources item.
- Click Add Resource in the applied resource list.
- In the Add Resource dialog, select the following items.
- Select container-registy from the resource type list. * In the resource detail list, check the registry resource to add, then click Confirm.
- Select the repository from the resource type list. * In the resource detail list, check the repository resource to add, then click Confirm.
- Verify the individual resources you added in the applied resource list and click Next.
- Check the input information and click Create. 12. Policy creation is complete.
The ScrPullPushOnlyAccess policy consists of the following permissions.
- Permission to allow the LoginContainerRegistry Action required for Registry authentication
- Permission to allow the PullRepositoryImages action required for repository image pull
- PushRepositoryImages Action required for Push
IP access control for SCR endpoints is provided via Private Endpoint Access Control and Public Endpoint Access Control on the Registry detail page.
- When creating an IAM policy for using the SCR endpoint, if you use IP access control, please note that you will not be able to use Registy and Repository Image through the SCR endpoint.
- Set the IP access control entries to Applied IP: All IPs, Excluded IP: Not used.