sbauch
NFTs got a lot of mainstream attention recently and I couldn’t get excited about the space, despite feeling like collectibles are right up my alley. So I did a deep dive, started playing around with Solidity, and came up with CryptOrchids as a fun, small project I could build to learn more.
CryptOrchids are flowers that grow on the ethereum blockchain as ERC721 tokens or NFTs. When a CryptOrchid token is minted, it starts off as a seed.
A seed owner can germinate their seed, which calls a function on the CryptOrchids smart contract that makes a request to Chainlink VRF, a service that provides verifiably random numbers. The contract uses that random number to determine the species of the flower according to an n per 10k scale for each of the 10 species in the CryptOrchids genum - the Shenzen Nongke orchid is the most sought after species, germinating at a 1 in 10k seeds rate.
Germinating a seed starts the game - CryptOrchids are extremely sensitive and must be watered exactly every 7 days, within a 3 hour window.
All of the gameplay mechanics are stored on chain - when a seed is germinated, the contract stores the block timestamp as the plantedAt for the token. Each token also has a waterLevel integer, and we can then do math to determine if a particular plant is alive or dead.
A plant will be considered alive if it’s water level is equal to the number of complete growth cycles the plant has been alive, which looks something like this:
alive? = plantWaterLevel == Math.floor(plantAgeSeconds / GROWTH_CYCLE)
To give players a bit of slack time to water their flower, we provide a 3 hour watering window. So we can express that this way, where if the watering level is 1 less than fill cycles, but the modulo is within the watering window, the plant is still alive:
alive = plantWaterLevel + 1 == Math.floor(plantAgeSeconds / GROWTH_CYCLE) && (plantAgeSeconds % GROWTH_CYLCE) < WATERING_WINDOW
The result is a very simplified way to express the essence of a plant on the ethereum blockchain. Of course real world plants also need sunlight, and nutrients, and they grow different sizes and have things like reproductive cycles.
But from an ontological standpoint, I’m trying to move beyond 2D posters and more towards metaverse objects that behave like their real world counterparts. The contract also stores latin species names on chain, and the species are all real species found in the natural physical world.
Where I’d really like to take this project is to metaverses as 3d objects that owners can water inside the metaverse. I’ve started playing with the Decentraland SDK. It’s not much, it’s not earth or metaverse shattering stuff, but that’s the direction this is all going, and I’m super excited to be trying to make this happen. I can’t wait to be able to own a digital car, to race it in a racing universe, to use it for transportation in an RPG metaverse, or to auction it at a Mecum auto show in a metaverse. But cars are a lot more complex than plants, so I started here.
There’s a great little community popping up around the project, and there’s a lot of interesting social and gaming dynamics that are coming to the fore as people start to engage with the idea. Some have compared the game to Tomagotchis, which feels like a really nice compliment.
It’s been a really fun intro to Solidity, Ethereum and NFTs, but to be clear this is experimental and I while I wrote tests and QAed on Rinkeby extensively, I’m sure there are things that I don’t understand about Ethereum that may cause things to break down over time, so I’m very open to learning what naive mistakes I may have made here!
CryptOrchids: The NFT That Dies If You Don’t Water Them
SSO for Serious Startups
I can concede that we are guilty of wanting the wave of goodwill, but I have a hard time agreeing that this is a bait and switch. And I certainly hope nobody is going to die because we use "open source" instead of "source available".
The part of this conversation that leaves me wanting is that it all seems so positive rather than normative, and doesn't consider the benefits of choosing this license over a closed source product.
Our goals here are to make SAML SSO more accessible and run a business that helps some good customers use the software we've created. There's a lot of net positives in that IMO, and this whole "but it's not ACTUALLY open source" is a distraction borne of inflexibility and a lack of creativity.
So how do we as an industry move forward in a way that allows individual use of source available software, but prevents companies from unfairly profiting off of that? Is that desirable? What do we call that? Maybe business source, maybe source available is fine. That's a lot more interesting of a conversation to me. If you won't have that conversation until we strike open source from our website I understand.
Allowed:
Deploy your own Osso instance and use it in applications you own and operate.
Not allowed:
You use Osso to start a business where your primary business is in helping other companies implement SAML SSO in the applications they own.
If that's not what our license says then we will change the license text.
https://github.com/enterprise-oss/sinatra-ruby-idp https://www.keycloak.org/ https://www.gluu.org/
Is our intent with the license enough for you to consider it appropriate for us to call this open source?
But to your point, we also offer a demo instance that you can use in order to build out your integration, and then when a customer comes along, start paying us and swap out some ENV variables and you're ready to go!
We have to really manually test real IDPs, and we do whenever we release new software, but we also run e2e cypress tests against a Mock IDP we built, so SP -> Osso -> Mock IDP -> Osso -> SP, you can see these in our Buildkite CI - https://buildkite.com/enterpriseoss/osso
The pricing here is definitely more applicable to Auth0 :)
But for us, charging per user makes predicting the cost of your SAML provider difficult, and everyone seems to do this. We charge per customer account instead - if one of your customers has 50 MAUs it wont cost you more than a customer that has 10. And you won't need to pay us more is your software is a daily driver vs. something thats used lee frequently.
We currently use the BSL license, created by MariaDB and used by companies like Sentry. We do think Osso is open source by common understanding and view the BSL as a fair model that places no restrictions on good actors - the license is intended to protect us from copycats profiting off our work, while allowing anyone that needs to integrate SAML into an app they’re building free reign. You’re free to use Osso as a widget, but you can’t use it to start a widget factory.
"Source available" seems like a fair compromise, thanks for the suggestion.
FWIW, We're big fans of Sentry's explanation of the BSL license - https://sentry.io/_/open-source/
SAML on Rails: How to Implement SAML SSO in Rails 6
A useful framework for thinking about SAML vs OAuth from an engineer's perspective is to think of OAuth as class based, while SAML is instance based.
When you set up a new OAuth provider such as Github you typically grab a Client ID and Secret, specify your redirect URIs, and once your integration is complete any Github user can sign in with a Sign in with Github button.
But with SAML, you need to perform configuration with each customer's Identity Provider instance. As you pull on this thread you start to see where the challenge with SAML lies. SAML as a protocol isn't super complicated, and tons of OSS already exists to perform authentication. But you need to create and persist configuration data for each of your customers, which suggests needing a UI to perform this onboarding. You need to help your customer configure your app in their IDP, so you'll want to create documentation. And you need to adjust your sign in flow - you can't just stick a Sign in With Okta button, you need to ascertain from the user which IDP they use for authentication.
Osso though handles all of the "instance based" challenges, and allows your app to use OAuth to communicate with your Osso instance.
Osso is open-source software for integrating SAML SSO with any web application. It provides an Admin UI to onboard your customers, generates custom documentation to configure your app in a customer's Identity Provider (IDP), handles SAML authentication against IDPs and provides your app normalized JSON profiles as part of an OAuth 2.0 code grant authorization flow.
We started working on Osso together as a way to keep in touch and distract ourselves from, well, *gestures broadly at everything*. We chose to work on something that each of us came up against during our careers: supporting SAML SSO. Between the three of us, we've built internal tools where SAML was required by IT and struggled to sell SaaS products that didn't offer SAML SSO to enterprises who required it. We've also been users of various IDPs, limiting us from accessing the apps we wanted at work when they only included SAML SSO on the way-too-expensive Enterprise plan.
Every successful SaaS company builds SAML SSO eventually but it's never a top priority and nobody takes time to really understand it. If your customers want SAML, it's a great problem to have but chances are there are thousands of other things on your list. Most teams end up kicking it down the road, which can lead to lost sales opportunities. Companies end up piecing something together that kind of works but creates technical debt or support burden, or they spend thousands of dollars on Auth0 or AWS Cognito, but still lack customer docs or a streamlined flow for SAML onboarding.
So we're trying to simplify things for SaaS companies to make SAML SSO a more accessible option. We took existing open-source software and added the last 10% to make integrating a scalable, sellable, and serviceable SAML SSO solution as easy as possible. All the code is available on Github for you to run on your own, but we also offer a SaaS solution where we'll manage an Osso instance for you.
Osso:
• Treats SAML like OAuth - connect your app to an Osso instance via OAuth, and Osso will handle the SAML authentication and return normalized JSON profiles
• Enables first class support for Azure Active Directory, Okta, OneLogin, Ping, Google, and Salesforce, yet works with any IDP that supports SAML 2.0
• Features an Admin UI for customer support / success teams to onboard and support customers
• Provides a convenient interface for technical teams to create and roll OAuth clients and their secrets
• Generates custom PDFs for step-by-step onboarding for each of your customers
If you're interested in learning more, start here:
— Our docs [https://ossoapp.com/docs/quick-start]
— Github repos [https://github.com/enterprise-oss]
— Quick video walk-through of Osso [https://youtu.be/Jps3eeZGOr0]
— Demo instance [https://demo.ossoapp.com]
The back end is a few modular Ruby/Rack apps including a GraphQL API and an OAuth 2.0 server, while the front end is a React app written in Typescript. We use a modular and package driven approach, allowing you to customize your Osso instance with theming or middleware, or pick and choose parts of the stack to use, while getting critical updates through our Ruby gems and npm packages. We offer client libraries for Ruby (omniauth-osso) and NodeJS (passport-osso), and are working on React components you can use to interact with your Osso instance, like a login component and a widget to allow your customers to configure SAML themselves.
We really appreciate the HN community and the discussion that takes place here, so we hope you'll provide honest feedback on Osso. What's missing? What should we do differently? Anything you'd take away? We look forward to reading and responding to your comments, but if you want to speak with us directly you can also email us at [email protected].
Thank you! Sam, Sam, and Michael
Show HN: Osso – Open-source SAML SSO service
Implement SAML SSO in a Rails App
All About Identity Providers: The ABCs of IDPs
My current side project is Vcardme. It's a service for hosting your contact information at a URL where it can be accessed or saved. Idea being you should put your Vcardme URL in your email sig.
For me, what really makes it awesome, is the iOS app that allows you to save Vcardme links to your iOS phone book and also subscribes you to updates for the contacts you saved. So your iOS Contacts would stay up to date, automagically.