<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yanni Zhang on Medium]]></title>
        <description><![CDATA[Stories by Yanni Zhang on Medium]]></description>
        <link>https://medium.com/@yanni_zhang?source=rss-8152051f0291------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zDW2KBBTbijxiEZE4Rz-5A.png</url>
            <title>Stories by Yanni Zhang on Medium</title>
            <link>https://medium.com/@yanni_zhang?source=rss-8152051f0291------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 17:19:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yanni_zhang/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Beyond Cloud-Native: Architecting Security for the Multi-Cloud Era]]></title>
            <link>https://medium.com/@yanni_zhang/beyond-cloud-native-architecting-security-for-the-multi-cloud-era-c58d9ce9b334?source=rss-8152051f0291------2</link>
            <guid isPermaLink="false">https://medium.com/p/c58d9ce9b334</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[data-security]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Yanni Zhang]]></dc:creator>
            <pubDate>Mon, 29 Sep 2025 02:00:47 GMT</pubDate>
            <atom:updated>2025-09-29T02:13:52.082Z</atom:updated>
            <content:encoded><![CDATA[<p>Multi-cloud has become a mainstream business strategy, not just a technical buzzword. A report from Accenture shows that 65% of organizations now allocate their cloud budgets to multi-cloud environments, while Flexera reports that 87% actively use a mix of providers like AWS, Azure, and IBM Cloud. Companies such as Uber and HSBC exemplify this approach-Uber runs core infrastructure on AWS and uses Google Cloud for edge analytics, while HSBC leverages multiple platforms to boost resilience, meet regional data laws, and tailor services to specific financial needs.</p><p>Companies choose multi-cloud to avoid relying too heavily on a single provider. They can leverage the best services or specialize tools from different providers. They can enhance resilience and performance by distributing workloads across different clouds tailored to specific needs. This approach also helps optimize costs and ensures global scalability.</p><p>However, companies face a new set of challenges. Instead of managing a single, well-understood perimeter, now they have to maintain consistent security posture, across multiple platforms, and each of them has its own architecture, security tools, operational standards, default configurations, and shared responsibility models. Security teams must navigate these differences which require specialized expertise.</p><p>This fragmentation makes it harder to maintain a unified view of security events, increases the chances of misconfigurations, and creates blind spots where vulnerabilities can go unnoticed. Ensuring uniform policy enforcement, visibility, and risk management could become very challenging.</p><p>If fragmentation is the root cause of the multi-cloud security paradox, then the solution must lie in unification. Rather than trying to manage multiple clouds more effectively, organizations should aim to manage them as a single, logical platform. This calls for a unified security fabric: a consistent control plane that abstracts away provider-specific complexities and enables seamless policy enforcement, visibility, and risk management.</p><h4>IAM: Identity-Based Access Perimeter</h4><p>To navigate the complexities of multi-cloud security, organizations can start by establishing an identity-based access perimeter.</p><p>In multi-cloud and hybrid environments, traditional network boundaries are fading. Identity is now the anchor. Instead of relying on IP addresses or physical location, access decisions are increasingly based on who the user is, what they’re trying to do, and where they’re doing it from.</p><p>The solution for identity-based access perimeter is built on two key components: Single Sign-On (SSO) for seamless authentication and Open Policy Agent (OPA) for universal, fine-grained authorization.</p><p>Companies can leverage centralized identity provider (IdP) such as IBM Verify, Okta, Ping Identity or Azure AD, to enable federated access and single sign-on (SSO). SSO ensures trust between disparate systems by exchanging secure tokens. Built on industrial open standards like SAML, OAuth, and OIDC, federated access and SSO create a unified access experience while cross-cloud compatibility becomes achievable.</p><p>While Single Sign-On (SSO) verifies a user’s identity, Open Policy Agent (OPA) determines what actions they’re allowed to perform. OPA is a lightweight, open-source policy engine that makes access decisions based on declarative policies written in Rego. It’s cloud-agnostic and can be seamlessly deployed into your infrastructure -whether you’re running on a single cloud, across multiple clouds, or on-premises. You can integrate OPA as a sidecar, a service, or an admission controller. It evaluates incoming requests against your Rego policies and returns decisions such as “allow” or “deny.” With OPA, you can define a unified set of policies that apply consistently across environments, ensuring portability and centralized control. OPA also integrates easily with cloud-native tools. For example, in Kubernetes on AWS or Azure, you can use OPA via Gatekeeper to enforce admission control policies.</p><h4>Automation: Compliance with GitOps</h4><p>GitOps, built on Git as the source of truth, automates deployments using declarative configurations. It brings consistency across multi-cloud environments. No matter where you’re deploying (IBM Cloud, AWS, Azure, etc), GitOps ensures your infrastructure is built and maintained the same way.</p><p>Every change flows through Git, providing full visibility, traceability, and easy rollback options. You can integrate security checks directly into CI/CD pipelines, helping block risky changes. If someone tries to deploy something sketchy, such as over permissive firewall, it gets blocked before it ever hits production. Tools like ArgoCD and Flux continuously sync your actual cloud state with what’s defined in Git to prevent drift. If someone manually tweaks something in the cloud, GitOps will fix it or flag it. GitOps acts like a security-savvy autopilot that keeps your infrastructure predictable, secure, and tightly controlled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pLKqiveDCLGClTmfZ-3qNA.jpeg" /></figure><p>In a modern DevOps workflow, application developers are responsible for writing the core logic or functions in a programming language and using containerization tools like Docker or Podman to build images that ensure the software runs reliably in cloud-native environments. Once the code is committed, CI/CD pipelines, which are often managed by DevOps engineers, automate the build, test, and packaging process, pushing validated artifacts to registries and updating deployment manifests. GitOps then takes over, using tools like Argo CD to continuously synchronize the desired state from Git to the Kubernetes cluster. Site Reliability Engineers (SREs) manage production environment by approving production releases, watching system health, and handling rollbacks as needed.</p><h4>Visibility: Cross-cloud Observability</h4><p>In a multi-cloud environment, relying solely on per-cloud monitoring tools leads to fragmented visibility and inconsistent threat detection. Cloud native services like AWS CloudWatch and Azure Monitor offer deep integration and operational insights, but they fall short in detecting threats that span cloud boundaries. A centralized observability hub, which is backed by a SIEM or data lake, can aggregate and normalize logs, metrics and traces from all clouds, apply cross-cloud detection rules for threat detection and response. The optimal approach is hybrid: use native tools for cloud-specific diagnostics, but funnel all security-relevant data into a central platform for correlation, alerting, and forensic analysis. This model balances depth with breadth, ensuring both granular control and strategic oversight.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3l-PVkwdjhkZ5ygzSFVJDQ.jpeg" /></figure><h4>Data Protection: Sovereign Encryption and Beyond</h4><p>The strategic use of multi-cloud for data residency creates a paradox: while data is correctly placed for compliance, control over that data becomes fragmented across proprietary key management systems. Using cloud-native KMS (AWS KMS, Azure Key Vault, IBM Key Protect) scatters encryption keys and policies across incompatible systems. Organizations achieve geographic compliance at the cost of centralized governance.</p><p>A centralized, cloud-agnostic key management system (like HashiCorp Vault), deployed in strategic sovereign regions, creates a consistent control plane. This approach enforces single security policies across all clouds, maintains consolidated audit trails, and retains portable key control, resolving the tension between data residency and operational security.</p><p><strong>Beyond Encryption: Unified Secrets</strong></p><p>This fragmentation extends equally to secrets management. Database credentials and API tokens scattered across cloud-specific secret stores create the same inconsistencies. The same centralized control plane can extend to provide unified secrets management, enforcing standardized rotation and access controls across all environments.</p><h4>Conclusion: The Platform Engineering Imperative</h4><p>The journey to effective multi-cloud security is not merely about adopting new tools, but about embracing a fundamental shift in mindset: from reactive, cloud-centric security to proactive, platform-centric engineering. The business case is clear. By investing in this unified control plane, companies can effectively manage the multi-cloud paradox, transforming inherent complexities into manageable, operational realities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c58d9ce9b334" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New in Single Sign-On and User Management in Cloud Pak for Data 4.8]]></title>
            <link>https://medium.com/@yanni_zhang/single-sign-on-and-user-management-in-cloud-pak-for-data-4-8-6be0473f185a?source=rss-8152051f0291------2</link>
            <guid isPermaLink="false">https://medium.com/p/6be0473f185a</guid>
            <category><![CDATA[single-sign-on]]></category>
            <category><![CDATA[oidc]]></category>
            <category><![CDATA[cloud-pak-for-data]]></category>
            <category><![CDATA[user-management]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Yanni Zhang]]></dc:creator>
            <pubDate>Wed, 29 Nov 2023 16:07:59 GMT</pubDate>
            <atom:updated>2024-03-21T18:22:43.913Z</atom:updated>
            <content:encoded><![CDATA[<p>Authors: <a href="https://medium.com/u/8152051f0291">Yanni Zhang,</a> <a href="https://medium.com/u/3318d24255c4">Sachin Prasad</a>, <a href="https://medium.com/u/60bf1105e0e7">Kevin Stumph</a></p><p>The integration of single sign-on and user management is essential for creating a unified, secure, and user-friendly access environment, aligning with the evolving needs of a dynamic workforce in the enterprise environment. In previous Cloud Pak for Data releases, single sign-on and user management can be backed by identity management service as a configuration option. Identity management service provides additional security features and enhancements that enable organizations to maintain a stronger security posture. Starting at Cloud Pak for Data 4.8, the IAM integration is enabled out of the box. Below is the list of additional features and enhancements with IAM integration enablement -</p><h4>Attribute-Based Access Control (ABAC)</h4><p>This feature introduces a granular level of control, allowing organizations to tailor access policies based on user attributes. For more information, please see another blog post <a href="https://medium.com/@kvstumph/attribute-based-access-control-abac-enhancements-in-cloud-pak-for-data-3332c3f1f14e">https://medium.com/@kvstumph/attribute-based-access-control-abac-enhancements-in-cloud-pak-for-data-3332c3f1f14e</a>.</p><h4>Multiple LDAPs</h4><p>Organizations may utilize multiple LDAP directories for various purposes. As organizations grow or undergo structural changes, they may adopt additional LDAP directories. Supporting multiple LDAP sources allows seamless integration with diverse systems, streamlining access management during organizational transitions.</p><h4>OpenID Connect Integration</h4><p>OpenID Connect (OIDC) is an open standard that is getting wide adoption. Different identity providers may serve as OpenID providers. OIDC integration allows Cloud Pak for Data to integrate with different identity providers that customers use, such as Azure AD, Okta, IBM Verify, Ping Identity, etc. For more information, you may visit <a href="https://www.ibm.com/docs/en/cloud-paks/foundational-services/4.4?topic=users-configuring-single-sign-using-openid-connect">https://www.ibm.com/docs/en/cloud-paks/foundational-services/4.4?topic=users-configuring-single-sign-using-openid-connect</a>. Social login, which allows users to access Web-based applications using their social media credentials, has gained footprints in enterprise settings. Cloud Pak for Data now supports several social logins thanks to OIDC integration capability.</p><p>In addition, Cloud Pak for Data users can log on using <a href="https://www.ibm.com/docs/en/cloud-paks/foundational-services/4.4?topic=types-delegating-authentication-openshift">OpenShift authentication</a>, and <a href="https://www.ibm.com/docs/en/cloud-paks/foundational-services/4.4?topic=users-configuring-single-sign-using-saml">SAML integration</a>. Cloud Pak for Data runs on top of OpenShift, it can delegate login to OpenShift, which is a built-in login mechanism with IAM integration. SAML is still a widely adopted single sign-on protocol and we continue to support it as the mechanism to integrate with identity providers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6be0473f185a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IBM Cloud Pak Foundational Services FIPS Compliance]]></title>
            <link>https://medium.com/@yanni_zhang/ibm-cloud-pak-foundational-services-fips-compliance-cc08dda06c8a?source=rss-8152051f0291------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc08dda06c8a</guid>
            <category><![CDATA[ibm-cloud]]></category>
            <category><![CDATA[ibm-cloud-pak]]></category>
            <category><![CDATA[security-compliance]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[ibm]]></category>
            <dc:creator><![CDATA[Yanni Zhang]]></dc:creator>
            <pubDate>Mon, 02 Jan 2023 21:54:57 GMT</pubDate>
            <atom:updated>2023-01-02T22:14:22.040Z</atom:updated>
            <content:encoded><![CDATA[<p>FIPS stands for Federal Information Processing Standards. It is a set of standards and guidelines defined and maintained by the US National Institute of Standards and Technology (NIST). It is used by federal agencies to secure the computing systems in according to Federal Information Security Management Act (FISMA). It is also used by commercial organizations to ensure their products comply with Federal standards.</p><p>FIPS specifications and standards are updated and evolved over time to continuously raise security bar. Related security publications are listed here <a href="https://csrc.nist.gov/publications/">https://csrc.nist.gov/publications/.</a> The commonly referenced one among software vendors is FIPS 140. It was initially developed by a government and industry work group. It has been evolving from FIPS 140–1 to 140–2 and now 140–3. It defines four levels of security for cryptographic modules to protect a wide spectrum of sensitive data in diverse application environments.</p><p>FIPS certification is a government certification process that goes through rigorous test to validate whether the crypto module meets requirements for FIPS 140. Once it’s certified, the crypto module gets a FIPS certificate and is listed in NIST certificate database. The module is called FIPS certified module. FIPS approved, or FIPS validated is the equivalent term as FIPS certified. In order to be certified, all components of a security solution must be tested and approved by one of the NIST accredited independent labs. The lab may do a pre-screen of the module and request further documentation or code update before they put it in the certification queue. The whole process may take several months to complete.</p><p>FIPS compliance is not the same as FIPS certification. FIPS compliance is an industry term to describe product that may rely on FIPS validated module for its crypto functions to meet specific criteria related to encryption, authentication and data integrity. To claim FIPS compliance, the product or system must be able to be configured to run in FIPS mode, which utilizes FIPS approved modules in the crypto functions for storage, compute or networking services.</p><p>Getting FIPS certification and maintaining FIPS compliance status is important for companies to sell products to the government agencies or companies that target the government agencies as customers. IBM Cloud Pak foundational services is not a standalone product itself, instead, it is bundled by all IBM Cloud Pak products. So its FIPS compliance is a pre-req for any Cloud Pak to claim the compliance status. Starting from the version 3.22 released in late 2022, IBM Cloud Pak foundational services is enhanced to support FIPS compliance. This enables IBM Cloud Pak for Watson AIOps to support FIPS compliance in version 3.6.0.</p><p>The U.S. government requires all data at-rest and in-motion be encrypted using FIPS 140–2 or FIPS 140–3 validated encryption algorithms and modules. To satisfy the requirements, our approach to FIPS compliance is a boundary approach, enabled by the “FIPS Wall”. The following picture depicts the “FIPS Wall” approach.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rTVuzgTsdE-Ax890sJTa_w.jpeg" /></figure><p>First of all, you must turn on FIPS when you deploy the OpenShift cluster. When the cluster is in FIPS mode, container bootstrap process will automatically configure the foundational service containers to be FIPS enabled. Any process getting ciphers from the kernel will only be permitted to retrieve FIPS ciphers. IPSec traffic between nodes will use FIPS modules to encrypt the data in transit. As the local storage and etcd that is used by Kubernetes to store all its data reply on the RHEL-provided disk encryption, they will have FIPS protection as well. Overall, all internal traffic between cluster nodes and the data stored within the cluster boundary are secured with FIPS validated algorithms and modules.</p><p>Secondly, we ensure the communications between the outside world and foundational services in the cluster are FIPS compliance. Foundational services can expose several endpoints to accept external communication requests via OpenShift routes. We have two types of routes for inbound connection requests. The re-encrypt route terminates the TLS connection at the route and re-establishes a subsequent TLS connection between the route and the backend service. On FIPS enabled cluster, the re-encrypt route will only allow the connection to use FIPS TLS ciphers. The other type of the route is pass-through. The pass-through route does not intercept the HTTPS traffic, instead, it allows the traffic to flow between the external world and the backend service. If you need to use the route that is pass-through by default, depending on what backend service it is, you have the option to either re-configure it to be re-encrypt route, or enable its FIPS mode. The IAM service in foundational services may have outbound connection requests to external services. One common scenario is the connection to the identity provider. The external service may be an enterprise LDAP server, an Azure Active Directory, and so on. External services may mandate FIPS or may not. We allow the support on both FIPS and non-FIPS connections based on the negotiation with the external services.</p><p>Lastly, customers very often may choose different storage solution to store the foundational services data. Customers must consult storage solution provider whether there is FIP compliance procedure to protect the persisted data.</p><p>For more details on foundational services FIPS compliance enablement, please visit <a href="https://www.ibm.com/docs/en/cpfs?topic=about-regulatory-compliance.">https://www.ibm.com/docs/en/cpfs?topic=about-regulatory-compliance.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc08dda06c8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutorial: IBM Cloud Pak single sign-on (SSO) integration with Microsoft Azure Active Directory]]></title>
            <link>https://medium.com/@yanni_zhang/tutorial-ibm-cloud-pak-single-sign-on-sso-integration-with-microsoft-azure-active-directory-ee293d2d9c24?source=rss-8152051f0291------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee293d2d9c24</guid>
            <dc:creator><![CDATA[Yanni Zhang]]></dc:creator>
            <pubDate>Mon, 23 May 2022 05:04:19 GMT</pubDate>
            <atom:updated>2023-06-30T17:02:58.363Z</atom:updated>
            <content:encoded><![CDATA[<h3>Prerequisites</h3><p>You have a subscription to <a href="https://portal.azure.com/">Microsoft Azure</a>.</p><p>You can run oc or kubectl command with admin access to the OpenShift cluster.</p><p>Your Cloud Pak is running IBM Could Pak foundational services version 3.17 or later. (To verify that, run oc get csv -n ibm-common-services, check the version for “IBM Cloud Pak foundational services”).</p><p>You have <a href="https://www.ibm.com/docs/en/cpfs?topic=cloudctl-installing">IBM Cloud Pak CLI </a>(cloudctl) installed.</p><h3>Set up SAML authentication</h3><h4>Enable SAML on IBM Cloud Pak</h4><p>You log on to your Cloud Pak cluster using cloudctl command as an administrator. You will be prompted to enter username and password. You can obtain the default admin login credential by following the <a href="https://www.ibm.com/docs/en/cpfs?topic=operator-accessing-cluster-console">guide</a>.</p><pre>cloudctl login -a &lt;cp-console URL&gt;</pre><p>You can obtain <em>cp-console</em> URL using <em>oc get route</em> command in foundational services namespace.</p><pre>oc get route cp-console -n ibm-common-services</pre><p>Then you can run the following cloudctl command to enable SAML.</p><pre>cloudctl iam saml-enableEnabling SAML. This may take a few moments...<br>SAML enabled<br>OK</pre><p>Export your Cloud Pak SAML service provider metadata file. Use -f option to specify a filename of your choice.</p><pre>cloudctl iam saml-export-metadata -f cloudpak-sp-meta.xml</pre><pre>SAML configuration content exported to cloudpak-sp-meta.xml<br>OK</pre><p>To complete the SAML metadata exchange, you follow the next section to enable SAML for the Cloud Pak on your Microsoft Azure service.</p><h4>Create IBM Cloud Pak application on Microsoft Azure</h4><p>You log on to <a href="https://portal.azure.com/#home">Azure portal</a>, click view button under Manage Azure Active Directory. Click All application in the menu to the left hand side. Click New application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nSCpeHzboarxUcVHowDDhg.png" /></figure><p>Click Create your own application</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BYSxN56dXF66lcTEPyrpNQ.png" /></figure><p>At Create your own application, enter the application name and click Create.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hS_xgyJmSHlsCQk9myzWfw.png" /></figure><p>At Cloud Pak Overview page, click Get started under 2. Set up single sign on. We will come back to 1. Assign users and groups later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5vaS-dWrkfK5aBp8K1EnFQ.png" /></figure><p>Click SAML under Select a single sign-on method</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RxRwnwQVWFwhp3fBa6SkVg.png" /></figure><p>Click Upload metadata file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7e4cPTC42eSFYtm6GNFs6A.png" /></figure><p>Select the file you saved previously from cloudctl iam saml-export-metadata command. Click Add.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0i_4aeTj0toH7uvO8LXQTA.png" /></figure><p>Basic SAML configuration window pops up to the right hand side. Click Save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HFIh1MyAbS4n7kj0HM6V5A.png" /></figure><p>Close Basic SAML Configuration window. On Set up Single Sign-on with SAML panel, scroll down to 3 SAML Signing Certificate. Click Download link next to Federation Metadata XML.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*glagbXrEMTzwnu_rV-L5AQ.png" /></figure><p>Go back to the terminal where you ran cloudctl commands and upload the downloaded Azure SAML metadata file to your IBM Cloud Pak.</p><pre>cloudctl iam saml-upload-metadata -f azure-idp.xml</pre><pre>Uploading SAML metadata. This may take a few moments...<br>SAML metadata uploaded<br>OK</pre><p>Now if you open the cp-console URL from a browser, you will see Enterprise SAML as a login option on the screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OzxAT547vveQ9VxKoCMPiQ.png" /></figure><h3>Grant Microsoft Azure users access to IBM Cloud Pak</h3><p>On Azure Cloud Pak Overview page, click Assign users and groups under 1. Assign users and groups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vdErQhePMDio8qPgqN-1uA.png" /></figure><p>On Users and groups page, click Add user/group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cvym6X5aBDmd4R9DnNvETQ.png" /></figure><p>Select the user you want to assign to the Cloud Pak application, click Select, then click Assign. Alternatively, you can add a group to the Cloud Pak application. All users in the group are assigned to the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M1Xz945yWcdUAO-3NDp8Rg.png" /></figure><h4>Manual on-boarding users in IBM Cloud Pak</h4><p>Here we introduce manual on-boarding process in IBM Cloud Pak. This requires LDAP connection to the Microsoft Active Directory or an LDAP server that mirrors the user entries in Azure Active Directory.</p><p><strong>Create an LDAP connection</strong></p><p>On cp-console login option page, select IBM provided credentials (admin only). On the login page, enter admin username and password. You can obtain the password by following the <a href="https://www.ibm.com/docs/en/cpfs?topic=operator-accessing-cluster-console">guide</a>.</p><p>Click Manage identity providers link. Follow <a href="https://www.ibm.com/docs/en/cpfs?topic=users-configuring-ldap-connection">the steps </a>to set up a connection with Microsoft Active Directory. In the Filter settings, you want to make sure the Active Directory attribute specified in user filter is the attribute users will use as the login username in SAML authentication. You also want to make sure the Active Directory attribute specified in user filter matches the one specified for User ID map, and same for group filter and group ID map.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YrHcR7ys5lPRa_G11_ffDg.png" /></figure><p><strong>Create an IdP configuration for the Azure service on IBM Cloud Pak</strong></p><p>From the terminal where you logged on to cloudctl as default admin, run <em>cloudctl tokens </em>command.</p><pre>cloudctl tokens<br>Access token:  Bearer 0e45cb1c9e2f7fed13e71e8b640ce502663595db50eaae75b9e346b2959766741ef581b6444b03ac33c9f417434dad8c15af5eb5175f0ad5363a02848e6f26e133ef838d4add0d5804a363fb3ef168c65e58f2041b9bbaffd0de874f880ac3e33e2db962d570fdc0b50681c3e55e33152fb6465eff5d75c15a9c24f286d35879ed3b1b41fe1b698b1002e6bbb95885249fd279f1e34fe0e6adb7a26ce5bb8ca6c936c9e3127a3e78e28853eebd35b175ea5481aa7da99cec7bbe56811cb135f693acdc469404cffa0d4b3086b5cac9b7ce05b6d5690000e55f4bb79628392671e189b114ff5010dab22b968bf6b072b5f704df3706da17fb481587c5813ac073a94730cee94cc86134c8cdcd70461ce4b61334836adc1a7715a04df2ff4e45fd00e61d39b0eb27523cadff345c366deb5c4013acd7389fe557590687f0bfe35b1533310c240800a67fbf1650be42fa30fe47e46c89db64b46fb20c5ba3e33a40ecd27e4238dc04eb6bc07351710446cc1122d6ea1a49ee54e354bc38c0faea612c1243af147db9f1ffb87717ef934053b3b63c8c71e940f6a7c4fad74807a0d2a9cf07dc35d0956903952fe7914ad00bfa58d8af977d7b3ca81db8464220242a671c106e96980c49d84908f47493bc530fbb1af79c77d9f53656628b8f2279d269585165f03942965ce0a3741a9cf903c6d58e07e6c46f264f24951726e9e1ef<br>ID token:  sha256~Fs6h3b0qQRJ0vQxrkwL20Eh3JESW7kgraWnsb1tRGRS</pre><p>Set TOKEN variable using the access token.</p><pre>export TOKEN=0e45cb1c9e2f7fed13e71e8b640ce502663595db50eaae75b9e346b2959766741ef581b6444b03ac33c9f417434dad8c15af5eb5175f0ad5363a02848e6f26e133ef838d4add0d5804a363fb3ef168c65e58f2041b9bbaffd0de874f880ac3e33e2db962d570fdc0b50681c3e55e33152fb6465eff5d75c15a9c24f286d35879ed3b1b41fe1b698b1002e6bbb95885249fd279f1e34fe0e6adb7a26ce5bb8ca6c936c9e3127a3e78e28853eebd35b175ea5481aa7da99cec7bbe56811cb135f693acdc469404cffa0d4b3086b5cac9b7ce05b6d5690000e55f4bb79628392671e189b114ff5010dab22b968bf6b072b5f704df3706da17fb481587c5813ac073a94730cee94cc86134c8cdcd70461ce4b61334836adc1a7715a04df2ff4e45fd00e61d39b0eb27523cadff345c366deb5c4013acd7389fe557590687f0bfe35b1533310c240800a67fbf1650be42fa30fe47e46c89db64b46fb20c5ba3e33a40ecd27e4238dc04eb6bc07351710446cc1122d6ea1a49ee54e354bc38c0faea612c1243af147db9f1ffb87717ef934053b3b63c8c71e940f6a7c4fad74807a0d2a9cf07dc35d0956903952fe7914ad00bfa58d8af977d7b3ca81db8464220242a671c106e96980c49d84908f47493bc530fbb1af79c77d9f53656628b8f2279d269585165f03942965ce0a3741a9cf903c6d58e07e6c46f264f24951726e9e1ef</pre><p>Set HOST variable using the cp-console route.</p><pre>export HOST=cp-console.apps.cp.fyre.ibm.com</pre><p>Run the idsource registration API to create a SAML configuration for the Azure identity provider service.</p><pre>curl -k -s  -X POST https://$HOST/idprovider/v2/auth/idsource/registration \<br>--header &#39;Content-Type: application/json&#39;   \<br>--header &#39;Accept: application/json&#39;   \<br>--header &quot;Authorization: Bearer $TOKEN&quot; \<br>--data-raw &#39;{<br>&quot;name&quot;: &quot;idp_saml_azure&quot;,<br>&quot;description&quot;: &quot;This is a saml azure config&quot;,<br>&quot;protocol&quot;: &quot;saml&quot;,<br>&quot;idp_type&quot;: &quot;default&quot;,<br>&quot;saml_ldap&quot;: &quot;Microsoft Active Directory&quot;,<br>&quot;jit&quot;: &quot;no&quot;,<br>&quot;token_attribute_mappings&quot;: {<br>  &quot;uid&quot;: &quot;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name&quot;,<br>  &quot;first_name&quot;: &quot;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname&quot;,<br>  &quot;last_name&quot;: &quot;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname&quot;,<br>  &quot;email&quot;: &quot;http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress&quot;,<br>  &quot;groups&quot;: &quot;http://schemas.microsoft.com/ws/2008/06/identity/claims/groups&quot;<br>},<br>&quot;status&quot;: &quot;enabled&quot;<br>}&#39;</pre><p><strong>Grant user access based on group membership in Cloud Pak</strong></p><p>You log on to the Cloud Pak using default admin credential. The login URL is <em>cpd</em> route hostname. On the home page, click Manage users.</p><pre>oc get route cpd -n &lt;Cloud Pak namespace&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WNyPvcUDqbCx5ej4HWJrdw.png" /></figure><p>On Access control page, click User groups tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ru0AQFRVinFq9HxaOs0Psw.png" /></figure><p>Click New user group button. Provide the new group name. Click Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9u_bryaGsjDV4jicYrbs5A.png" /></figure><p>Select Identity provider group. In search box, type in the Active Directory group name. Select the group and click Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GJn0GUzI5-xh7bjiPfMIpQ.png" /></figure><p>To give user Administrator access, select Administrator checkbox. Click Next and click Save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DNJgGOKB8xssghK4GCpVZQ.png" /></figure><p><strong>Verify user’s access</strong></p><p>Log on to Cloud Pak as a user in the group using SAML authentication. The URL is the hostname from <em>cpd</em> route. After you are authenticated by Azure, Cloud Pak retrieves the user and group from Active Directory and grants user access.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee293d2d9c24" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutorial: IBM Cloud Pak single sign-on (SSO) integration with IBM Security Verify]]></title>
            <link>https://medium.com/@yanni_zhang/tutorial-ibm-cloud-pak-single-sign-on-sso-integration-with-ibm-security-verify-bbbcbe4823d?source=rss-8152051f0291------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbbcbe4823d</guid>
            <dc:creator><![CDATA[Yanni Zhang]]></dc:creator>
            <pubDate>Mon, 09 May 2022 02:17:04 GMT</pubDate>
            <atom:updated>2022-05-10T21:15:07.318Z</atom:updated>
            <content:encoded><![CDATA[<h3>Prerequisites</h3><p>You have a subscription to <a href="https://www.ibm.com/verify/verify-identity">IBM Security Verify</a>.</p><p>You can run oc or kubectl command with admin access to the OpenShift cluster.</p><p>Your Cloud Pak is running IBM Could Pak foundational services version 3.17 or later. (To verify that, run <em>oc get csv -n ibm-common-services</em>, check the version for “IBM Cloud Pak foundational services”).</p><p>You have <a href="https://www.ibm.com/docs/en/cpfs?topic=cloudctl-installing">IBM Cloud Pak CLI </a>(cloudctl) installed.</p><h3>Set up SAML authentication</h3><h4>Enable SAML on IBM Cloud Pak</h4><p>You log on to your Cloud Pak cluster using cloudctl command as an administrator. You will be prompted to enter username and password. You can obtain the default admin login credential by following the <a href="https://www.ibm.com/docs/en/cpfs?topic=operator-accessing-cluster-console">guide</a>.</p><pre>cloudctl login -a &lt;cp-console URL&gt;</pre><p>You can obtain <em>cp-console</em> URL using <em>oc get route</em> command in foundational services namespace.</p><pre>oc get route cp-console -n ibm-common-services</pre><p>Then you can run the following cloudctl command to enable SAML.</p><pre>cloudctl iam saml-enable</pre><pre>Enabling SAML. This may take a few moments...<br>SAML enabled<br>OK</pre><p>Export your Cloud Pak SAML service provider metadata file. Use -f option to specify a filename of your choice.</p><pre>cloudctl iam saml-export-metadata -f cloudpak-sp-meta.xml</pre><pre>SAML configuration content exported to cloudpak-sp-meta.xml<br>OK</pre><p>To complete the SAML metadata exchange, you follow the next section to enable SAML for the Cloud Pak on your IBM Security Verify service.</p><h4>Create IBM Cloud Pak application on IBM Security Verify</h4><p>You log on to your Verify service. Click on the person icon to the upper right corner and select Switch to admin. From the admin console, click Add an application.</p><p>Click Add application blue button. From Select Application Type panel, click Custom Application, then click Add application button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nlNrzGhpJJ34-N5Gtz8hBQ.png" /></figure><p>Give the application a name, and provide company name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tjWQ0x_gLFpNVsC4ff_YEA.png" /></figure><p>Click Sign-on tab. Make sure Sign-on method is SAML 2.0. IBM Security Verify does not ask you to upload the service provider metadata file. You can fill in the information in Sign-on page using the data from cloudpak-sp-meta.xml file. Provider ID is the unique identifier of the service provider. Open the cloudpak-sp-meta.xml file and search for entityID. Copy the value to Provider ID box. The Assertion consumer service URL is the endpoint on IBM Cloud Pak that Verify service will send the authentication response to. From cloudpak-sp-meta.xml file, search for md:AssertionConsumerServic element, copy Location attribute value to Assertion consumer service URL box. IBM Cloud Pak SAML flow is initiated from service provider, so leave the checkbox Use identity provider initiated single sign-on unchecked. Service provider SSO URL is the endpoint that initiates the authentication process. Put the cp-console URL you obtained earlier from cp-console route to the box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AyuuAeqkqO-zDnhLlee0sg.png" /></figure><p>It is a good practice to use digital signature to protect data integrity and identify the message sender. You can upload the Cloud Pak’s certificate to the Verify service. You do it from Certificates page. Before navigating to Certificates page, uncheck the three checkboxes under Signing certificate and save the application.</p><p>From left hand side menu list, click Security, and click Certificates. You want to upload the IBM Cloud Pak SAML certificate to Signer certificates list. Open cloudpak-sp-meta.xml file, search for &lt;md:KeyDescriptor use=”signing” &gt;, copy the value of ds:x509certificate to a separate file, and add the pre-boundary line and post-boundary line for PEM certificate format, save it.</p><pre>-----BEGIN CERTIFICATE-----<br>MIIDUjCCAjqgAwIBAgIRANxo5awaXkWhBzyzPDib0xkwDQYJKoZIhvcNAQELBQAw<br>HDEaMBgGA1UEAxMRY3MtY2EtY2VydGlmaWNhdGUwHhcNMjIwMjI2MDIyNjI4WhcN<br>MjMwMjI2MDIyNjI4WjAdMRswGQYDVQQDExJtYW5hZ2VtZW50LWluZ3Jlc3MwggEi<br>MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIUwMdGf8ZVSfTQA5Zf9ARdElQ<br>QSAT2UZBJhbPsg9mETE2kHrhwSb7GB3IwPPJ357nlkXKIVQs03W6k6nRaWGaPBk5<br>aDcatu7KCIBskTFkAiJGiws8JYsq2VYdCTE7TX81DaViFdoS7kuVPtw97B4zlZ6l<br>FtzMVbZp8HbtexRMiCy2Bqr3fAmcHqdw8UFw+ALaMDWhWof+AUeZboOAjqgMraJ7<br>dE9qZBPvuAPK8teJw5xJS7Zse4N7N0LV8gg4hKMgP01DylS+ot4YZauqqxFCTFTT<br>M7PDjw/QmI/R94Ury8B1LP2e+zeGxmrDaReY1ttaOnJBtYpTJbdU9zSTm4XhAgMB<br>AAGjgY0wgYowDgYDVR0PAQH/BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMAwG<br>A1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUaynDedtBb+wdFZ+ThYqYpD/fTTUwNAYD<br>VR0RBC0wK4IpY3AtY29uc29sZS5hcHBzLnR3aWxpZ2h0Mi5jcC5meXJlLmlibS5j<br>b20wDQYJKoZIhvcNAQELBQADggEBAEMfh5KdLQwI69scZM964UE48JUSfDz4ErCC<br>aNhn43OGaK9E5PZ0yvZYRmVRjivnIRtFnJBlYLre0wybVnE+DBWGz+fOZz0cotEd<br>HiLARWiE7qNC+cp12ZEcWOnq3we28rXaA22r1s+eLB/ZjFKRHeq7oEzfDfmQoXaa<br>Ks7j7yvQRYYMFrtm1VXGNrtN44A/WN7s9rwt0RR+QuDCPIGMIlLknyur3DxaopF6<br>9drUSy1m2MCl43VycfW6CSPWu9a+leaA+iWVt97I3tVEMsDz0eoO3Kam2RdenQmI<br>cQWLMSNclrhrmGjWJxie+zPazdPe2uPjQfdooWZWvW6ng9pe+WY=<br>-----END CERTIFICATE-----</pre><p>On the Verify service Certificates page, click Add signer certificate, then click Add file to upload the certificate file you just saved. Provider a friendly name and click Ok to save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e610lIfQlLdicG-QZ92RXg.png" /></figure><p>From Applications menu, open the application you saved, and click on Sign-on tab. Scroll down to Signing certificate, from the dropdown list, select server. Check the three checkboxes. In Service provider signer certificate dropdown list, select the certificate name you saved previously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sno35kO59v-5o2bHuDL4Aw.png" /></figure><p>Optionally, you can also enable the encryption by selecting the checkbox Encrypt assertion. In Service provider encryption certificate dropdown list, select the same certificate you saved previously. IBM Cloud Pak uses the same certificate for signing and encryption. Once this is enabled, during SAML handshake, the Verify service sends back the SAML response data with encrypted assertions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*knvUtOb1ZXFgy7VFO95J3w.png" /></figure><p>Click on Entitlements tab. Select Automatic access for all users and groups. You can also select the other two options to have more granular control on giving user entitlements. Click Save. Note that this gives user the entitlements to the Cloud Pak application on the Verify service. We will have a different section to talk about how to actually grant users access to the Cloud Pak service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*buGOg5CIFbn42qVR85XPsQ.png" /></figure><p>Click on Sign-on tab, and scroll to the right hand side. In Third party SaaS application SAML 2.0 configuration, scroll down to step 4 Upload the identity provider federation metadata. Click on the first link to download it to your local drive. As we configure a single SAML, we do not require user unique ID. If you enable user unique ID, make sure you download the file from the second link.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v8cEfPu-VzNaQDP5WueZUQ.png" /></figure><p>Go back to the terminal where you ran cloudctl commands and upload the Verify service SAML metadata to IBM Cloud Pak.</p><pre>cloudctl iam saml-upload-metadata -f federation_metadata.xml</pre><pre>Uploading SAML metadata. This may take a few moments...<br>POST https://cp-console.apps.daisy.cp.fyre.ibm.com/idmgmt/v1/saml/upload<br>SAML metadata uploaded<br>OK</pre><h4>Verify SAML authentication is enabled</h4><p>To verify SAML authentication is set up, you open cp-console URL from a browser, verify that Enterprise SAML shows as a login option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MVrmdViKrNRvKNE4RIg1DQ.png" /></figure><p>When you click on Enterprise SAML, you will see the Verify sign-in page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5CNvQ_PJiUcr28GCxZA7Wg.png" /></figure><h3>Configure to grant IBM Security Verify user access to Cloud Pak</h3><p>IBM Cloud Pak uses role-based access control. A role can be granted to the user directly or it can be granted to a user group. Administrator can assign a user or an identity provider group to the user group. An identity provider group can include users or other identity provider groups. Users inherit the role of the user group directly or indirectly from the identity provider group within the user group.</p><p>To allow the administrator to query IBM Security Verify users and groups, you can configure SCIM.</p><h4>Register an API client in IBM Security Verify</h4><p>On Cloud Pak application page, click API access tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jBQHXEqqS93Q1EcBg2bVhQ.png" /></figure><p>Click Add API client button, provide the name for the API client.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*7CVlGO6rFJomoLwIdCTHaw.png" /></figure><p>Scoll down to Access, select Read users and groups. Click Done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*c-K6ASNR_Vu80ZUH5pOgSQ.png" /></figure><p>On API access page, click Save. The client ID and secret are auto-generated once it is saved. Write down the client ID and secret.</p><h4>Create an IdP configuration for the Verify service on IBM Cloud Pak</h4><p>From the terminal where you logged on to cloudctl as default admin, run <em>cloudctl tokens </em>command.</p><pre>cloudctl tokens<br>Access token:  Bearer 0e45cb1c9e2f7fed13e71e8b640ce502663595db50eaae75b9e346b2959766741ef581b6444b03ac33c9f417434dad8c15af5eb5175f0ad5363a02848e6f26e133ef838d4add0d5804a363fb3ef168c65e58f2041b9bbaffd0de874f880ac3e33e2db962d570fdc0b50681c3e55e33152fb6465eff5d75c15a9c24f286d35879ed3b1b41fe1b698b1002e6bbb95885249fd279f1e34fe0e6adb7a26ce5bb8ca6c936c9e3127a3e78e28853eebd35b175ea5481aa7da99cec7bbe56811cb135f693acdc469404cffa0d4b3086b5cac9b7ce05b6d5690000e55f4bb79628392671e189b114ff5010dab22b968bf6b072b5f704df3706da17fb481587c5813ac073a94730cee94cc86134c8cdcd70461ce4b61334836adc1a7715a04df2ff4e45fd00e61d39b0eb27523cadff345c366deb5c4013acd7389fe557590687f0bfe35b1533310c240800a67fbf1650be42fa30fe47e46c89db64b46fb20c5ba3e33a40ecd27e4238dc04eb6bc07351710446cc1122d6ea1a49ee54e354bc38c0faea612c1243af147db9f1ffb87717ef934053b3b63c8c71e940f6a7c4fad74807a0d2a9cf07dc35d0956903952fe7914ad00bfa58d8af977d7b3ca81db8464220242a671c106e96980c49d84908f47493bc530fbb1af79c77d9f53656628b8f2279d269585165f03942965ce0a3741a9cf903c6d58e07e6c46f264f24951726e9e1ef<br>ID token:  sha256~Fs6h3b0qQRJ0vQxrkwL20Eh3JESW7kgraWnsb1tRGRS</pre><p>Set TOKEN variable using the access token.</p><pre>export TOKEN=0e45cb1c9e2f7fed13e71e8b640ce502663595db50eaae75b9e346b2959766741ef581b6444b03ac33c9f417434dad8c15af5eb5175f0ad5363a02848e6f26e133ef838d4add0d5804a363fb3ef168c65e58f2041b9bbaffd0de874f880ac3e33e2db962d570fdc0b50681c3e55e33152fb6465eff5d75c15a9c24f286d35879ed3b1b41fe1b698b1002e6bbb95885249fd279f1e34fe0e6adb7a26ce5bb8ca6c936c9e3127a3e78e28853eebd35b175ea5481aa7da99cec7bbe56811cb135f693acdc469404cffa0d4b3086b5cac9b7ce05b6d5690000e55f4bb79628392671e189b114ff5010dab22b968bf6b072b5f704df3706da17fb481587c5813ac073a94730cee94cc86134c8cdcd70461ce4b61334836adc1a7715a04df2ff4e45fd00e61d39b0eb27523cadff345c366deb5c4013acd7389fe557590687f0bfe35b1533310c240800a67fbf1650be42fa30fe47e46c89db64b46fb20c5ba3e33a40ecd27e4238dc04eb6bc07351710446cc1122d6ea1a49ee54e354bc38c0faea612c1243af147db9f1ffb87717ef934053b3b63c8c71e940f6a7c4fad74807a0d2a9cf07dc35d0956903952fe7914ad00bfa58d8af977d7b3ca81db8464220242a671c106e96980c49d84908f47493bc530fbb1af79c77d9f53656628b8f2279d269585165f03942965ce0a3741a9cf903c6d58e07e6c46f264f24951726e9e1ef</pre><p>Set HOST variable using the cp-console route.</p><pre>export HOST=cp-console.apps.twilight2.cp.fyre.ibm.com</pre><p>Run the idsource registration API to create a SAML configuration for the Verify service. Put the API client ID and secret value to client_id and client_secret attributes.</p><pre>curl -k -s  -X POST &quot;https://$HOST/idprovider/v2/auth/idsource/registration&quot; \<br>--header &quot;Content-Type: application/json&quot;   \<br>--header &quot;Accept: application/json&quot;   \<br>--header &quot;Authorization: Bearer $TOKEN&quot; \<br>--data-raw &#39;{<br>&quot;name&quot;: &quot;idp_saml_isv&quot;,<br>&quot;description&quot;: &quot;This is a saml isv config&quot;,<br>&quot;protocol&quot;: &quot;saml&quot;,<br>&quot;idp_type&quot;: &quot;isv&quot;,<br>&quot;scim&quot;: &quot;yes&quot;,<br>&quot;scim_base_path&quot;: &quot;https://myverify.verify.ibm.com/v2.0/&quot;,<br>&quot;jit&quot;: &quot;no&quot;,<br>&quot;config&quot;: {<br>  &quot;grant_type&quot;: &quot;client_credentials&quot;,<br>  &quot;token_url&quot;: &quot;https://myverify.verify.ibm.com/v1.0/endpoint/default/token&quot;,<br>  &quot;client_id&quot;: &quot;9b1df3bc-ef24-4341-a0b3-ce321908a96a&quot;,<br>  &quot;client_secret&quot;: &quot;rb8ulQ1p3S&quot;<br>},<br>&quot;token_attribute_mappings&quot;: {<br>  &quot;uid&quot;: &quot;userID&quot;,<br>  &quot;first_name&quot;: &quot;given_name&quot;,<br>  &quot;last_name&quot;: &quot;family_name&quot;,<br>  &quot;groups&quot;: &quot;groupIds&quot;,<br>  &quot;email&quot;: &quot;email&quot;<br>},<br>&quot;scim_attribute_mappings&quot;:{<br>  &quot;user&quot;:{<br>    &quot;displayName&quot;: &quot;name.formatted&quot;,<br>    &quot;principalName&quot;:&quot;userName&quot;,<br>    &quot;givenName&quot;:&quot;name.givenName&quot;,<br>    &quot;middleName&quot;:&quot;name.middleName&quot;,<br>    &quot;formatted&quot;:&quot;name.formatted&quot;,<br>    &quot;familyName&quot;: &quot;name.familyName&quot;<br>  },<br>  &quot;group&quot;:{<br>    &quot;principalName&quot;:&quot;displayName&quot;,<br>    &quot;created&quot;:&quot;meta.created&quot;,<br>    &quot;lastModified&quot;:&quot;meta.lastModified&quot;<br>  }<br>},<br>&quot;status&quot;: &quot;enabled&quot;<br>}&#39;</pre><h4>Grant user access to the IBM Cloud Pak</h4><p>Open cpd console in a browser. You can find the cpd console hostname using the following command.</p><pre>oc get route -n &lt;Cloud Pak namespace&gt;</pre><p>Log on to the Cloud Pak as the default admin user. Click Manage users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uuqqnz9OabywvJrlMZMU_w.png" /></figure><p>On Access control page, click Add users. Type in user name in the search box. Select the user and click Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jXypaQ0_Yv15O8eUg77l9Q.png" /></figure><p>Click Assign roles directly and click Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4F4edjkNJRx5_x-fYTbzkw.png" /></figure><p>Select the role you want to assign to the user and click Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NoYdqeqTEodUn_WBbStzew.png" /></figure><p>Click Add. You see the user is added to the Access control list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TS0s2mTU4fiDBDW50lXFpw.png" /></figure><p>Log out and re-log on as the added user Jessica. Verify that the user can access the Cloud Pak successfully.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbbcbe4823d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tutorial: IBM Cloud Pak single sign-on (SSO) integration with Ping Identity and Microsoft Active…]]></title>
            <link>https://medium.com/@yanni_zhang/tutorial-ibm-cloud-pak-single-sign-on-sso-integration-with-ping-identity-and-microsoft-active-8ee0bdf97688?source=rss-8152051f0291------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ee0bdf97688</guid>
            <dc:creator><![CDATA[Yanni Zhang]]></dc:creator>
            <pubDate>Thu, 05 May 2022 04:42:10 GMT</pubDate>
            <atom:updated>2022-05-10T21:15:44.636Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tutorial: IBM Cloud Pak single sign-on (SSO) integration with Ping Identity and Microsoft Active Directory</h3><h3>Prerequisites</h3><p>You have a subscription to <a href="https://www.pingidentity.com/en.html">Ping Identity</a>.</p><p>You can run oc or kubectl command with admin access to the OpenShift cluster.</p><p>Your Cloud Pak is running IBM Could Pak foundational services version 3.17 or later. (To verify that, run oc get csv -n ibm-common-services, check the version for “IBM Cloud Pak foundational services”).</p><p>You have <a href="https://www.ibm.com/docs/en/cpfs?topic=cloudctl-installing">IBM Cloud Pak CLI </a>(cloudctl) installed.</p><h3>Set up SAML authentication</h3><h4>Enable SAML on IBM Cloud Pak</h4><p>You log on to your Cloud Pak cluster using cloudctl command as an administrator. You will be prompted to enter username and password. You can obtain the default admin login credential by following the <a href="https://www.ibm.com/docs/en/cpfs?topic=operator-accessing-cluster-console">guide</a>.</p><pre>cloudctl login -a &lt;cp-console URL&gt;</pre><p>You can obtain <em>cp-console</em> URL using <em>oc get route</em> command in foundational services namespace.</p><pre>oc get route cp-console -n ibm-common-services</pre><p>Then you can run the following cloudctl command to enable SAML.</p><pre>cloudctl iam saml-enable</pre><h4>Exchange SAML metadata file with Ping Identity</h4><p>In SAML world, the software or service (such as Ping Identity) that performs user authentication plays the role of <em>identity provider.</em> The web application (such as IBM Cloud Pak) that requires user login plays the role of<em> service provider</em>. The XML-based metadata file contains configuration data for identity provider and service provider.</p><p>You can use the following command to export its metadata.</p><pre>cloudctl iam saml-export-metadata —-file &lt;sp-metadata file name&gt;.xml</pre><p>To import Ping Identity metadata file to the Cloud Pak, and complete the metadata exchange, you create an application for the Cloud Pak on Ping Identity as described in the next step.</p><h4>Create a Ping Identity application for IBM Cloud Pak</h4><p>You log on to your PingOne instance. From the menu you select Connections, then click + to create a new application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YYI06CmTXOjbdOREi3eIRw.png" /></figure><p>In the wizard, enter the application name, click “SAML Application”, and click “Configure”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JDhjFGgpast-vHuDfdqFFw.png" /></figure><p>Click “Select a file”, find the file you saved in running the <em>cloudctl iam saml-export-metadata </em>command. Ping Identity fills in the ACS URLs and Entity ID fields automatically. click Save button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_jIcQjLb7iKjo_xx8UXdKw.png" /></figure><p>Click Configuration tab, click Download Metadata to save Ping Identity metadata file to your local drive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AKQWYdfN4kflX_4DpdqC7w.png" /></figure><p>Now you can go back to the command line to upload the metadata file.</p><pre>cloudctl iam saml-upload-metadata --file &lt;idp-metadata file name&gt;.xml</pre><p>By default, Ping Identity has one attribute mapping that maps the saml_subject to User ID. So SAML response only includes this attribute. SAML subject NameID value is from the saml_subject mapping value.User ID is the unique identifier of a user entity in Ping Identity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*05I_Vc75QhzVzOrasQuhNw.png" /></figure><pre>&lt;saml:Subject&gt;<br>         &lt;saml:NameID&gt;dbdca82b-2bd5-4f2a-a8cd-3c101fb974bc&lt;/saml:NameID&gt;<br>         &lt;saml:SubjectConfirmation Method=&quot;urn:oasis:names:tc:SAML:2.0:cm:bearer&quot;&gt;<br>            &lt;saml:SubjectConfirmationData NotOnOrAfter=&quot;2022-05-05T00:14:38.541Z&quot; Recipient=&quot;https://cp-console.apps.twilight2.cp.fyre.ibm.com/ibm/saml20/defaultSP/acs&quot; InResponseTo=&quot;_hMtmdc7rZXXAidVb4KE4GwpYxzoFQVXu&quot; /&gt;<br>         &lt;/saml:SubjectConfirmation&gt;<br>&lt;/saml:Subject&gt;</pre><pre>&lt;saml:AttributeStatement&gt;<br>         &lt;saml:Attribute Name=&quot;saml_subject&quot; NameFormat=&quot;urn:oasis:names:tc:SAML:2.0:attrname-format:basic&quot;&gt;<br>            &lt;saml:AttributeValue xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:type=&quot;xs:string&quot;&gt;dbdca82b-2bd5-4f2a-a8cd-3c101fb974bc&lt;/saml:AttributeValue&gt;<br>         &lt;/saml:Attribute&gt;<br>&lt;/saml:AttributeStatement&gt;</pre><h4>Verify SAML authentication is enabled</h4><p>You can verify if SAML authentication is set up successfully using <em>cp-console</em> route. Open the URL from a browser window, and you will see Enterprise SAML link. When you click on it, it will take you to Ping Identity logon page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rdDTEoVm50EBRNr1SiPERQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mn-AI8kdjmQ1gekXqetRwg.png" /></figure><h3>Give Ping Identity user access to IBM Cloud Pak</h3><p>A common practice to grant user access is based on user’s group membership. Administrator can assign a role or multiple roles to a group, all the users in the group will inherit the same role. Administrator can also assign a role to the user directly. This requires a connection to be set up between the Cloud Pak and the user registry either through LDAP or SCIM API, so that administrator can query users and groups in the Cloud Pak and grant user access. In this tutorial, we talk about using LDAP to connect to the Microsoft Active Directory.</p><h4>Set up Active Directory connection</h4><p>Follow <a href="https://www.ibm.com/docs/en/cpfs?topic=users-configuring-ldap-connection">the steps </a>to set up a connection with Microsoft Active Directory. In the Filter settings, you want to make sure the Active Directory attribute specified in user filter is the attribute users will use as the login username in SAML authentication. You also want to make sure the Active Directory attribute specified in user filter matches the one specified for User ID map, and same for group filter and group ID map.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k9uSoDZM52Iq-Lqfp9BWGA.png" /></figure><h4>Configure Ping Identity SAML with Active Directory in Cloud Pak</h4><p>You register Ping identity as SAML identity provider to work with Active Directory connection on Cloud Pak using /idprovider/v2/auth/idsource/registration API.</p><pre>curl -k -s -X POST &quot;<a href="https://&/#39;$HOST&#39;/idprovider/v2/auth/idsource/registration&#39;">https://$HOST/idprovider/v2/auth/idsource/registration</a>&quot; \<br> — header &quot;Content-Type: application/json&quot; \<br> — header &quot;Accept: application/json&quot; \<br> — header “Authorization: Bearer $TOKEN” \<br> — data-raw ‘{<br>    “name”: “idp_saml_pingidentity”,<br>    “description”: “This is a saml ping identity”,<br>    “protocol”: “saml”,<br>    &quot;idp_type&quot;: &quot;default&quot;,<br>    &quot;jit&quot;: &quot;no&quot;,<br>    &quot;saml_ldap&quot;: &quot;Microsoft Active Directory&quot;,<br>    &quot;token_attribute_mappings&quot;: {<br>        &quot;uid&quot;: &quot;username&quot;,<br>         &quot;first_name&quot;: &quot;first_name&quot;,<br>         &quot;last_name&quot;: &quot;last_name&quot;,<br>         &quot;email&quot;: &quot;email&quot;,<br>         &quot;groups&quot;: &quot;groups&quot;<br>    },<br>    &quot;status&quot;: &quot;enabled&quot;<br>  }&#39;</pre><p>The $HOST is <em>cp-console</em> route. The $TOKEN is the access token for an administrator. After you log in using cloudctl, you can obtain the access token using <em>cloudctl tokens </em>command<em>. </em>You can get more information on the idsource API from <a href="https://www.ibm.com/docs/en/cpfs?topic=apis-identity-provider-api">here</a>. In the payload you want to make sure the attribute <em>jit</em> set to “<em>no” </em>and<em> saml_ldap</em> set to “<em>Microsoft Active Directory</em>”. When a user tries to login using SAML, user’s credential is verified by Ping Identity. After getting the SAML response from Ping Identity, Cloud Pak will obtain user attributes by querying the Active Directory based on the user login ID.</p><h4>Grant user access based on group membership in Cloud Pak</h4><p>You log on to the Cloud Pak using default admin credential. The login URL is <em>cpd</em> route hostname.</p><pre>oc get route cpd -n &lt;Cloud Pak namespace&gt;</pre><p>In Access Control page, create a new user group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vv4GTUz-i54pceEHW4T8Cw.png" /></figure><p>Follow the wizard to provide the name for the new group. Click Next. At the Users page, click Identity provider groups and search the target group by typing in the group name. Selected the group and click Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fn_TXS0p7M1xFlxOCRZMeg.png" /></figure><p>At Roles page, select the role you want to give to the group. Click Next, click Create to save the change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OzUQcZKgy0Isp1iPl96AGg.png" /></figure><p>From User groups page in Access control you can see the group and the list of users in the group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*595rRIjy_IwFqrXtBkk7qg.png" /></figure><h4>Verify user’s access</h4><p>Log on to Cloud Pak as a user in the group using SAML authentication. The URL is the hostname from <em>cpd</em> route. After you are authenticated by Ping Identity, Cloud Pak retrieves the user and group from Active Directory and grants user access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ja5mTYp47NqCj06oF-RNtQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ee0bdf97688" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Access Control Models in the Cloud]]></title>
            <link>https://medium.com/@yanni_zhang/data-access-control-models-in-the-cloud-1905a1d5a62b?source=rss-8152051f0291------2</link>
            <guid isPermaLink="false">https://medium.com/p/1905a1d5a62b</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Yanni Zhang]]></dc:creator>
            <pubDate>Fri, 14 Jan 2022 23:46:04 GMT</pubDate>
            <atom:updated>2022-01-14T23:46:04.514Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S_YqwAlg9v6DtqM_CCD4jw.png" /></figure><p>In the digital world, identity and access management is essential to keeping data and resource secure. As companies are moving to the cloud, there are new challenges regarding access control. Identities and services are growing exponentially. Services can be hosted on different cloud providers. Edge of the data center is no longer the boundary. It is necessary to re-evaluate existing access control models.</p><h3>Role-based access control (RBAC)</h3><p>Role-based access control has a long history and is widely adopted. Today, cloud providers are using it for identity and access management. Each role is associated with a set of permissions. Users are assigned to appropriate roles. You restrict what users can access based upon the role.</p><p>Role-based access control system simplifies access administration and user onboarding process, especially when it is used with the user group. LDAP is widely adopted in the industry as the user registry. You can set up LDAP group and add users to the group based on users’ responsibilities. Then you can assign the group to the role, so that all the users in the group have the same role.</p><p>Role can be hierarchical, meaning that the upper-level role can include permissions at the lower-level role. Role can also be mutually exclusive, for example, two roles are associated with two completely different sets of permissions. By properly defining permissions and roles, you can enforce separation of duty and least privilege access.</p><p>You can define a role as the abstraction of a collection of actions that a user can perform. It has no explicit association to the access target. When you grant user access, you use policy or a logical grouping to associate user with specific role to the target resources. In IBM Cloud Pak common services, you use the “team” to give a user with specific role access to specific resources. What access the user has on the resource is determined by the user’s role. This role design provides more granular approach to define access. In IBM Cloud, a resource is represented by CRN that comprise ten elements including service, scope, service instance, resource type and resource name. You can organize resource hierarchically and set access at different levels of the resource hierarchy. By separating resource out of role definition, it is a flexible way to grant access to either a specific resource or a group of resources that are with the same scope, under the same service, and so on. You can also define roles explicitly to include the resources. An example is RBAC in Kubernetes. The role or cluster role includes the target resource (API groups) and actions on each API group. Granting user access is by using the role binding or cluster role binding, which binds the subject (a user, group, or service account) to the reference role or cluster role.</p><h3>Attribute-based access control (ABAC)</h3><p>ABAC gives access based on user attributes, target resource attributes and other environmental factors. ABAC relies on policy rather than role to enforce security.</p><p>Extensible Access Control Markup Language (XACML) is the industry standard to write attribute-based access control policies in XML and evaluate access requests based upon the policies. XACML specification defines the syntax and the data flow. The major players in the flow are policy enforcement point (PEP), policy decision point (PDP), policy information point (PIP), and policy administration point (PAP). PEP is the entry point to direct the access request and response. PIP obtains the requested attributes from different sources. PAP writes and manage policies. PDP evaluates the policies and makes access decision. PIP, PAP and PDP can be on the centralized authorization service. PEP can be an end point on authorization service, ingress gateway to the authorization service, or with the applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wc_MHNLY5dh6Diogr2WTyQ.png" /></figure><p>In the industry, RBAC is the main authorization mechanism, and ABAC is getting wider adoption. Cloud providers can provide ABAC to complement RBAC. Kubernetes has an option to enable ABAC at API server by specifying ABAC as authorization mode and a user-defined policy file to use with it.</p><h3>Pros and Cons of RBAC and ABAC</h3><p>There are benefits and limitations on both models. RBAC is very well suited for centralized authorization, where roles and decision-making point are managed centrally by an authorization service. It works well in a relatively stable and structured environment where user identity is defined and the user can be authenticated through an identity provider, and access rule is based on user’s role and does not rely on other factors.</p><p>RBAC does not work well in a dynamic environment, where access decision can be based on other factors such as time, location, or device. It cannot address certain scenarios. For example, you want to provide anonymous access, or you allow the user to have just one time access. This is where attribute-based access control (ABAC) can come to play. Same as RBAC, ABAC is also suited for centralized authorization. In general, ABAC is not as widely used as RBAC. The downside of using XACML is that the policies can be over-complicated, this makes they hard to comprehend and maintain. The processing of attributes and evaluation of policies can also be complicated and may have performance issue.</p><p>You can probably consider RBAC as a special case of ABAC where role is the attribute of the user. Combining RBAC and ABAC in the implementation may simplify the implementation and reduce costs.</p><p>Today more and more monolithic applications are decomposed to micro services. Enterprise applications are crossing boundary of data center and even different cloud providers. It is inevitable that access control mechanism and authorization model will need to evolve to address new business requirements. There may not be a single standard that can fit into what we try to solve, but we can learn from existing patterns, adopt the principles, and come up with solutions to address the complex business scenarios.</p><h3>References</h3><p><a href="https://cloud.ibm.com/docs/account?topic=account-crn">Cloud Resource Names</a></p><p><a href="http://docs.oasis-open.org/xacml/3.0/xacml-3.0-core-spec-os-en.html">eXtensible Access Control Markup Language (XACML) Version 3.0</a></p><p><a href="https://www.ibm.com/docs/en/cpfs?topic=guide-role-based-access-control-clusters">IBM Cloud Pak foundational services</a></p><p><a href="https://kubernetes.io/docs/reference/access-authn-authz/rbac/">Using RBAC authorization</a></p><p><a href="https://kubernetes.io/docs/reference/access-authn-authz/abac/">Using ABAC authorization</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1905a1d5a62b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build Security in Kubernetes Operators]]></title>
            <link>https://medium.com/ibm-cloud/how-to-build-security-in-kubernetes-operators-c7b6eaa76530?source=rss-8152051f0291------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7b6eaa76530</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[ibm-cloud]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[containers]]></category>
            <dc:creator><![CDATA[Yanni Zhang]]></dc:creator>
            <pubDate>Thu, 15 Apr 2021 21:02:28 GMT</pubDate>
            <atom:updated>2021-04-15T21:02:28.050Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Building security into your Kubernetes operators</strong></h3><p>Authors: <a href="https://medium.com/@posriniv">Srinivas Pothuraju</a>, <a href="https://medium.com/@yanni_zhang">Yanni Zhang</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*9kVGkNOxAmo1SGXLRg7Axw.jpeg" /></figure><p>Kubernetes has evolved into the dominant container orchestration platform. It is known as the <a href="https://www.cncf.io/cncf-kubernetes-project-journey/">“Linux of the cloud”</a> for a reason, and continues to gain market share today. Kubernetes is open source, highly scalable and available, flexible enough to run on various cloud infrastructures, automatable, and most significantly, configurable and accessible on an on-demand basis. For example, you can deploy an application, increase its capacity on demand, upgrade to the next version seamlessly, gain insights into health and performance, and backup, restore, and reconfigure with ease. These capabilities can all be accomplished by using Kubernetes operators.</p><p>Operators are an extension of the Kubernetes API server. Operators automate the management of applications or service lifecycles on behalf of a human operator. More companies are moving toward building and using Kubernetes operators in production environments. While the full potential of operators hasn’t been reached, it’s important to not lose sight of the importance of building in security as early as possible in the creation process. As an extension of Kubernetes, operators might require more privileges to perform their tasks than other microservices for applications. While the gains of switching to operators are great, from a security perspective, it means that there’s more potential risk if compromised.</p><p>IBM Cloud Pak foundational services went through the journey of converting all of their common service helm charts into optimized operators. The purpose of this blog is to share what IBM Cloud Pak foundational services did to ensure the security of their operators.</p><h3>Minimize cluster-scope and namespace-scope permissions</h3><p>You can classify an operator as either namespace-scoped or cluster-scoped based on where you want the operator to operate. A namespace-scoped operator watches and manages resources within a namespace. A cluster-scoped operator watches and manages resources across multiple or all namespaces within a cluster.</p><p>Depending on how you classify your operator, operators require permissions at the namespace or cluster level to perform certain operations or access Kubernetes resources. These permissions can be granted by creating role bindings and cluster role bindings that bind the operator’s service account to the required roles and cluster roles. You must carefully assess and understand what access is required for the operation on certain API groups, and limit the required permissions to that access level in the role and the cluster role that is associated with the operator’s service account. In other words, permissions should be as restrictive as possible.</p><h4>Avoid wildcards</h4><p>In Kubernetes, you can use the wildcard character (*) in role or cluster role definitions. A role or cluster role includes a list of rules. Each rule is a set of API groups, resources, and verbs. The rule binds together resources in the API groups and actions. If the wildcard character (*) is used under resources and verbs (as shown in the following example), it means that we allow every possible operation to be performed on all of the resources under the API group:</p><pre>rules:<br>- apiGroups:<br>  - admissionregistration.k8s.io<br>  resources:<br>  - *<br>  verbs:<br>  - * </pre><p>A rule definition like the preceding example in the role or cluster role would not cause any problem with how the operator functions. The problem is that it’s too permissive and might be dangerous. You might unknowingly provide privileged access to resources that you didn’t intend on providing per your requirements. Instead of using the wildcard character, the best practice is to explicitly list out each API group, verb, and resource as shown in the following rule definition:</p><pre>rules:<br>- apiGroups:<br>  - admissionregistration.k8s.io<br>  resources:<br>  - mutatingwebhookconfigurations<br>  verbs:<br>  - get<br>  - list<br>  - watch<br>  - create<br>  - update<br>  - patch<br>  - delete</pre><h4>Reduce the usage of cluster level permissions</h4><p>In general, cluster-scoped operators require access to resources across the entire cluster and need cluster level permissions. This permission is obtained by using cluster roles and cluster role bindings. Namespace-scoped operators require access only to resources in a single namespace and these permissions can be obtained by using roles and role bindings. You might come across situations where a namespace-scoped operator must create a cluster-scoped Kubernetes resource, for example, a CustomResourceDefinition (CRD) which is a cluster-scoped Kubernetes resource. Whenever there is a cluster-scoped Kubernetes resource involved, even a namespace-scoped operator requires cluster level permissions. Cluster roles and cluster role bindings have to be used instead of roles and role bindings.</p><p>Using cluster level permissions is often not the preferred way of handling permissions because it gives the operator’s service account access to the entire cluster. This might allow the operator permission to do things that it is not intended to do. You need to evaluate whether certain operations can be changed to avoid the dependency on cluster level permissions. For example, Jetstack’s Cert-Manager can automate the management and issuance of TLS certificates. It has three Kubernetes custom resource types: certificate, issuer, and cluster issuer. When the operator uses issuer instead of cluster issuer to sign a certificate, it avoids requiring the cluster permission.</p><p>Also, if there are static cluster-scoped resources whose definition won’t change based on the inputs given to the operators, you can move the creation of those resources to the Operator Lifecycle Manager (OLM) catalog. For example, you can move CRD creation from your operator to OLM since it doesn’t change throughout the operator’s lifecycle. IBM Cloud Pak foundational services did this exactly for the IBM IAM operator. Since OLM has cluster administrator privileges, it can deploy the cluster-scoped resource and no additional permissions have to be given to the operator for its creation.</p><h4>Document all cluster permissions for your customer</h4><p>In spite of every effort, it’s sometimes unavoidable to give operators cluster level permissions. For example, some operators need to create customized cluster-scoped resources such as cluster role bindings or cluster roles depending on the use case. In that case, make sure that all of the cluster level permissions are properly documented and consumers of the product are aware of the permissions that you’re assigning.</p><h3>Pod security policies and security context constraints</h3><p>Containers are not totally isolated from their hosts. A privileged process running as root inside the container is similar to a privileged process running on the host itself. They can affect the host and other containers running on the same host if the process running inside the container has vulnerable code. Similarly, the usage of host path volumes allows files on the host node to be accessible from the container. If a container is compromised, the attacker can easily gain access to the host node and attack the host and other containers running on the host. To solve this problem, Kubernetes provides security context for containers to control the privileges of the processes running inside it. Kubernetes also provides pod security policies that enable the administrator to configure policies to enforce security on every container running on the cluster.</p><p>Security context and pod security policies are useful tools to secure any container. Since the operator process also runs as a container in a Kubernetes cluster, you can leverage the same concepts to enhance the security of your operator container too.</p><h4>Security context</h4><p>Security context defines the pod or container’s privileges and access control settings. Adding the following security context to a container ensures that the process inside the container doesn’t run as root or in privileged mode. It also ensures that the root file system of the container is read only. It’s important for the operator container to use such restrictive security context:</p><pre>securityContext:<br>  allowPrivilegeEscalation: false<br>  privileged: false<br>  readOnlyRootFilesystem: true<br>  runAsNonRoot: true</pre><p>For more information about security context, see <a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/">Configure a Security Context for a Pod or Container</a> in the Kubernetes documentation.</p><h4>Pod security policies</h4><p>Policies can be set centrally in the cluster by the administrators using pod security policies to prevent running pods/containers with high privileges and host access. Essentially, a Pod Security Policy is a cluster-scoped resource that define a set of conditions that a pod must run with in order to be accepted into the system. For more information about the conditions that can be set, see <a href="https://kubernetes.io/docs/concepts/policy/pod-security-policy/#what-is-a-pod-security-policy">What is a Pod Security Policy?</a> in the Kubernetes documentation.</p><p>To leverage pod security policies, you have to enable the admission controller in the Kubernetes API server. For more information about enabling the controller, see <a href="https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#how-do-i-turn-on-an-admission-controller">How do I turn on an admission controller</a> in the Kubernetes documentation. After enabling the admission controller, you can create a restrictive pod security policy as shown in the following example, and all of the authenticated users and service accounts must be provided with use access to that pod security policy as demonstrated in <a href="https://kubernetes.io/docs/concepts/policy/pod-security-policy/#via-rbac">Enabling pod security policies via RBAC</a>. Providing use access ensures that the admission controller doesn’t permit any pod access if it doesn’t satisfy the conditions that you set in the pod security policy.</p><pre>apiVersion: policy/v1beta1<br>kind: PodSecurityPolicy<br>metadata:<br>  name: example<br>spec:<br>  privileged: false  # Don&#39;t allow privileged pods!<br>  allowedHostPaths: false # Don&#39;t allow pods using host paths<br>  hostNetwork: false # Don&#39;t allow pods running with hostnetwork<br>  hostPort: false # Dont&#39; allow pods running with hostport</pre><p>Some distributions of Kubernetes may not have pod security policies. If they don’t, they do have something similar to it. For example, the OpenShift Container Platform has Security Context Constraints (SCCs) which serve a very similar function. For more information about SCCs, see <a href="https://docs.openshift.com/container-platform/4.7/authentication/managing-security-context-constraints.html">Managing security context constraints</a> in the OpenShift Container Platform documentation.</p><h3>Continuous security scans</h3><p>Finally, it’s extremely important to scan your source code and perform penetration testing from time to time. Continuously scanning helps to identify vulnerabilities and pick up the latest security bug fixes in Go, Kubernetes, and the operator container’s base image. Being diligent in keeping your environment up-to-date pays off by mitigating the risk of vulnerabilities.</p><p>For more information about what you can do with foundational services, see <a href="https://www.ibm.com/docs/en/cloud-paks/1.0?topic=cloud-pak-foundational-services">IBM Cloud Pak foundational services</a> in IBM Docs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7b6eaa76530" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ibm-cloud/how-to-build-security-in-kubernetes-operators-c7b6eaa76530">How to Build Security in Kubernetes Operators</a> was originally published in <a href="https://medium.com/ibm-cloud">IBM Cloud</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[4 Tips to Build a Successful Distributed Agile Team]]></title>
            <link>https://medium.com/@yanni_zhang/4-tips-to-build-a-successful-distributed-agile-team-7ea674780262?source=rss-8152051f0291------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ea674780262</guid>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[communication]]></category>
            <category><![CDATA[agile-methodology]]></category>
            <category><![CDATA[agile-development]]></category>
            <category><![CDATA[remote-working]]></category>
            <dc:creator><![CDATA[Yanni Zhang]]></dc:creator>
            <pubDate>Thu, 02 Jul 2020 13:31:24 GMT</pubDate>
            <atom:updated>2020-07-06T14:26:31.579Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JllI1a_RnRkGId4qre09lA.jpeg" /></figure><p>One principle behind Agile manifesto indicates that having face-to-face communication is the most efficient and effective method of conveying information. The benefits of having all members of a squad at the same location are obvious. In reality, there are many reasons that a team is distributed at different geographic location. At worst case, your team is at the opposite time zone. When you just start your work in the morning, half of the team is at their nighttime. Finding a good time for all team members to meet can become challenging. So how do we overcome the obstacle to build a high performing team?</p><h3>Come together in person at the beginning</h3><p>Visit the remote team and spend a short period of time together if possible. This is very useful and proves to be effective. You have the chance to get to know the team members in person, understand their work environment, experience their work style and office culture. You have direct visibility to their skills, strength and weakness. You can directly share project goals, do knowledge transfer, identify best way for communication, and set up success criteria.</p><h3>Designate a lead at the remote site</h3><p>When having the whole team to do daily stand-up is not realistic, your solution is to designate a lead at the remote site to run the daily stand-up there. He is the point person who you communicate regularly to understand the team members’ work progress at the remote site. You still get everyone together for sprint planning and sprint exit meetings.</p><h3>Build trust</h3><p>Trust is the foundation of remote work relationship. Your real-time interaction with remote members is limited. To foster trust between you and members, you want to be clear on the expectation to the members at the beginning of the project and sprint planning, set your focus on the result rather than hours, respond promptly to remote member’s messages, be transparent, and make sure the remote team has access to the same information as local team.</p><h3>Adopt asynchronous communication</h3><p>In computer, asynchronous communication is a transmission mechanism to connect to other devices without waiting for immediate response data. Nowadays, many companies adopt slack and other communication platforms for team collaboration. But if not used wisely, it can make people feel they are at a constant meeting around the clock. The key to use slack with remote team is to treat it as the asynchronous communication vehicle. Be sensitive to the time zone difference, you can leave the inquiry and discussion topic in the channel and let people respond in their work hour.</p><p>The principles and practices of Agile are essentially the same for co-located and distributed projects. Hopefully these tips will help you overcome the additional challenges, and build the team that will lead to project’s success.</p><p>📝 Save this story in <a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_read_later_text">Journal</a>.</p><p>👩‍💻 Wake up every Sunday morning to the week’s most noteworthy stories in Tech waiting in your inbox. <a href="https://usejournal.com/newsletter/noteworthy-in-tech/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_text">Read the Noteworthy in Tech newsletter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ea674780262" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use Image signing in IBM Cloud Private 3.2.1]]></title>
            <link>https://medium.com/ibm-cloud/how-to-use-image-signing-in-ibm-cloud-private-3-2-1-bf4cec744392?source=rss-8152051f0291------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf4cec744392</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[ibm-cloud]]></category>
            <category><![CDATA[ibm-cloud-private]]></category>
            <dc:creator><![CDATA[Yanni Zhang]]></dc:creator>
            <pubDate>Mon, 14 Oct 2019 15:17:14 GMT</pubDate>
            <atom:updated>2019-10-14T15:17:14.483Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>How to Use Image Signing in IBM Cloud Private 3.2.1</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CESN9Gs9roSFuNCa2glzgg.jpeg" /></figure><p>The newly released IBM Cloud Private version 3.2.1 comes with an image signing technology preview feature that provides extra security. Image signing brings IBM Cloud Private security capabilities that include Docker notary service and image enforcement policy together with Docker content trust to provide a trust infrastructure for container images.</p><p>Learn how to set up the image signing feature and deploy an application image to the IBM Cloud Private cluster.</p><h4><strong>Prerequisites</strong></h4><p>Make sure that the following components are installed.</p><ul><li>Notary service is installed on your IBM Cloud Private cluster.</li><li>Docker environment is set up on another system.</li></ul><p>The following resources are used for the purposes of this blog.</p><ul><li>The system with Docker installed is referred to as the “build system”.</li><li>The IBM Cloud Private cluster is referred to as the “target system”.</li><li>The IP address for the IBM Cloud Private master node is 9.1.2.3.</li><li>The notary server URL is <a href="https://9.1.2.3:8443/notary.">https://9.1.2.3:8443/notary.</a></li><li>The Docker registry is artifactory<em> hyc-cloud-private-docker-local.artifactory.swg-devops.com</em>. You can use docker.io or set up your own registry to try it out.</li><li>The application image used is <em>nginxdemos/hello</em> from docker.io. You can also build your own sample image.</li><li>The signer key and certificate are created using OpenSSL.</li></ul><h4>Sign the Docker image</h4><p>First, complete the following steps to sign the image by using Docker content trust on the build system.</p><ol><li>Generate the key and certificate pair by using OpenSSL. Change the <em>key.pem</em> file permission to 400. We will use this key as the image signing key.</li></ol><pre>openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem<br>chmod 400 key.pem</pre><p>2. Load the key to the local Docker trust repository. When you run the command to load the key, you are prompted to enter a passphrase to protect the key. The passphrase is required when you execute other Docker content trust commands to access the key.</p><pre>docker trust key load key.pem —name helloapp-signer</pre><p>3. Log in to docker.io and pull the <em>hello</em> docker image. Retag the image with the artifactory repository name.</p><pre>docker pull docker.io/nginxdemos/hello<br>docker tag nginxdemos/hello:latest hyc-cloud-private-docker-local.artifactory.swg-devops.com/integrate/hello-app:latest</pre><p>4. Enable Docker content trust and point the trust server to the IBM Cloud Private notary service.</p><pre>export DOCKER_CONTENT_TRUST=1<br>export DOCKER_CONTENT_TRUST_SERVER=https://9.1.2.3:8443/notary</pre><p>5. Register the certificate generated in step 1 with the image repository. The certificate name specified in the command must match the key name specified in the command in step 2.</p><pre>docker trust signer add --key certificate.pem helloapp-signer hyc-cloud-private-docker-local.artifactory.swg-devops.com/integrate/hello-app</pre><p>If you are running this command for the first time, you will see message: “<em>You are about to create a new root signing key passphrase. This passphrase will be used to protect the most sensitive key in your signing system…</em>”.</p><p>The message occurs because the command creates an offline key as the root for the Docker content trust. This is a one-time operation. The next time that you run the command, it will prompt you for the root key passphrase. If you are using the certificate to add this image repository for the first time, the repository entry will be created on the Docker system.</p><p>You might see error, “ <em>Error: error contacting notary server: x509: certificate signed by unknown authority</em>”. The error means that the build system does not trust the notary server signer certificate. You need to add the notary certificate to the build system truststore.</p><p>6. Log in to the artifactory registry from the build system, sign, and push the image. The Docker sign operation signs the image and pushes the trust metadata to the notary server. It prompts you to enter the signer key passphrase. The Docker push operation pushes the image to the registry.</p><pre>docker login hyc-cloud-private-docker-local.artifactory.swg-devops.com</pre><pre>docker trust sign hyc-cloud-private-docker-local.artifactory.swg-devops.com/integrate/hello-app:latest</pre><pre>docker push hyc-cloud-private-docker-local.artifactory.swg-devops.com/integrate/hello-app:latest</pre><h4><strong>Deploy the signed image</strong></h4><p>Next, on the target system, in the default namespace, set up the image policy to enforce image signing.</p><ol><li>Create an imagePullSecret called <em>imagepull-secret</em>. The secret stores the credentials to pull the image from the Docker registry.</li></ol><pre>kubectl create secret docker-registry imagepull-secret --docker-server=hyc-cloud-private-docker-local.artifactory.swg-devops.com  --docker-username=&lt;username&gt; --docker-password=&lt;password or API key&gt; --docker-email=&lt;email&gt; -n default</pre><p>2. Create a signer secret called <em>signer-secret</em>. The name in the secret must match the signing key name. The publicKey in the secret is the certificate file of the signing key.</p><pre>kubectl create secret generic signer-secret --from-literal=name=helloapp-signer --from-file=publicKey=certificate.pem -n default</pre><p>3. Create the image policy and deploy it to the default namespace. IBM Cloud Private supports cluster image policy and image policy for a namespace. It comes with a default cluster image policy that whitelists image registries. An image policy defined for a namespace overrides the cluster image policy. The trust section in the policy for a repository defines whether the trust is enabled, and what the signer secret and trust server are. When the trust is enabled, only the signed image which is successfully verified by the image signing can be deployed on the cluster. In the image policy file, make sure you put the secret created in step 2 in the signerSecrets.</p><pre>apiVersion: securityenforcement.admission.cloud.ibm.com/v1beta1<br>kind: ImagePolicy<br>metadata:<br>  name: demo-image-policy<br>spec:<br>  repositories:<br>  - name: hyc-cloud-private-docker-local.artifactory.swg-devops.com/integrate/*<br>    policy:<br>      trust:<br>        enabled: true <br>        signerSecrets:<br>        - name: signer-secret<br>        trustServer: https://9.1.2.3:8443/notary</pre><p>4. Create the deployment file for the hello-app application and deploy it to the default namespace. Make sure that you put the secret created in step 1 to imagePullSecrets in the deployment file. As the image signature is verified, the pod with the container is created successfully during deployment.</p><pre>apiVersion: extensions/v1beta1<br>kind: Deployment<br>metadata:<br>  name: helloapp-signed<br>spec:<br>  replicas: 1 <br>  template:<br>    spec:<br>      containers:<br>      - image: hyc-cloud-private-docker-local.artifactory.swg-devops.com/integrate/hello-app:latest<br>        name: helloapp-signed<br>        ports:<br>        - containerPort: 80<br>      imagePullSecrets:<br>      - name: imagepull-secret<br>      restartPolicy: Always</pre><h4>Conclusion</h4><p>With the image signing feature, you can ensure that the workload application image that is deployed to your private cloud environment is trusted. And it is not tampered with in the registry or on the way to the deployment. Enterprises can also integrate the feature into their CICD pipeline automation to ensure a greater level of security.</p><h4>References</h4><ul><li><a href="https://www.ibm.com/support/knowledgecenter/SSBS6K_3.2.1/manage_images/notary_server.html">Using a notary for image signing</a></li><li><a href="https://www.ibm.com/support/knowledgecenter/SSBS6K_3.2.1/manage_policies/image_policy_signing.html">Image signing support for image policies</a></li></ul><h4>Acknowledgement</h4><p>The author wants to acknowledge <strong>Jayashree Ramanathan, Suresh Kumar, Shrinath Sanjay Thube, Kyle Oldham </strong>and<strong> Lesia Cox </strong>from IBM Cloud Private team for their contribution to this article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf4cec744392" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ibm-cloud/how-to-use-image-signing-in-ibm-cloud-private-3-2-1-bf4cec744392">How to Use Image signing in IBM Cloud Private 3.2.1</a> was originally published in <a href="https://medium.com/ibm-cloud">IBM Cloud</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>