<?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 Harrison Lavin on Medium]]></title>
        <description><![CDATA[Stories by Harrison Lavin on Medium]]></description>
        <link>https://medium.com/@harrison-lavin?source=rss-79d5c06a0c73------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*5TIPV6tQKoeJhyHd.</url>
            <title>Stories by Harrison Lavin on Medium</title>
            <link>https://medium.com/@harrison-lavin?source=rss-79d5c06a0c73------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 18:57:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@harrison-lavin/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[IPA as a Service:]]></title>
            <link>https://harrison-lavin.medium.com/ipa-as-a-service-d9733019d783?source=rss-79d5c06a0c73------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9733019d783</guid>
            <category><![CDATA[s3]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Harrison Lavin]]></dc:creator>
            <pubDate>Tue, 23 Mar 2021 22:20:29 GMT</pubDate>
            <atom:updated>2021-04-01T13:37:03.301Z</atom:updated>
            <content:encoded><![CDATA[<h4>Serving iOS Binaries Directly to User Devices</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*93kn5jm0ZsKeiHVj_x5_qw.jpeg" /></figure><p>A Tidbit: installing the app you’ve been building on an iPhone can be tricky. If you’ve never run into this problem, I can tell you a quick solution. You need a server to host your IPA, a hand-crafted manifest.plist to tell the phone info about the IPA, and an href link that’ll start a call to the manifest via Apple’s itms-services:// protocol. The manifest needs to expose info about the ipa’s location on the server, its bundle identifier, bundle version, and title (most complete ones looks something like <a href="https://support.apple.com/guide/deployment-reference-macos/preparing-to-distribute-in-house-macos-apps-ior5df10f73a/web">this</a>).</p><p>A Problem: how do you scale that process so that any arbitrary user can download any arbitrary IPA out of hundreds, if not thousands?</p><p>A three-part solution: store the IPA’s info in a database, store the IPA itself in an S3 bucket, and generate the manifest on the fly in your web app.</p><p>My team just recently finished deploying that. The finished application consists of three microservices (GRANDSLAM, 3direct, and SHORTSTOP) and one client tool (Pitching Machine).</p><h3>How it works Now</h3><h4>Getting the IPA up there</h4><p>All of the binaries we process start from the same place: a mac server farm my team maintains. Once they’re built, they get handed off to Pitching Machine, which begins collecting information on them, and storing them within S3.</p><p>From a purely pragmatic standpoint, an .ipa file is just a specialized kind of archive, not too dissimilar to a .zip. This means that, if you rename the .ipa to .zip, you can use standard archive utilities to unzip it. This comes in handy for us, as unzipping it allows us access to the developer-defined Info.plist. We rely on that property list for a lot of information to populate the manifest.plist.</p><p>To achieve this with minimal overhead, Pitching Machine copies and transforms the ipa (cp ${filename}.ipa ${filename}.zip ), then unzips it, traversing down the resulting file tree until it finds an info.plist. Once located, the unzip stops and the info collection begins; the download manifest requires bundle-version and bundle-identifier, both of which are exposed in the Info.plist. In addition to the purely necessary manifest information, we store some extra facts in SHORTSTOP, the API sitting in front of our managed MariaDB. We collect the commit ID from the Jenkins git plugin, the app dev version from the IPA, and a rudimentary checksum.</p><h4>Storing in S3</h4><p>I wrote a little bit about <a href="https://medium.com/@harrison.lavin/taking-the-limits-off-an-s3-rest-api-6e5f7290260d">this</a> before, but suffice to say, we have an API sitting in front of an S3-compliant storage service. Pitching Machine splits the binary into chunks and uploads the chunks piecemeal, only completing the transaction when the API confirms it’s received every piece of the binary.</p><h4>Bringing it Back Down</h4><p>The retrieval process is fairly straightforward: we had a manifest service that would generate an XML doc on the fly, identical in structure to a generic manifest.plist. Given a particular artifact’s metadata from the database, we can then populate the manifest with the data required by Apple for proper installation. Then, all it takes is using the java-aws-sdk to getObject out of the S3 bucket, and stream the S3Obj’s content into application/octet-stream within our response entity¹.</p><p>¹Our team also uses the same web app for exposing Android builds; the overall process for android is much simpler: since it doesn’t require itms-services, you can just open up the octet-stream directly to the user without the manifest step</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9733019d783" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Taking the Limits Off An S3 REST API]]></title>
            <link>https://harrison-lavin.medium.com/taking-the-limits-off-an-s3-rest-api-6e5f7290260d?source=rss-79d5c06a0c73------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e5f7290260d</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[s3]]></category>
            <dc:creator><![CDATA[Harrison Lavin]]></dc:creator>
            <pubDate>Sat, 30 Jan 2021 21:19:07 GMT</pubDate>
            <atom:updated>2021-01-30T21:19:07.575Z</atom:updated>
            <content:encoded><![CDATA[<h4>Uploading Large Arbitrary Files in Chunks Into An S3 Object Store via RESTful API</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*FRY8U-7Y20H1yCBV-SEE8A.jpeg" /><figcaption>Self Storage, CC BY-SA 3.0 &lt;<a href="https://creativecommons.org/licenses/by-sa/3.0">https://creativecommons.org/licenses/by-sa/3.0</a>&gt;, via Wikimedia Commons</figcaption></figure><p>Our hybrid cloud presents an S3-like storage solution, but does not furnish an S3 CLI like AWS does. In order to make use of the buckets, we needed a bound app (such that it handled credentials, auth, etc). We wrote a simple gateway API (called 3direct, because I like bad wordplay) in Kotlin, and complemented it with a java jar we wrote to upload the files (we called it Pitching Machine, because the whole project has baseball-themed names). It works pretty well, but the initial setup posed a risk: the API’s cloud instances only had allowances for 2GB of memory, while most files we needed to upload would be up to 200MB. Since the files were saved into memory during the transfer, we would be limited to maybe a dozen simultaneous transfers before the whole thing crashed. Thankfully, the underlying java-aws-sdk exposes an API for multi-part uploads.</p><p>The Plan, front to back:</p><ol><li>Take an arbitrarily large file on local, split it into <em>x </em>number of split files, of <em>y </em>size each. For us, Pitching Machine used native java to split the file into 6MB chunks.</li><li>Initiate an upload via POST from Pitching Machine, containing the filename and a UUID (our process generates one earlier upstream). 3direct would cCreate a new entry in S3 via <a href="https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/model/InitiateMultipartUploadRequest.html"><em>InitiateMultipartUploadRequest</em></a>, set the to-be-created S3 object key to the UUID, save the original filename as an amz-metadata tag (so that, when downloaded, the file will have the same name), and return an uploadId to Pitching Machine.</li><li>Pitching Machine would then take all <em>x </em>split file chunks, and upload each file via PUT, specifying the part number in question, and the uploadId against which to file it. The API, receiving those chunks, invokes a <a href="https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/model/UploadPartRequest.html"><em>UploadPartRequest</em></a> and then returns a PartETag to Pitching Machine. That PartETag contains a part number, reflecting the 1-based index, bound to a small hash derived from the corresponding part itself.</li><li>Once all parts are uploaded, Pitching Machine collates the list of PartETags returned from each upload part, and sends a PATCH request containing them and the uploadId to 3direct. In turn, the API calls <a href="https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/model/CompleteMultipartUploadRequest.html"><em>CompleteMultipartUploadRequest</em></a>, returning a 200 and the file’s key (the initial UUID) to Pitching Machine. The file is now downloadable via a GET request to the API, referencing it by UUID.</li></ol><p>Since implementing the split uploads, we’ve seen near 100% stable up-time of the API, with uploads of 2 to 3 200MB files at a time completing quickly and stably in less than 5 minutes. As the storage system becomes more robust, we’re planning on sharing Pitching Machine with other teams, opening the uploads up to a wider variety of sources.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e5f7290260d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iDent, Or That Time I Accidentally Recreated Fastlane Match]]></title>
            <link>https://harrison-lavin.medium.com/ident-or-that-time-i-accidentally-recreated-fastlane-match-6ea1ca909a80?source=rss-79d5c06a0c73------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ea1ca909a80</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[fastlane]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[shell]]></category>
            <dc:creator><![CDATA[Harrison Lavin]]></dc:creator>
            <pubDate>Mon, 13 May 2019 23:26:49 GMT</pubDate>
            <atom:updated>2019-05-13T23:26:49.762Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SgvQlnU3Uae_E1AlzUEK0A.jpeg" /><figcaption>Credit: CC0 Public Domain</figcaption></figure><p>So, I work at a big company. Because my team builds and deploys all the iOS apps for our entire line of business, we’ve gotten a hold of 40 separate build nodes we’ve hooked into our Jenkins. We literally have more build real estate than we know what to do with. The downside? When I arrived on the team, we were maintaining those servers completely by hand. No shared configuration management, no automated reloads, nothing.</p><p>Most pertinent to this piece, though, was that we were managing signing certificates and provisioning profiles manually. Anyone who’s worked on multiple macs to build and deliver iOS apps can feel my pain here. Our workflow had been to upload the files manually to a specific node, which was usually dedicated to a given app (and <em>only </em>that app). There was no unified rollout between all 40 nodes, no version control, and we kept only minimal, hand updated records as to what version was stored where. After one particularly grueling sprint, I put my foot down and decided: no more! I was going to roll a solution to this or die trying.</p><p>Luckily, I was able to pull off the former. Coming into the project, I knew I needed five things:</p><ol><li>I needed to store the profiles and certificates (which for ease of use I will refer to collective as “identities”) in a version controlled, central location.</li><li>I wanted a self-service option for anyone to upload an identity into our repository.</li><li>I needed to propagate any changes to a given identity out across all 39 build nodes.</li><li>I needed to run regular checks to determine whether an identity was expired.</li><li>I wanted to have regular cleanups that would delete expired identities, and open up JIRA tickets as reminders to renew soon-to-expire identities.</li></ol><p>It was only after I was just about done with my solution that I realized I had rebuilt <a href="https://docs.fastlane.tools/actions/match/">Fastlane Match</a>. The only problem with using that popular open-source tool was it didn’t seem designed to work across multiple teams. My team builds a half dozen iOS apps, across three separate Team IDs/Developer Accounts. Further, corporate policy demanded that my team doesn’t generate new identities, so the deletion and re-registering of new identities with match was right out as well. In the end, I just couldn’t figure out how to just set and forget Match (Felix Krause, if you’re reading this, I am obviously all ears).</p><p>With all this in mind, let’s start working through how we solved the five requirements above.</p><h3>Version-Controlled Central Repo</h3><p>This facet was by far the easiest. I set up a bitbucket repo with access limited to just my team. Really only minor fuss required. I ended up calling it <strong>iDent</strong>, cause I wanted a snappy name that could stick in my team’s mind. Jury’s obviously still out on whether I succeeded.</p><h3>Self-Service option</h3><p>Since my team manages a Jenkins instance, we wanted to have our first pass at this expose self-service options through it. We’re already known for the instance, so disseminating info on its existence wasn’t going to be too hard. I set up two jobs: one for uploading profiles, and one for uploading signing certificates.</p><h4>Common Features</h4><p>Largely, the upload mechanism for both jobs was identical: the Jenkins job accepted a file as a parameter, and kicked off a shell script on one of our “admin” boxes. The script would check if the uploaded file was appropriate for the job, and fail the build if it was not. After that, it would checkout a new branch for the iDent and run a secondary script that posted to bitbucket’s api, opening up a PR into the central repo. The script would automatically tag my teammates in the PR, and from there, we could choose whether to approve or deny the upload.</p><h4>Unique Challenges for Signing Certs</h4><p>Part and parcel of accepting the signing certs for our build nodes was wrapping it up in a p12. Now, by convention, they would be passed into the Jenkins job as a pkcs12 file which wrapped both the cert and its associated signing keys. However, we still had to accept the end-user’s arbitrary p12 password in order to be able to use it at all. We ended up solving this by simply laundering the p12 file: first, we’d create a new keychain on the admin box. Then, we’d import the p12 onto to it, before exporting it back out—replacing the previous password with our enterprise password. Thankfully, we automated all of this with the <a href="https://ss64.com/osx/security.html">security cli</a>, otherwise I would’ve gone completely insane.</p><h3>Change Propagation</h3><p>Fortunately for us, change propagation was one of the easier steps. We had another Jenkins job (not self-service, mind you) set up to poll against changes to master in the central iDent repo. On commits, we’d kick up a shell script on each of our 40 build nodes, pulling down the latest changes to iDent into a temp local folder. From there, we rsync’d over the provisioning profiles to ~/Library/MobileDevice/Provisioning\ Profiles<em> </em>and imported the signing certificates directly onto the enterprise keychain. The temp local folder would then be deleted. No muss, no fuss.</p><h3>Expiration Checks</h3><p>Now we come to the second of our non-self serve Jenkins jobs: the expiration checker. In implementation, points 4 &amp; 5 ended up being easily combinable, but I will keep the sections separate for ease of explanation. The Expiration Checker kicks off a single shell script, cleanup-orchestrator. It runs through four loops: iterating once over every profile in ~/Library/MobileDevice/Provisioning\ Profiles<em>, </em>once over every cert on the enterprise keychain, and once on each profile and identity checked into the repo itself<a href="#90ef">¹</a>. Openssl x509 , thankfully, provides functionality to extract the expiration dates of both. From there, it was just a case of refining the date down to YYYY-MM-DD format, getting the current date, and comparing.</p><h3>Handling Expiration</h3><p>Next step, we had to handle that expiration. Still part of the same script, we would check if the identity was set to expire in 31 days. If so, we kicked off a reminder-to-renew script. In iDent’s initial state, this script simply opened a ticket in my team’s ServiceDesk queue. While not the perfect self-serve reminder that I initially envisioned, it served well enough to get the project off the ground. The case for when an identity was already expired is, obviously, much simpler.</p><p>You delete it.</p><h3>Finishing Touches</h3><p>Now that we covered my initial five goals, we were well on our way to finishing iDent. Much as is often the case, though, as we rolled out the service, we identified further pain points we wanted to solve. Namely, erasing expired identities from the central repo, and how to handle truly self-serve uploads.</p><h4>Reaching Back</h4><p>Reaching back to delete the expired identities from the repo was pretty straightforward. We already had a script to open up PRs in the iDent repo; we simply added a call to it after the expiration checks were done, but before the workspace was cleared. Otherwise, the workflow was identical to the initial uploads.</p><h4>True Self-Service</h4><p>The addition of true self-service was the first major version bump of the project, as well as the first big contribution to it from another developer. We knew we wanted to collect the email address of the uploading end-users. We knew we wanted to record that email address in direct correlation to the identity that was uploaded. Finally, we knew that record had to be checked into the iDent repo alongside everything else.</p><p>My co-workers solution was ingenious: 1) he tracked the correlation in a yaml manifest, 2) he wrote a python wrapper that allowed seamless updating of the manifest, and 3) he wrote another wrapper that drafted up the jinja templates to send out as emails to alert the end users. From there, it was simply a matter of slotting the new self-service functionality into my shell scripts, and rolling the changes out.</p><h3>iDentical Outcomes</h3><p>Almost immediately after implementation, we started to see dividends. What had previously been untracked ad-hoc uploads now had centralized records and automated reminders. No longer did we get our first warnings about identity expiration with failing Jenkins jobs. The whole effort took about a month to complete, but I’d like to think it pushed us forward years in proper DevOps maturation.</p><p>The best part, though, was with all our identities equalized, the door was open to a much more ambition modernization effort. Without identities to pin us to specific nodes, we soon started making our first steps into completely unpinning our build jobs. While, obviously, that should’ve been Step One of a modernized build environment, we’ve managed to unblock ourselves from a lot of headaches by rolling iDent. If only a month of work can catapult us from the Dark Ages to The Cloud, imagine what we can do with a little more time!</p><ol><li>The duplicated loops are a necessary evil: while it would be all well and good to only delete the node’s copies of the identities (be they in ~/Library or on the keychain), if they just get imported again on the next upload, there’s no real point. They’ll just end up taking up space. For more on how we solved this, check out the Finishing Touches section. <a href="#12d7"><em>Go back</em></a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ea1ca909a80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Actually Using mergeProps]]></title>
            <link>https://harrison-lavin.medium.com/actually-using-mergeprops-c8f8930fad1a?source=rss-79d5c06a0c73------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8f8930fad1a</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Harrison Lavin]]></dc:creator>
            <pubDate>Thu, 19 Apr 2018 11:03:51 GMT</pubDate>
            <atom:updated>2018-04-19T11:03:51.684Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*SIuu0aZBPMX-F9cE7nDdYQ.png" /></figure><p>While working with React/Redux lately, I stumbled into a little bit of a problem: I had no idea how mergeProps worked. As an optional argument to redux’s connect function, it’s easy to forget about its existence entirely. So, I wanted to jot down some quick notes on how to use it before I forgot them.</p><p>MergeProps is used by redux to bundle together the mapStateToProps and mapDispatchToProps functions specified in your containers. If you don’t invoke mergeProps in the connect function, it’ll use the default mergeProps, which creates a generic object which contains propsFromState, propsFromDispatch, and propsFromParentComponents. However, when you define mergeProps yourself, you can pass it even more props.</p><p>In my use case, we wanted to bundle up two onClick methods, so that we don’t need to specify them down in the connected component. After passing in the usual props, we defined a generic object to be merged in with them. This object had our functions defined, as shown below.</p><pre>return Object.assign({}, propsFromState, propsFromDispatch, ownProps, {<br>    closeCaseWithReset: () =&gt; propsFromDispatch.closeCaseWithReset(propsFromState.caseNumber, ownProps.logonId, propsFromState.oAuthToken),<br>    closeCaseAndGoHome: () =&gt; propsFromDispatch.closeCaseAndGoHome(propsFromState.caseNumber, ownProps.logonId, propsFromState.oAuthToken)<br>  });</pre><p>This was part of a larger refactor, which ensured that we weren’t passing props like oAuthToken all the way down as ownProps from component to component. Using mergeProps made our presentational components cleaner, pulling their method definitions away, so that they could just concentrate on rendering their elements correctly, not defining functions to communicate with the rest of the app.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8f8930fad1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Going, Going, Golang II: A Rubyist’s Impression of Iris & MongoDB]]></title>
            <link>https://harrison-lavin.medium.com/going-going-golang-ii-a-rubyists-impression-of-iris-mongodb-7163a2c3d657?source=rss-79d5c06a0c73------2</link>
            <guid isPermaLink="false">https://medium.com/p/7163a2c3d657</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[siri]]></category>
            <category><![CDATA[mongodb]]></category>
            <dc:creator><![CDATA[Harrison Lavin]]></dc:creator>
            <pubDate>Wed, 14 Feb 2018 00:56:34 GMT</pubDate>
            <atom:updated>2018-02-14T12:23:23.874Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kJuMu88jWidoTojNOBwO_g.jpeg" /></figure><p>The more I dug into the Go tutorial, the more I wanted to try using it out in the real world. Obviously, this is in no way motivated by my fear of the Concurrency section of the tutorial. While I’m planning to build a much larger app with it soon, I wanted to get my hands dirty building something small first. After some consideration, I settled on a Quote Generator.</p><h4>Choosing a Framework</h4><p>Seeing as how I was striking out into a new language for this app, I figured I should try and make everything else as familiar as possible. My initial hope was to find a framework as similar to Rails as possible: opinionated, well-featured, and easy to boot up. The less I got bogged down in the particulars, the more I could concentrate on the whole learning experience.</p><p>Having found a few resources to delve into, I decided to go with <a href="https://iris-go.com/">Iris</a>. Like I’ve said, I’m still at the beginning of my career, and sticking to the more opinionated frameworks (as well as architectures that I know, cough cough MVC) feels like a safer choice for a solo undertaking. I had initially hoped for a strong generator like Rails has, so I could get a sense of common practice in project structure. Unfortunately, from the options I was given, none of them seemed to provide that functionality. Turns out, I’d have to build things the Old-Fashioned Way.</p><p>Entertainingly, I did very nearly go with <a href="https://gin-gonic.github.io/gin/">Gin</a>, because of the simplicity of my project. Because Gin could do everything I absolutely <em>needed</em>, it seemed like a good prospect. That being said, the project I want to work on after this will likely be more fully-featured, I should probably specialize in one for now, and branch out later if I feel limited by Iris. Ultimately, the idea of a more robust framework felt safer— it might be better to have and not need, rather than need and not have.</p><h4>Choosing a Database</h4><p>Since the data I planned to handle was simply a quote, a subject, and a speaker, I felt it probably unnecessary to choose a SQL approach. I could easily store everything I needed in a JSON document, removing the need to have multiple tables referencing each other. With that in mind, I decided to try using Mongodb. I’d been flirting with it at work, and I was excited to give it a try. Plus, I’d already done a little looking, and found a Mongo driver for Go. I figured connecting it all together should prove fairly straightforward.</p><h3>Actually Building It</h3><h4>Hello World</h4><p>To start easing myself into Iris, I went with their most basic Hello World functionality. And, <em>man,</em> was it simple to grasp.</p><pre>package main</pre><pre>import &quot;github.com/kataras/iris&quot;</pre><pre>func main() {<br>  app := iris.New()<br>  app.Handle(&quot;GET&quot;, &quot;/&quot;, func(ctx iris.Context) {<br>    ctx.HTML(&quot;&lt;h1&gt;Welcome&lt;/h1&gt;&quot;)<br>  })         <br>  app.Run(iris.Addr(&quot;:8080&quot;),<br>          iris.WithoutServerError(iris.ErrServerClosed))<br>}</pre><p>In the immediate sense, it’s an extremely quick way to get up and running: make a new iris object, tell it to handle GET requests on root by serving up a given html string, then tell it to run that object on localhost:8080—with the potential to serve up an error if anything goes wrong. I don’t understand the syntax fully (namely, what appears to be an anonymous function passed into Handle that renders out the HTML), but it’s easy enough to get by.</p><h4>Connecting Mongo</h4><p>Next, I tried building a page that accessed Mongo. It was fairly straightforward, to implement in and of itself (with code largely adapted from <a href="https://medium.com/go-language/iris-go-framework-mongodb-552e349eab9c">Santosh Anand</a>):</p><pre>package main<br><br>import (<br>	&quot;log&quot;<br><br>	&quot;github.com/kataras/iris&quot;<br>	&quot;gopkg.in/mgo.v2&quot;<br>	&quot;gopkg.in/mgo.v2/bson&quot;<br>)<br><br>type Quote struct {<br>	Author  string<br>	Subject string<br>	Text    string<br>}<br><br>func main() {<br>	app := iris.Default()<br><br>	session, err := mgo.Dial(&quot;localhost&quot;)<br>	if nil != err {<br>		panic(err)<br>	}<br>	defer session.Close()<br>	session.SetMode(mgo.Monotonic, true)<br><br>	c := session.DB(&quot;quote-db&quot;).C(&quot;quote&quot;)<br>	c.Insert(&amp;Quote{&quot;Lajos Kossuth&quot;, &quot;On History&quot;, &quot;History is the revelation of providence.&quot;})<br><br>	app.Get(&quot;/&quot;, func(ctx iris.Context) {<br>		result := Quote{}<br>		err = c.Find(bson.M{&quot;author&quot;: &quot;Lajos Kossuth&quot;}).One(&amp;result)<br>		if err != nil {<br>			log.Fatal(err)<br>		}<br>		ctx.JSON(result)<br>	})<br>	app.Run(iris.Addr(&quot;:8080&quot;))<br>}</pre><blockquote><strong>Golang Gotcha</strong>: Initially, I had assumed that I could just place Go files right next to each other, in the same directory level of my repo. As it turns out, that’s definitely not the case. Each Go file needs to export its own main package, and having them in the same level causes fatal interference. I had to change my file structure from:</blockquote><pre>going-golang/<br>  -&gt;simpleDB.go<br>  -&gt;helloWorld.go</pre><p>Into:</p><pre>going-golang/<br>  -&gt;simpleDB/<br>    -&gt;simpleDB.go<br>  -&gt;helloWorld/<br>    -&gt;helloWorld.go</pre><p>Not a tremendous change, but the fact that I couldn’t export two main packages in the same level wasn’t something that immediately occurred to me, as a Rubyist.</p><p>The second (much smaller) issue, was that I didn’t realize my MongoDB would be storing the keys lowercase, when they had been defined in the Quote Struct as Uppercase. There a number of times my connection exited out because I kept trying to query on Author.</p><h4>Parsing the Text</h4><p>I’m going to, unabashedly, pull my full list of quotes from Civilization VI’s list of quotes. Another programmer, <a href="https://lowrey.me/civilization-vi-quotes/">Bret Lowrey</a>, already managed to isolate an XML list of them from the game’s data. I’m going to take that data, parse it myself, and store it in the app’s MongoDB.</p><blockquote><strong>Golang Gotcha</strong>: I had a lot of trouble getting os.Open to work. I had placed quoteGenerator.go as the top level file in its own package. From there, however, I placed my input XML file into an inputs folder. Moreover, when I tried running it as a test, I was doing so from the parent folder of quoteGenerator. I’m still not 100% certain which of those conditions it was that killed my effort.</blockquote><pre>package main</pre><pre>import (<br> &quot;encoding/xml&quot;<br> &quot;fmt&quot;<br> &quot;io/ioutil&quot;<br> &quot;log&quot;<br> &quot;os&quot;<br>)</pre><pre>type GameData struct {<br> BaseGameText BaseGameText<br>}</pre><pre>type BaseGameText struct {<br> XMLName xml.Name<br> Rows    []Row `xml:&quot;Row&quot;`<br>}</pre><pre>type Row struct {<br> Subject string `xml:&quot;Tag,attr&quot;`<br> Text    string<br>}</pre><pre>func main() {</pre><pre>xmlFile, err := os.Open(&quot;quote.xml&quot;)</pre><pre>if err != nil {<br>  fmt.Println(err)<br> }</pre><pre>defer xmlFile.Close()</pre><pre>byteValue, err := ioutil.ReadAll(xmlFile)</pre><pre>if err != nil {<br>  log.Fatal(err)<br> }</pre><pre>var gameData GameData<br> xml.Unmarshal(byteValue, &amp;gameData)</pre><pre>for i := 0; i &lt; len(gameData.BaseGameText.Rows); i++ {<br>  fmt.Println(&quot;Quote Data: &quot; + gameData.BaseGameText.Rows[i].Text)<br> }</pre><pre>}</pre><blockquote><strong>Golang Gotcha</strong>: Another issue I ran into here was parsing the XML into my custom structs. Namely, I couldn’t understand the how to use the <em>xml:&quot;&lt;foo&gt;&quot; </em>things (I suspect they’re namespace tags?) while defining the struct. I had a lot of failed attempts before I could get it store the data properly.</blockquote><p>Now, I needed to format the data into JSON, and ingest it into the MongoDB. This part was vastly helped by my finally figuring out how to use the debugger in VS code. Eventually, my parsing function looked like this:</p><pre>type Quote struct {<br> Subject string<br> Text    string<br> Author  string<br>}</pre><pre>func makeQuote(row Row) Quote {</pre><pre>x := func(c rune) bool {<br>  return !unicode.IsLetter(c)<br> }</pre><pre>// Split the SUBJECT string into an array of strings, dropping any <br>// non-letter character within.<br>strArray := strings.FieldsFunc(row.Subject, x)<br>// Drop the LOC_&lt;foo&gt; prefix found in the XML<br> strArray = strArray[2:]<br>// Drop the _QUOTE at the end of the text<br> strArray = strArray[:len(strArray)-1]<br> subject := strings.Join(strArray, &quot; &quot;)<br> subject = strings.Title(strings.ToLower(subject))<br> strArray = strings.Split(row.Text, &quot;[NEWLINE]– &quot;)<br> author := strArray[1]<br> text := strArray[0]<br> quote := Quote{<br>  Subject: subject,<br>  Author:  author,<br>  Text:    text}<br> return quote<br>}</pre><p>With that taken care of, I had my quote struct. Or at least, I <em>thought I </em>did. I found out, as I tried to bring it up, that Great Work quotes were structured in a fundamentally different way: with no author in the Text namespace, I needed to come up with a new way to parse them. I eventually settled on checking whether the row I was parsing was a Great Work, and, if so, would pass along a bool into my parser to ensure there were two separate logic paths. My finally makeQuote method looked like this:</p><pre>func makeQuote(row Row, isGreatwork bool) Quote {</pre><pre>x := func(c rune) bool {<br>  return !unicode.IsLetter(c)<br> }</pre><pre>strArray := strings.FieldsFunc(row.Subject, x)<br> strArray = strArray[2:]<br> strArray = strArray[:len(strArray)-1]<br> subject := strings.Join(strArray, &quot; &quot;)<br> subject = strings.Title(strings.ToLower(subject))<br> var text string<br> var author string<br> if isGreatwork {<br>  text = row.Text<br>  author = subject<br> } else {<br>  strArray = strings.Split(row.Text, &quot;[NEWLINE]&quot;)<br>  text = strArray[0]<br>  if len(strArray) &gt; 1 {<br>   author = strArray[1]<br>  } else {<br>   author = &quot;Anonymous&quot;<br>  }<br> }<br> text = strings.Replace(text, &quot;”&quot;, &quot;&quot;, -1)<br> text = strings.Replace(text, &quot;“&quot;, &quot;&quot;, -1)<br> quote := Quote{<br>  Subject: subject,<br>  Author:  author,<br>  Text:    text}<br> return quote<br>}</pre><p>From there, I just needed to adapt the simpleDB connection to allow me load in my quote struct. Ultimately, it came down to just modifying c.Insert(&amp;quote{..}) into c.Insert(quote).</p><h4>Pulling a Randomized Quote</h4><p>Pulling a randomized quote was one of the easiest modifications to make to this.</p><pre>pipe := c.Pipe([]bson.M{{&quot;$sample&quot;: bson.M{&quot;size&quot;: 1}}})<br>  resp := []bson.M{}<br>  err := pipe.All(&amp;resp)<br>  if err != nil {<br>   fmt.Println(&quot;error:&quot;, err)<br>  }<br>  ctx.JSON(resp)</pre><p>Again, it was relying on the mongoDB collection variable I’d set before: c:=session.DB(&quot;quote-db&quot;).C(&quot;quote”). After that, I could sit back and let mgo’s implementation of Mongo do most of the heavy lifting.</p><p>Once all that’s in place, the app is complete! Clocking in at just around 120 lines, it manages to serve up a new quote every time the page is refreshed. Once everything is assembled together, here’s what the <a href="https://github.com/HarrisonLavin/going-golang">final code</a> looks like:</p><pre>package main</pre><pre>import (<br> &quot;encoding/xml&quot;<br> &quot;fmt&quot;<br> &quot;io/ioutil&quot;<br> &quot;log&quot;<br> &quot;os&quot;<br> &quot;strings&quot;<br> &quot;unicode&quot;</pre><pre>&quot;github.com/kataras/iris&quot;<br> mgo &quot;gopkg.in/mgo.v2&quot;<br> &quot;gopkg.in/mgo.v2/bson&quot;<br>)</pre><pre>type GameData struct {<br> BaseGameText BaseGameText<br>}</pre><pre>type BaseGameText struct {<br> XMLName xml.Name<br> Rows    []Row `xml:&quot;Row&quot;`<br>}</pre><pre>type Row struct {<br> Subject string `xml:&quot;Tag,attr&quot;`<br> Text    string<br>}</pre><pre>type Quote struct {<br> Subject string<br> Text    string<br> Author  string<br>}</pre><pre>func makeQuote(row Row, isGreatwork bool) Quote {</pre><pre>x := func(c rune) bool {<br>  return !unicode.IsLetter(c)<br> }</pre><pre>strArray := strings.FieldsFunc(row.Subject, x)<br> strArray = strArray[2:]<br> strArray = strArray[:len(strArray)-1]<br> subject := strings.Join(strArray, &quot; &quot;)<br> subject = strings.Title(strings.ToLower(subject))<br> var text string<br> var author string<br> if isGreatwork {<br>  text = row.Text<br>  author = subject<br> } else {<br>  strArray = strings.Split(row.Text, &quot;[NEWLINE]&quot;)<br>  text = strArray[0]<br>  if len(strArray) &gt; 1 {<br>   author = strArray[1]<br>  } else {<br>   author = &quot;Anonymous&quot;<br>  }<br> }<br> text = strings.Replace(text, &quot;”&quot;, &quot;&quot;, -1)<br> text = strings.Replace(text, &quot;“&quot;, &quot;&quot;, -1)<br> quote := Quote{<br>  Subject: subject,<br>  Author:  author,<br>  Text:    text}<br> return quote<br>}</pre><pre>func main() {</pre><pre>xmlFile, err := os.Open(&quot;quotes.xml&quot;)</pre><pre>if err != nil {<br>  fmt.Println(err)<br> }</pre><pre>defer xmlFile.Close()</pre><pre>byteValue, err := ioutil.ReadAll(xmlFile)</pre><pre>if err != nil {<br>  log.Fatal(err)<br> }</pre><pre>var gameData GameData<br> var quote Quote<br> xml.Unmarshal(byteValue, &amp;gameData)</pre><pre>session, err := mgo.Dial(&quot;localhost&quot;)<br> if nil != err {<br>  panic(err)<br> }<br> defer session.Close()<br> session.SetMode(mgo.Monotonic, true)</pre><pre>c := session.DB(&quot;quote-db&quot;).C(&quot;quote&quot;)</pre><pre>for i := 0; i &lt; len(gameData.BaseGameText.Rows); i++ {<br>  isGreatwork := strings.Contains(gameData.BaseGameText.Rows[i].Subject, &quot;GREATWORK&quot;)<br>  quote = makeQuote(gameData.BaseGameText.Rows[i], isGreatwork)<br>  if err != nil {<br>   fmt.Println(&quot;error:&quot;, err)<br>  }<br>  c.Insert(quote)<br> }<br> app := iris.Default()</pre><pre>app.Get(&quot;/&quot;, func(ctx iris.Context) {<br>  pipe := c.Pipe([]bson.M{{&quot;$sample&quot;: bson.M{&quot;size&quot;: 1}}})<br>  resp := []bson.M{}<br>  err := pipe.All(&amp;resp)<br>  if err != nil {<br>   fmt.Println(&quot;error:&quot;, err)<br>  }<br>  ctx.JSON(resp)<br> })</pre><pre>app.Run(iris.Addr(&quot;:8080&quot;))</pre><pre>}</pre><h3>Conclusions</h3><p>Phew! That ended up being a bit more work than I initially anticipated. It was an exciting experiment, to be sure, and it’s given me a very interesting taste of Go development, overall.</p><p>It’s a fundamentally different beast from developing in Rails, to be sure. A number of the Gotchas I encountered had to do with project configuration— a realm completely swept away by that good old Rails Magic. I still need to figure out whether it’s possible to fold multiple packages into one project. So far, I’ve only been able to work with a main package, into which I have to cram <strong>all</strong> my functionality.</p><p>Another thing I found different from Ruby was how differently it treated objects. Instead of being able to call any method I wanted on any of my structs, I found that many functions took my structs as arguments, instead of being called on them as receivers. Now, that may be a result of my own amateur nature, but I found it noteworthy nonetheless.</p><h3>Next Steps</h3><p>So, what’s next for Going, Going, Golang? I think top priority right now is figuring out how to deploy Quote Generator. I’m thinking of just using Heroku, to keep things simple, but my first attempts to get it on there met with failure. Once I can get it up there, however, I’m planning on building and deploying a fuller app with Iris. I’ll keep writing more posts the closer I get, so be sure to check back in!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7163a2c3d657" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Golang Gotcha]]></title>
            <link>https://harrison-lavin.medium.com/a-golang-gotcha-5e305c04acde?source=rss-79d5c06a0c73------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e305c04acde</guid>
            <category><![CDATA[go]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Harrison Lavin]]></dc:creator>
            <pubDate>Fri, 02 Feb 2018 04:35:47 GMT</pubDate>
            <atom:updated>2018-02-02T04:35:47.510Z</atom:updated>
            <content:encoded><![CDATA[<p>So, I like to over-engineer things. I’ve been working through Go’s Tutorial, and I’d been stuck on the Maps exercise. It asks you to count up the number of times a word appears in a string, constructing a map to store the numbers each individual word shows up. I had thought, “Ok, they mentioned you could check if an element was already in the slice in the previous example. Great!”</p><pre>func WordCount(s string) map[string]int {<br> m := make(map[string]int)<br> words := strings.Fields(s)<br> for _, v := range words {<br>  v, ok := m[v]<br>  if(ok){<br>   m[v] += 1<br>  } else {<br>   m[v] = 1<br>  }<br> }<br> return m<br>}</pre><p>I knew that I had to split the string into a slice of substrings. Then, I knew I had to iterate over it by using range. Then, I fell into a deep hole of trying to check whether my Map had v in it already. I kept getting errors that I <em>cannot use v (type int) as type string in map index. </em>Naturally, I was confused by this. Isn’t v a string? No, as it turns out, it wasn’t. When I threw Println into both arms of the if clause, I found out that v was evaluating down to 0, while if I printed it outside the if, it evaluated to the proper word within my words slice.</p><p>In confusion, I deleted my if clause, and I tried to start from scratch. Since my map is already [string]int, maybe if I just adding one onto the key’s value, it’d be fine! Lo and behold, that <em>was</em> the intended answer.</p><pre>func WordCount(s string) map[string]int {<br> m := make(map[string]int)<br> words := strings.Fields(s)<br> for _, v := range words {<br>  m[v]++<br> }<br> return m<br>}</pre><p>Like I said, I’m big on over-engineering.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e305c04acde" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Going, Going, Golang: A First Pass At Learning Golang]]></title>
            <link>https://harrison-lavin.medium.com/go-ing-go-ing-go-ne-a-first-pass-at-learning-golang-4d4451f380bf?source=rss-79d5c06a0c73------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d4451f380bf</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Harrison Lavin]]></dc:creator>
            <pubDate>Fri, 02 Feb 2018 00:43:11 GMT</pubDate>
            <atom:updated>2018-02-05T01:58:17.517Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ORS0x6n78ErNNWTxyiRRww.jpeg" /><figcaption><strong><em>Geomys bursarius</em></strong>, or the plains pocket gopher. Alternatively, Me, in my natural habitat, expressing concern about learning a new compiled language.</figcaption></figure><p>Personal story time! I started studying web development at Flatiron exactly two years ago. Though I’d done work with other languages before, the entirety of that course was in Ruby and JavaScript. Two languages, I’m sure you’re aware, not exactly known for static typing or needing compilation. I have, for most of the past two years, looked longing at the wild west of JS development, always afraid to jump back into learning, you know, low-level crunchy languages. Imagine my surprise when I decided a few weeks ago to start teaching myself Go.</p><p>One of the through lines for the past two years has been my increasing interest in DevOps. I’ve been tinkering with Docker recently, and I eventually stumbled onto the fact that it was written in Go. Having nothing better to do, I decided to try my luck and see if I could understand this strange new language. It was only after I started the <a href="https://tour.golang.org/welcome/1">Go Tutorial</a> that I even realized what I was stumbling into. I’m not exactly what you’d call an expert in compiled languages. Professionally, of course, I’ve worked with Java for most of my career— but even so, I still feel more comfortable with interpreted languages.</p><p>That being said, a fair bit of the tutorial came and went without much fanfare. Programming is programming, after all. But! Then I found my way to the section on Pointers. I’d studied C++ a little, way back when, so I’m not unfamiliar with pointers. Still, it’s an abstraction I’ve struggled to wrap my head around in practice. The concept’s fine: instead of saving data to a variable, I’m saving a location to reference that value into a variable. Instead of carting around multiple bytes of data in a string everywhere I want to use it, I’ve instead got a neat and small package that points me to where I can find my much clunkier data. It’s just something I’m still getting used to.</p><p>Imagine how I felt when encountering slices. Again, due to my background in C++, I know about the concept of static vs. dynamic arrays. But slices still felt alien to me. Are they a subset of a static array? A pointer to a complete array? Or something else entirely, a totally dynamic array? Near as I can tell, it’s all three. I’m not used to one language feature having three such wildly different uses. I’m a rubyist, I’m used to having three wildly different language features having the exact same use!</p><p>Still, with enough elbow grease, I managed to work my way through the exercises, to the point where I’m sitting at the Maps Exercise, bonking my head against a wall in hopes of finally understanding it. As I learn more about Go, I plan on keeping a running tally of my thoughts, so feel free to check back again later, see if I’ve gotten anywhere!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d4451f380bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[At Rest For the Rest: Encrypting a DynamoDB]]></title>
            <link>https://harrison-lavin.medium.com/at-rest-for-the-rest-encrypting-a-dynamodb-108b2491ac21?source=rss-79d5c06a0c73------2</link>
            <guid isPermaLink="false">https://medium.com/p/108b2491ac21</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[encryption]]></category>
            <category><![CDATA[dynamodb]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Harrison Lavin]]></dc:creator>
            <pubDate>Thu, 01 Jun 2017 03:15:42 GMT</pubDate>
            <atom:updated>2017-06-01T03:15:42.487Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently, I ended up taking on the task of setting up at rest encryption for a DynamoDB we were going to use on our project. By the time I volunteered, we had decided on using the <a href="https://github.com/awslabs/aws-dynamodb-encryption-java">aws-dynamodb-encryption-java</a> library. Amazon’s own examples in the documentation seemed fairly straight-forward, so we figured it would be fairly simple.</p><p>Either I love over-complicating things, or it maybe was not so simple. Initially, we tried to rig a solution invovling envelope encryption. I had imagined that we could use Amazon KMS to manage our keys, and then use the DirectKMSMaterialsProvider as an EncryptionMaterialsProvider (both elements provided by the above library).</p><p>This solution, however, would not be Bouncy Castle FIPS compliant, a must for Federal Contracting. So instead, we decided on replicating some of the implementation from a previous project, which uses client side encryption to lock down a postgres database. Ultimately, since the entire payload of the DDB gets encrypted and since the ultimate implementation isn’t, in fact, envelope encryption, most of the actual code for this will be scrapped before we go to production. Still, I learned a fair deal about the process! Below I’ve copied a lot of the notes I jotted down during the process</p><p>[10:20]</p><p>With that in mind, we’re taking the crypto tools used in that previous project, importing them into the current project, and comparing and contrasting the code used to encrypt the data.</p><p>[10:24]</p><p>Right now, we’re trying to get the Self-Signed Cert from which we pull the private and public keys</p><p>Harrison Lavin</p><p>[11:09 AM]</p><p>`dynamoDBMapper().save(dynamoDB);` (edited)</p><p>[11:09]</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5e79a32cbb03b4c7a91d82eb71089082/href">https://medium.com/media/5e79a32cbb03b4c7a91d82eb71089082/href</a></iframe><p>[1:19 PM]</p><p>Nightmarishly, AttributeEncryptor as it was above can’t be cast, because it’s from s3, so, instead, I’m trying to build provider from the ddb code</p><p>[1:20]</p><p>Unfortunately, EncryptionMaterials is Abstract and cannot be instantiated like they are in s3</p><p>[1:21]</p><p>Additionally, the EncryptionMaterialsProvider uses a SymmetricStaticProvider in Amazon’s test code, so I’m trying to go with that</p><p>[1:22]</p><p>instead of the Asymmetric version we were looking at with the s3 version</p><p>[1:22]</p><p>which I don’t understand, so.</p><p>Harrison Lavin</p><p>[2:16 PM]</p><p>CryptoService to the rescue, with it’s ability to generate an encryptionKey (the secret key) and to retrieve the keypair that we need for the SymmetricStaticProvider</p><p>Harrison Lavin</p><p>[2:36 PM]</p><p>Compiles properly, but now all the ENV vars I set up need to be added to the Dockerfile</p><p>[2:37]</p><p>In turn, it’ll boot up, but bouncycastle fips isn’t installed on it.</p><p>— — — May 19th — — -</p><p>Harrison Lavin</p><p>[8:11 AM]</p><p>Turns out, once the provider was added, it worked like a charm</p><p>[8:12]</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e6decf2856d3c5a1ac5f418d8091ee16/href">https://medium.com/media/e6decf2856d3c5a1ac5f418d8091ee16/href</a></iframe><p>[8:13]</p><p>Then, we passed in the provider to the Mapper, and the rest of the app functioned fine</p><p>[8:13]</p><p>Not sure how to prove it is, in fact, encrypting the data, buuuuuut</p><p>Harrison Lavin [11:36 AM]</p><p>Thanks to the inestimable Aaron Shaf, we may have a way forward</p><p>[11:40]</p><p><a href="https://github.com/instructure/dynamo-local-admin-docker">https://github.com/instructure/dynamo-local-admin-docker</a></p><p>GitHub</p><p>instructure/dynamo-local-admin-docker</p><p>dynamo-local-admin-docker — A combined docker image with DynamoDB-Local and dynamo-admin.</p><p>Harrison Lavin [12:39 PM]</p><p>It turns out, we do!</p><p>[12:39]</p><p>by swapping out the previous docker image (which just had the DDB image, no dynamo-admin), with the above, we were able to take a look at the DDB as it was being worked on</p><p>[12:40]</p><p>A case could be saved and retrieved using swagger, free of issue.</p><p>[12:41]</p><p>But! If you tried to access that case from dynamodb-admin, it came back as an encrypted mess.</p><p>[12:41]</p><p>Only by retrieving using swagger were we able to read the data properly</p><p>[12:41]</p><p>As far as I understand encryption, we’ve done it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=108b2491ac21" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>