<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: John Peterson</title>
    <description>The latest articles on Forem by John Peterson (@peters95).</description>
    <link>https://forem.com/peters95</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F387013%2Ffb969eae-f52e-45b7-833c-84de2233e5b4.jpeg</url>
      <title>Forem: John Peterson</title>
      <link>https://forem.com/peters95</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/peters95"/>
    <language>en</language>
    <item>
      <title>JFrog Xray &amp; Microsoft Teams</title>
      <dc:creator>John Peterson</dc:creator>
      <pubDate>Thu, 30 Jul 2020 22:50:09 +0000</pubDate>
      <link>https://forem.com/jfrog/jfrog-xray-microsoft-teams-4gbh</link>
      <guid>https://forem.com/jfrog/jfrog-xray-microsoft-teams-4gbh</guid>
      <description>&lt;h1&gt;JFrog Xray &amp;amp; Microsoft Teams&lt;/h1&gt;

&lt;p&gt;More than ever we need to be made aware when security issues arise. JFrog Xray is a great product that brings operational awareness to your software development lifecycle combined together with Microsoft Teams we have the channel of communication we need to ensure our team is always on top of the latest security concerns.&lt;/p&gt;

&lt;h3&gt;Getting Started&lt;/h3&gt;

&lt;p&gt;Let's get started by opening up Microsoft Teams. We will need to make a new connector on the channel we want to deliver our messages into. Click on the more options "..." icon to bring up the menu of options for a channel. Select "Connector app" to bring up the popup.&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X6uXdI_x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/okftblpbi341udgn34x2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X6uXdI_x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/okftblpbi341udgn34x2.png"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;Inside of the Connector popup search for "Incoming Webhooks" and click the "Add" button which will then bring you to the Configure screen shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BtXt6Bh8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1e36bqvyn5bgqby1gn1a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BtXt6Bh8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1e36bqvyn5bgqby1gn1a.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enter the name "Xray Webhook" and &lt;a href="https://github.com/jfrog/xray_msteam/raw/master/images/xray.png"&gt;download&lt;/a&gt; and save the Xray image to upload into the new webhook.&lt;/p&gt;

&lt;p&gt;Scroll down in the popup after adding the webhook to grab the URL for the incoming webhook&lt;/p&gt;

&lt;h3&gt;Deploy the integration server&lt;/h3&gt;

&lt;p&gt;Download the Github repo &lt;a href="https://github.com/jfrog/xray_msteam"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Build the code using Golang&lt;/p&gt;

&lt;p&gt;&lt;code&gt;go build&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Export environment variable MICROSOFT_TEAM_WEBHOOK with the URL of the incoming webhook&lt;/p&gt;

&lt;p&gt;&lt;code&gt;export MICROSOFT_TEAM_WEBHOOK=&lt;a href="http://the-incoming-webhook-url"&gt;http://the-incoming-webhook-url&lt;/a&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Run the integration server&lt;/p&gt;
&lt;p&gt;
&lt;code&gt;./xray_msteam&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;Grab the hostname/ip address of the machine running the integration server we will use this to supply to Xray webhook in the below format&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;a href="http://ip/host:8080/api/send"&gt;http://ip/host:8080/api/send&lt;/a&gt;&lt;/code&gt;&lt;br&gt;
This is the endpoint to send the messages from Xray. Last stop let's configure Xray to send the outgoing webhook.&lt;/p&gt;

&lt;h3&gt;Xray Outgoing Webhook&lt;/h3&gt;

&lt;p&gt;As an admin user, open up JFrog Unified Platform and goto the administration setting shown below for Xray&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gKKp06k0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/b6shza7wzkz78x76cdga.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gKKp06k0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/b6shza7wzkz78x76cdga.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on Webhooks and click on + New Webhook to open the new webhook screen. In this screen give a name and supply the URL of the integration server. Save the new webhook.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HbZ_LpgZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/eofe5i0j35sb1djfknvi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HbZ_LpgZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/eofe5i0j35sb1djfknvi.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next step is to add the new webhook to an Xray policy as a new rule. This is what will trigger the webhook when new violations are found in a watch associated to this policy.  Click on Policies and create a new policy or update an existing one to add a new rule using the webhook as shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IlJhGk5l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/466suhr46zl7nk23qnvx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IlJhGk5l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/466suhr46zl7nk23qnvx.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;That's it! Your done!&lt;/h3&gt;

&lt;p&gt;Congrats begin to watch the messages flow...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d_a_6aBs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cyh9spn9xfiroe55fgyh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d_a_6aBs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cyh9spn9xfiroe55fgyh.png"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>jfrog</category>
      <category>msteam</category>
      <category>security</category>
      <category>devsecops</category>
    </item>
    <item>
      <title>Artifactory &amp; Xray on Openshift via OperatorHub</title>
      <dc:creator>John Peterson</dc:creator>
      <pubDate>Wed, 27 May 2020 21:25:37 +0000</pubDate>
      <link>https://forem.com/jfrog/artifactory-xray-on-openshift-via-operatorhub-2cn3</link>
      <guid>https://forem.com/jfrog/artifactory-xray-on-openshift-via-operatorhub-2cn3</guid>
      <description>&lt;h2&gt;OpenShift Operators for JFrog Artifactory Enterprise &amp;amp; Xray&lt;/h2&gt;

&lt;p&gt;OpenShift Operators are a method of packaging, deploying, and managing a Kubernetes application. They help handle the complex details of running containerized software, monitoring the state of the OpenShift Container Platform to make automated real time operating decisions.&lt;/p&gt;

&lt;p&gt;The OpenShift operator now available for JFrog Artifactory Enterprise is compatible with OpenShift 4 and performs this automated monitoring for your deployment of Artifactory. It helps keep Artifactory running in your K8s cluster by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Setting up the correct RBAC policies to run JFrog Artifactory securely
&lt;/li&gt;
&lt;li&gt;
Deploying JFrog Artifactory in a high availability (HA) mode
&lt;/li&gt;
&lt;li&gt;
Provisioning the required storage and service endpoints
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The OpenShift operator now available for JFrog Xray is also compatible with OpenShift 4 and performs the same automated monitoring for your deployment of Xray. It helps keep Xray running in your K8s cluster by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Setting up the correct RBAC policies to run JFrog Xray securely
&lt;/li&gt;
&lt;li&gt;
Deploying Openshift certified RabbitMQ instance for enhanced security
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Deploying Artifactory Enterprise Instance via Operatorhub&lt;/h2&gt;

&lt;p&gt;Our first step will be to configure a Postgresql instance to be used by the JFrog Enterprise Operators as they require an external database to be configured ahead of time. In this case we picked Postgresql as we can then leverage the same component for both Artifactory &amp;amp; Xray.&lt;/p&gt;

&lt;h4&gt;Configure Artifactory Database&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;CREATE USER artifactory WITH PASSWORD 'password';&lt;br&gt;
CREATE DATABASE artifactory WITH OWNER=artifactory ENCODING='UTF8';&lt;br&gt;
GRANT ALL PRIVILEGES ON DATABASE artifactory TO artifactory;&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;Configure Xray Database&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;CREATE DATABASE xraydb WITH OWNER=artifactory ENCODING='UTF8';&lt;br&gt;
GRANT ALL PRIVILEGES ON DATABASE xraydb TO artifactory;&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;Create TLS Secret for Artifactory SSL&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;oc create secret tls tls-ingress --cert=tls.crt --key=tls.key&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;Access Openshift OperatorHub to install JFrog Artifactory Enterprise Operator&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://ibb.co/njdw4Kf" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FvkycfMm%2FScreen-Shot-2020-05-27-at-12-53-16-PM.png" alt="Screen-Shot-2020-05-27-at-12-53-16-PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Find new Artifactory HA Provided API under Installed Operators&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://ibb.co/Ny0HbRX" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2Fx7nRdZy%2FScreen-Shot-2020-05-27-at-12-51-21-PM.png" alt="Screen-Shot-2020-05-27-at-12-51-21-PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Click on the Artifactory HA Provided API to create a new instance&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://ibb.co/2ZMcLFS" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FmNyhYR0%2FScreen-Shot-2020-05-27-at-12-53-04-PM.png" alt="Screen-Shot-2020-05-27-at-12-53-04-PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Fill in all necessary fields marked with "OVERRIDE"&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://ibb.co/XS89qBZ" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2Ft8XS9fM%2FScreen-Shot-2020-05-27-at-12-55-04-PM.png" alt="Screen-Shot-2020-05-27-at-12-55-04-PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Use the "oc" CLI to view pods and external IP exposed from Openshift&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://ibb.co/Xb32TKW" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FPN9m8Pr%2FPods.png" alt="Pods"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Congratulations!&lt;/h4&gt;

&lt;p&gt;Next Steps&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
(Optional) Map DNS to the external IP
&lt;/li&gt;
&lt;li&gt;
Access Artifactory with default credentials 
&lt;code&gt;user: admin password: password&lt;/code&gt; 
&lt;/li&gt;
&lt;li&gt;
Update Artifactory credentials in the onboarding wizard
&lt;/li&gt;
&lt;li&gt;
Add at least one license per Artifactory node in the onboarding wizard
&lt;/li&gt;
&lt;li&gt;
Complete onboarding wizard with desired options selected
&lt;/li&gt;
&lt;/ul&gt; 

&lt;h2&gt;Deploying Xray Instance via Operatorhub&lt;/h2&gt;

&lt;p&gt;The following steps will assume you have deployed a Postgresql instance into Openshift with xraydb already created and granted permissions to the artifactory user.&lt;/p&gt;

&lt;p&gt;If you wish to use another database for Artifactory other than Postgresql you will need to create a Postgresql instance at this point as Xray requires Postgresql.&lt;/p&gt;

&lt;p&gt;Next we will deploy the Xray operator via the Operatorhub and create a new instance of Xray that will communicate to the Artifactory and Postgresql we just created in the prior steps. Let's head back to the Openshift web console to find the Xray Operator available to install below.&lt;/p&gt;


&lt;h4&gt;Access Openshift OperatorHub to install JFrog Xray Operator&lt;/h4&gt;
&lt;br&gt;
&lt;a href="https://ibb.co/njdw4Kf" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FvkycfMm%2FScreen-Shot-2020-05-27-at-12-53-16-PM.png" alt="Screen-Shot-2020-05-27-at-12-53-16-PM"&gt;&lt;/a&gt;

&lt;h4&gt;Find new Xray Provided API under Installed Operators&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://ibb.co/Ny0HbRX" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2Fx7nRdZy%2FScreen-Shot-2020-05-27-at-12-51-21-PM.png" alt="Screen-Shot-2020-05-27-at-12-51-21-PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Click on the Xray Provided API to create a new instance&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://ibb.co/PD9JQdJ" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2Fy4YKSrK%2FScreen-Shot-2020-05-27-at-1-18-00-PM.png" alt="Screen-Shot-2020-05-27-at-1-18-00-PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Fill in all necessary fields marked with "OVERRIDE"&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://ibb.co/HznKKP6" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2F1q800X1%2FScreen-Shot-2020-05-27-at-1-19-36-PM.png" alt="Screen-Shot-2020-05-27-at-1-19-36-PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Use the "oc" CLI to view pods and external IP exposed from Openshift&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://ibb.co/6WmwRgG" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2Fz4rxhGC%2FScreen-Shot-2020-05-27-at-1-21-02-PM.png" alt="Screen-Shot-2020-05-27-at-1-21-02-PM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Congratulations!&lt;/h4&gt;

&lt;p&gt;Next Steps&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Complete onboarding wizard with desired options for Xray
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Congratulations! We now have deployed Artifactory Enterprise and Xray into Openshift!&lt;/p&gt;

</description>
      <category>devops</category>
      <category>security</category>
      <category>kubernetes</category>
      <category>openshift</category>
    </item>
  </channel>
</rss>
