Skip to main content
Log in

Test-suite-guided discovery of least privilege for cloud infrastructure as code

  • Published:
Automated Software Engineering Aims and scope Submit manuscript

Abstract

Infrastructure as code (IaC) for the cloud, which automatically configures a system’s cloud environment from source code, is an important practice thanks to its efficient, reproducible provisioning. On a cloud IaC definition (template), developers must carefully manage permission settings to minimize the risk of cyber-attacks. To this end, least privilege on IaC templates, i.e., the assignment of a necessary and sufficient set of permissions, is widely regarded as a best practice. However, the discovery of least privilege can be an error-prone, burdensome task for developers. This is partially because the execution of an action on the cloud sometimes implicitly requires permissions of other services, and since these are difficult to recognize without actual execution, developers are forced to manually iterate the execution of an action and the modification of permissions. In this work, we present an approach to automatically discover least privilege. Our approach utilizes a test suite, which represents what a system should achieve on the cloud, as an indicator of least privilege, and it iterates testing on the cloud and (re)configuration of permissions on the basis of the test results. We also propose a stepwise filtering technique that utilizes the co-occurrences of cloud services/actions and clustering-based pruning to efficiently rule out unnecessary permissions. Our experiments demonstrate that this filtering reduces the number of iterations compared to naive approaches, which directly affects the time and cost to discover least privilege. Moreover, three case studies show that our approach can identify least privilege on Amazon Web Services within a practical time.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Algorithm 1
Algorithm 2
Algorithm 3
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

Notes

  1. http://github.com/.

  2. https://github.com/aws-samples/aws-serverless-ecommerce-platform.

References

Download references

Author information

Authors and Affiliations

Authors

Contributions

All authors contributed to the study conception and design. Experiments and case studies were performed by RS and YN. The first draft of the manuscript was written by RS and all authors commented on previous versions of the manuscript. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Ryo Shimizu.

Ethics declarations

Conflict of interest

The authors have no competing interests to declare that are relevant to the content of this article.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix 1. Details of the permissions used in case studies

Appendix 1. Details of the permissions used in case studies

The following tables detail the allowed set of actions used in our case studies. This information is provided in the appendix because it is too detailed to explain in the body of the paper but is helpful for clarifying what our tool can achieve and what Access Analyzer cannot.

See Tables 6, 7, 8, 9 and 10.

Table 6 Differences of baseline actions and tool outputs in case study 1
Table 7 Differences of baseline actions and tool outputs in case study 2 (Role-1 and Role 2)
Table 8 Differences of baseline actions and tool outputs in case study 2 (Role-3 and Role 4)
Table 9 Differences of baseline actions and tool outputs in case study 3 (Role-1)
Table 10 Differences of baseline actions and tool outputs in case study 3 (Role-2)

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Shimizu, R., Nunomura, Y. & Kanuka, H. Test-suite-guided discovery of least privilege for cloud infrastructure as code. Autom Softw Eng 31, 25 (2024). https://doi.org/10.1007/s10515-024-00420-5

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10515-024-00420-5

Keywords

Navigation