input license here

Okta: A nice solution. Even for small applications

Following on from my "New App Journey" article, I wanted to focus on how Okta provides an easy-to-use and easy-to-configure option – even for non-enterprise apps.


Summary


As a TL;DR (too long, didn't read) to the original post, I'm not happy with the app my mother-in-law is using for her very small business in the southeastern region of the US. So I used her business need to create a new application from scratch using the Angular, MySQL, and AWS environments. However, I do need to have some layer of security, because I don't want someone to accidentally discover the URL to her app to gain unauthorized access.


You are watching: What is Okta


Just as using AWS is a goal for me, I also wanted to consider Okta. I've used Okta at several client transactions, but haven't had a chance to set up Okta from scratch.


About Okta


According to Wikipedia, Okta, is a publicly traded identity management company based in San Francisco. [1] It provides cloud-based software that helps companies manage their employees' passwords, [2] by providing a single sign-on experience on YouTube. [3] It was founded in 2009 and had an initial public offering in 2017, currently valued at over $6 billion.


From a Quadrant Gartner Magic perspective, Okta is a leader in the Identity Management space:


When I considered using Okta for this very small application, I was able to get started quickly by creating a developer account. You can start using the following URL:


Create an app


Once I created my account on okta.com I was able to create a new app.


The new App Wizard lets me choose a Single Page Application (for my Angular client):


Then I installed the settings: (fictional info below)


Related content: The 23 most iconic movie makeovers of all time


From there, I will be able to view personal and public information related to my application. Now I am ready to add information to my Angular and Spring Boot applications.


Connect to the corner


The Okta website allows you to choose a client for the apps you want to secure.


After selecting Angular, I was taken to the following URL:


Here, the necessary steps required to hook Angular into Okta are quick and easy to apply.


Connect to Spring Boot


Next, I need to make sure the Java API (running Spring Boot) is ready as well.


Still on that page, the biggest change is the introduction of a dependency on the okta-spring-boot-starter boot artifact:


com.okta.spring okta-spring-boot-starter 0.5.0


Once this was done and I followed the necessary steps to rollout my Okta configuration, updating the RESTful controller was as simple as using the @PreAuthorize annotation. Here is a simple example:


@RestController @PreAuthorize(“hasAuthority('GroupForAccessToMotherInLawsApp')”) class ThisIsARestController { @GetMapping(“/api/endpoint”) public List getSomething() { // handle request } }


In the above example, the @PreAuthorize annotation checks to see if the token for the current user accessing the API is a member of the GroupForAccessToMotherInLawsApp group… actually not the name of the group I chose.


End state


Once I have everything in place, I'm ready to create a User Profile for my mother-in-law. That is as simple as filling out the following form, checking the “Send user activation email now” box, and clicking once on the Save button.


Hot: Discover


After she received the email and configured her Okta account, she was able to log in to her app with the email address. When she tries to access the URL for her application, Angular realizes that there is no valid token for her and redirects her to the login page:


Another cool thing about Okta is the ability to personalize the login screen. So I chose to reuse that really great image of the beach.


Look forward


This article is the sequel to a multi-part series that I'm putting together about my new app journey to provide a better app experience for my mother-in-law. Here's a list of current and planned articles, if you'd like to read more:




  • New application journey




  • Okta, a nice solution – even for small applications (this article)




  • FormBuilder in Angular 6




  • Commission Report Challenge



  • Make county listings dynamic

  • New version of the Commission Report


  • What I Learned After Initial Deployment




Have a really great day!


Reference: What is BIM – The simplest explanation of BIM


Related Posts
Diệp Quân
Nguyen Manh Cuong is the author and founder of the vmwareplayerfree blog. With over 14 years of experience in Online Marketing, he now runs a number of successful websites, and occasionally shares his experience & knowledge on this blog.
SHARE

Related Posts

Subscribe to get free updates

Post a Comment

Sticky