@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 300; font-display: swap; src: url(https://wso2.cachefly.net/wso2/sites/all/fonts/jakarta/300.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://wso2.cachefly.net/wso2/sites/all/fonts/jakarta/400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(https://wso2.cachefly.net/wso2/sites/all/fonts/jakarta/500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(https://wso2.cachefly.net/wso2/sites/all/fonts/jakarta/600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(https://wso2.cachefly.net/wso2/sites/all/fonts/jakarta/700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } html { scroll-behavior: smooth; } section { padding: 6rem 0; } body { font-family: 'Plus Jakarta Sans', sans-serif !important; background-color: #f7f8fb !important; } h1, h2, h3, h4, h5, h6 { font-family: 'Plus Jakarta Sans', sans-serif !important; color: #000 !important; } p { font-family: 'Plus Jakarta Sans', sans-serif !important; font-size: 1rem !important; line-height: 1.6rem !important; color: #494848 !important; word-spacing: 3px !important; letter-spacing: .008rem !important; } h1 { font-family: 'Plus Jakarta Sans', sans-serif !important; font-size: 2.8rem !important; word-spacing: 3px !important; letter-spacing: .008rem !important; line-height: 3.6rem !important; color: #000 !important; font-weight: 700 !important; } h2 { font-size: 2rem !important; word-spacing: 3px !important; letter-spacing: .008rem !important; line-height: 2.75rem !important; color: #000 !important; font-weight: 600 !important; } h3 { font-size: 1.5rem !important; word-spacing: 3px !important; letter-spacing: .008rem !important; line-height: 2.3rem !important; color: #000 !important; font-weight: 400 !important; } h4 { font-size: 1.2rem !important; word-spacing: 3px !important; letter-spacing: .008rem !important; line-height: 1.8rem !important; color: #000 !important; font-weight: 400 !important; } h2.TopH2 { font-weight: 600; font-size: 2rem; color: #000; } a.cRotateButton { font-family: 'Plus Jakarta Sans', sans-serif !important; } .HeaderN { padding: 4rem 0; background-color: #f7f8fb; } .HeaderN h1 { margin-top: 2rem !important; } .cHeroImage img { max-width: 100%; margin-top: -2rem; text-align: right; } a.cButton:hover { background-color: #ff7300 !important; border: solid 2px transparent; text-decoration: none !important; } a.cContactButton { font-family: 'Plus Jakarta Sans', sans-serif !important; font-size: 12px; border-radius: 10px !important; padding: 5px 18px 7px !important; } a.cButton, a.cButtonN_Standard { font-family: 'Plus Jakarta Sans', sans-serif !important; margin-right: 0px !important; text-transform: none !important; word-spacing: 3px; letter-spacing: .008rem !important; text-transform: none !important; font-size: 21px !important; padding: 10px 20px 10px !important; width: 222px !important; background-color: #000 !important; color: #fff !important; margin-bottom: 0.7rem !important; letter-spacing: 0.5px !important; font-weight: 500; margin-top: 1rem !important; display: inline-block; border-radius: 10px !important; text-align: center; border: solid 2px transparent; } a.cPDFButton { font-family: 'Plus Jakarta Sans', sans-serif !important; margin-right: 0px !important; text-transform: none !important; word-spacing: 3px; letter-spacing: .008rem !important; text-transform: none !important; font-size: 21px !important; padding: 10px 20px 10px !important; width: 222px !important; background-color: #000 !important; color: #fff !important; margin-bottom: 0.7rem !important; letter-spacing: 0.5px !important; font-weight: 500; margin-top: 1rem !important; display: inline-block; border-radius: 10px !important; text-align: center; border: solid 2px transparent; } a.cButtonN_StandardOutline { font-family: 'Plus Jakarta Sans', sans-serif !important; text-transform: none !important; word-spacing: 3px; letter-spacing: .008rem !important; display: inline-block; text-align: center; text-transform: none !important; font-size: 21px !important; padding: 9px 20px 9px !important; width: 222px !important; border-radius: 10px; font-weight: 500; background-color: transparent !important; color: #000 !important; margin-bottom: 0.7rem !important; letter-spacing: 0.5px !important; border: solid 2px #000; margin-top: 1rem !important; border-radius: 10px !important; } a.cPDFButton:hover { background-color: #ff7300 !important; border: solid 2px transparent; text-decoration: none !important; } a.cButtonN_Standard:hover { background-color: #ff7300 !important; border: solid 2px transparent; text-decoration: none !important; } a.cButtonN_StandardOutline:hover { background-color: #ff7300 !important; border: solid 2px #ff7300; color: #fff !important; text-decoration: none !important; } .cBlackBG a.cButtonN_Standard { font-family: 'Plus Jakarta Sans', sans-serif !important; text-transform: none !important; word-spacing: 3px; letter-spacing: .008rem !important; text-align: center; display: inline-block; text-transform: none !important; font-size: 21px !important; padding: 10px 20px 10px !important; width: 222px !important; background-color: #fff !important; color: #000 !important; margin-bottom: 0.7rem !important; letter-spacing: 1px !important; margin-top: 0.5rem !important; border-radius: 10px !important; border: solid 2px transparent; font-weight: 500 !important; } .cBlackBG a.cButtonN_StandardOutline { font-family: 'Plus Jakarta Sans', sans-serif !important; text-transform: none !important; word-spacing: 3px; letter-spacing: .008rem !important; display: inline-block; text-align: center; text-transform: none !important; font-size: 21px !important; padding: 10px 20px 10px !important; width: 222px !important; border-radius: 10px; font-weight: 500; background-color: transparent !important; color: #fff !important; margin-bottom: 0.7rem !important; letter-spacing: 0.5px !important; border: solid 2px #fff; margin-top: 0.5rem !important; border-radius: 10px !important; } .cBlackBG a.cButtonN_StandardOutline:hover { background-color: #ff7300 !important; text-decoration: none !important; color: #fff !important; border: solid 2px transparent; } .cBlackBG a.cButtonN_Standard:hover { background-color: #ff7300 !important; text-decoration: none !important; color: #fff !important; border: solid 2px transparent; } a.cInlineLink { text-decoration: underline !important; color: #494848 !important; } /* p a, li a, table td a { text-decoration: underline !important; color: #494848 !important; } p a:hover, li a:hover, table td a:hover { text-decoration: none !important; color: #ff7300 !important; } */ a.cInlineLink:hover { text-decoration: none !important; color: #ff7300 !important; } .cLightGreyBG { background-color: #f7f8fb; } .cBlackBG h1 { color: #ffffff !important; } .cBlackBG { background-color: #000; } .cBlackBG h2 { color: #fff !important; } .cBlackBG h3 { color: #fff !important; } .cBlackBG h4 { color: #fff !important; } .cBlackBG h5 { color: #fff !important; } .cBlackBG p a, .cBlackBG li a, .cBlackBG table td a { text-decoration: underline !important; color: #fff !important; } .cBlackBG p a:hover, .cBlackBG li a:hover, .cBlackBG table td a:hover { text-decoration: none !important; color: #ff7300 !important; } /* .cBlackBG a.cInlineLink { text-decoration: underline !important; color: #fff !important; } .cBlackBG a.cInlineLink:hover { text-decoration: none !important; color: #ff7300 !important; } */ .cBlackBG p, .cBlackBG li { color: #ccc !important; } .cWhiteBG { background-color: #fff; } .cRoundedHighlightedBox { padding: 30px 30px 30px 30px; border-radius: 30px; min-height: 357px; margin-bottom: 50px; text-align: center; display: inline-block; box-shadow: 2px 5px 10px 0 rgb(0 0 0 / 20%); background-color: #ffffff; } .cRoundedHighlightedBox.cLargeBorderRadius { border-radius: 50px !important; } ul.cTriangleBullet li:before { content: "\2022"; font-size: 24px; top: -2px; left: 3px; position: absolute; color: #ff7300; } ul.cTriangleBullet li { padding-left: 29px; font-size: 1rem; padding-bottom: 0.7rem; list-style-type: none; position: relative; } .cBenefitsText h3 { color: #000; padding-top: 0px; padding-bottom: 20px; border-bottom: 1px solid #c6c6c6; display: block; width: 100% !important; padding-left: 30px; float: left; } .cBenefitsIcon { float: left; display: inline-block; width: 13%; } .cBenefitsText { display: inline-block; width: 85%; } .cBenefitsText p { padding-left: 30px; float: left; } .cBenefitsIcon img { width: 100px; } .cBenefitsRow { margin-bottom: 30px; } a.cOrangeMore { color: #ff7300 !important; font-weight: 500 !important; letter-spacing: 0.5px !important; font-size: 1.05rem !important; background-image: url(https://wso2.cachefly.net/wso2/sites/all/2023/images/arrow-orange.png); background-repeat: no-repeat !important; background-size: 16px !important; background-position: top 8px left 98px; width: 100%; display: inline-block; } a.cOrangeMore:hover { background-position: top 8px left 108px; text-decoration: none; } a.cOrangeMoreLengthy { color: #ff7300 !important; font-weight: 500 !important; letter-spacing: 0.5px !important; font-size: 1.1rem !important; background-image: url(https://wso2.cachefly.net/wso2/sites/all/2023/images/arrow-orange.png); background-repeat: no-repeat; background-size: 18px !important; background-position: top 8px right 502px; width: 100%; display: inline-block; } a.cOrangeMoreLengthy:hover { background-position: top 8px right 498px; text-decoration: none; } .cDarkGreyBG { background-color: #000 !important; } .cDarkGreyBG h1, .cDarkGreyBG h2, .cDarkGreyBG h2, .cDarkGreyBG h3, .cDarkGreyBG h4, .cDarkGreyBG h5 { color: #fff !important; } .cDarkGreyBG p, li { color: #ccc !important; font-weight: 400 !important; } li, p, label, select { font-family: 'Plus Jakarta Sans', sans-serif !important; color: #494848 !important; word-spacing: 3px; letter-spacing: .008rem !important; } .cDarkGreyBG a.cButton { font-family: 'Plus Jakarta Sans', sans-serif !important; text-transform: none !important; word-spacing: 3px; letter-spacing: .008rem !important; text-align: center; display: inline-block; text-transform: none !important; font-size: 21px !important; padding: 10px 20px 10px !important; width: 222px !important; background-color: #fff !important; color: #000 !important; margin-bottom: 0.7rem !important; letter-spacing: 1px !important; margin-top: 0.5rem !important; border-radius: 10px !important; border: solid 2px transparent; } .cDarkGreyBG a.cButton:hover { background-color: #ff7300 !important; text-decoration: none !important; color: #fff !important; border: solid 2px transparent; } /* .cBreadCrumsSection { background-color: #f7f8fb; } */ .cAlignCenter { text-align: center; width: 100%; display: inline-block !important; } .cAlignLeft { text-align: left; } .cClearN { clear: both; } ul.cDisceBullet li:before { content: "\2022"; font-size: 35px; top: 4px; left: 3px; position: absolute; color: #ff7300; } ul.cDiscBullet li { padding-left: 29px; font-size: 1rem; padding-bottom: 0.7rem; list-style-type: none; position: relative; } ul.cDiscBulletSub li:before { content: "\2022" !important; font-size: 1rem !important; top: 0px !important; left: 3px !important; position: absolute; color: #999 !important; } ul.cDiscBulletSub { margin-top: 10px; } ul.cDiscBulletSub li { padding-left: 20px; font-size: 1rem; padding-bottom: 0.7rem; list-style-type: none; position: relative; } .cRemovePadding { padding: 0 !important; } .cPaddingLeftZero { padding-left: 0 !important; } .cPaddingRightZero { padding-right: 0 !important; } .cHighlighted { border-radius: 30px; } .MobileN { display: none; } p a { text-decoration: underline !important; color:#494848 !important; } .cBlackBG p a { text-decoration: underline !important; color:#cccccc !important; } p a:hover { text-decoration: none !important; color: #ff7300 !important; } @media screen and (max-width: 992px) { .MobileN { display: block; } .DesktopN { display: none; } .HeaderN { text-align: center; padding: 2rem 0; } a.cOrangeMorex { background-image: none; } section { padding: 3rem 0.5rem; } .cBlackBG a.cButtonN_Standard { display: block; width: 100%important; } a.cButtonN_Standard { display: block; width: 100%important; } a.cButtonN_StandardOutline { display: block; width: 100%important; } } /* FILTER STYLYING STARTS */ .cEvents2018-Filter-table-container { background: #fff; padding: 2em 2em 2em 2em; margin-top: 15px; border-radius: 20px; border: solid 1px #ccc; box-shadow: 2px 5px 10px 0 rgb(0 0 0 / 10%); } h3.cFilterTitle { color: #000; margin-bottom: 2rem !important; font-weight: 600; border-bottom: solid 2px #000; padding-bottom: 0.5rem; } .cEvents2018-Filter-table h4 { color: #000 !important; font-weight: 500 !important; border-top: solid 1px #ccc !important; padding-bottom: 6px; text-transform: none; } .cLibrary2020Nov-Filter-table-container { background: #fff !important; padding: 2em 2em 2em 2em; margin-top: 15px; border-radius: 20px; border: solid 1px #ccc; box-shadow: 2px 5px 10px 0 rgb(0 0 0 / 10%); } .cLibrary2020NovFilterLable { font-size: 1rem; line-height: 1.6rem; margin-bottom: 18px; color: #494848 !important; } .cLibrary2020NovFilterLable { display: block; position: relative; padding-left: 24px; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; float: left; margin-right: 1em; margin-bottom: 10px !important; font-size: 0.95rem !important; line-height: 1.6rem !important; } table.cLibrary2020Nov-Filter-InnerTable { margin-bottom: 1rem; } .cLibrary2020Nov-Filter-table h4 { border-top: solid 1px #ccc !important; text-transform: none !important; padding-top: 1rem; } .cEvents2018FilterLable { color: #494848 !important; font-size: 0.95rem; line-height: 1.6rem; margin-bottom: 10px !important; } .cLibrary2020NovFilterLable input:checked~.checkmark { background-color: #ff7300; } .cLibrary2020NovFilterLable .checkmark:after { left: 4px; top: 1px; width: 5px; display: block; height: 10px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); } .checkmark:after { content: ""; position: absolute; } .checkmark { position: absolute; border-radius: 3px; top: 5px !important; left: 0; height: 15px; width: 15px; background-color: #ffffff; border: 1px solid #888 !important; } /* FILTER STYLYING ENDS */ @media screen and (max-width: 728px) { .cHeroImage img { display: none; } } @media screen and (max-width: 574px) { section { padding: 3rem 0.5rem; } }
is
2021/04/27
 
27 Apr, 2021 | 3 min read

Microservices Security in a Zero-trust Environment

  • Prabath Siriwardena
  • Senior Director - Security Architecture - WSO2

Image by TheDigitalWay from Pixabay 

This post was originally published on TechUK on 20 April 2021 and was featured on the publication's #Cyber2021 Week.

The microservices architecture expands the attack surface since a microservice communicates with other microservices remotely over the network. It's a common principle in security that the strength of a given system is only as strong as its weakest link. In a microservice architecture the number of links to be protected can grow from a few to thousands. Thus, microservices architecture requires stricter security controls to mitigate security risks.

Many microservices deployments today worry about the edge security by exposing the microservices via APIs and protecting those with an API gateway at the edge. Once a request passes through the API gateway, the communications assume a trusted network and no further security measures exist to secure access. Securing a single entry point is inadequate since it exposes endless possibilities for an attacker to gain access to sensitive services and data stores. Thus, a defense in depth approach with multiple security layers is the way to go for microservices.

In this blog, we focus on securing service-to-service communications that occur in microservices to mitigate security challenges associated with trust.

What is a Zero-trust Environment?

As per John Kindervag, the creator of the zero-trust model in 2010, rust is a human emotion that we have injected into the digital systems for no reason at all and individuals confuse human trust with digital trust all the time.. A zero-trust environment is built to eliminate the trust between components in a digital system that will expose them to potential security vulnerabilities. When we apply this into a microservices deployment, a microservice should eliminate the trust with other components and the underlying network it interacts with or at least try to minimize trust.

Securing Service-to-service Communications

Microservices security for service-to-service communications is about securing interactions among microservices once a request from a client application passes through the security at the edge. Within a microservices deployment, interactions between microservices can happen over HTTP or gRPC synchronously or over a messaging protocol like Kafka asynchronously.

Irrespective of the communication protocol, in a service-to-service security design, we need to focus on authentication and authorization in service-to-service interactions and passing user context among microservices in a cryptographically safe manner. This is shown in the image below.

Authentication and Authorization in Service-to-service Interactions

The most common way of implementing authentication for service-to-service interactions is to use Mutual Transport Layer Security (mTLS). Following the zero-trust principle, each microservice must validate the requests it gets at the edge of the microservice and not at the edge of the network. Each microservice must validate the certificate of the calling microservice to see whether either the certificate itself or the issuer of the certificate are trusted.

Once the identity of the caller is established, the microservice has to perform an authorization based on the authentication context and the access control policies to see whether the calling microservice is eligible to do what it wants to do. Typically, a proxy component deployed along with the microservice, which intercepts all the requests coming in and going out of a microservice, does these checks. In a service mesh deployment, for example, the envoy proxy carries out these checks.

Passing User Context Among Microservices in A Cryptographically Safe Manner

Typically, an API gateway at the edge of the microservices deployment validates the user context corresponding to the calling application. The calling application can invoke an API just by being itself, or on-behalf of another user. In either case, the API gateway has to pass the user context to the upstream microservices in a cryptographically safe manner.

The best way to carry the user context in a cryptographically safe manner in a microservices deployment is to use a JSON Web Token (JWT). Each microservice at its edge will validate the JWT to make sure it is issued from an issuer it trusts. When one microservice talks to another microservice, the calling microservice can pass the same JWT or exchange it to a new JWT by talking to a security token service that the recipient microservice trusts, and passes the new JWT.

The recipient microservice can authorize the end user based on the claims the JWT carries. As in the case of service-to-service authentication/authorization, a proxy component deployed along with the microservice, which intercepts all the requests coming in and going out of a microservice, does these checks.

Summary

The technology around securing service-to-service communications following zero-trust security principles have evolved in the last few years. Kubernetes has become the de-facto deployment for microservices and service mesh implementations like Istio and Linkerd have increased their support for securing service-to-service communications with mTLS and JWT. Additionally, open-source projects like SPIFFE and OPA are becoming mainstream to address key concerns in securing microservices.

Author

Prabath Siriwardena is an identity evangelist, an author, a blogger, and the Deputy CTO (Security) at WSO2 with more than 13 years of industry experience in designing and building critical Identity and Access Management infrastructure for global enterprises, including many Fortune 100/500 companies.

As a technology evangelist, Prabath has published eight books, including Microservices Security in Action (Manning), OpenID Connect in Action (Manning), Advanced API Security (Apress) and Microservices for the Enterprise (Apress). He blogs on various topics from blockchain, PSD2, GDPR, IAM to microservices security. He also runs a YouTube channel.

Undefined