Skip to content

Software Development at Program Tom LTD

Place for coding, programming, development and software in general.

Menu
  • Blog
  • PDF Booklets
  • Dev Utils & Content
  • Java Spring Boot Or Web Apps
  • English
    • български
    • English
    • Español
    • Português
    • हिन्दी
    • Русский
    • Deutsch
    • Français
    • Italiano
    • العربية
  • About Us
Menu
State of User Authentication and Authorization

Client State of an Authentication & Authorization App

Posted on February 22, 2021February 22, 2021 by Toma Velev

Most Real World Internet Systems have Authentication and Authorization and currently the world is mind-blown by State focused Frameworks and Development Approaches. So I decided to describe what could be the mix of both areas.

From an Authentication & Authorization point of view – the modern way to implement a backend is the Application Layer to not store any state. If there is some data required by the server – it is stored as one time application settings. Otherwise information is and queried on each request from external systems. The User’s Data is kept in a SQL Storage, in Memory for fast access or in NoSQL Database. The state that is stored on the client in some way is:

  • Non-Secure Client Storage – Data on the client may be kept in a non-secure Local Storage in the Browsers, Shared Preferences on Android or NS User Defaults preferences on iOS.
  • Secure Client Storage – iOS has the Keychain – Secure Container, Android has the biometrically protected Key Stores and the external to the app Account Manager. The browsers have http-only cookies that are not accessible to JavaScript code and are only resent to the servers in the request passively and also Web Crypto API: https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API | https://browsersecrets.restograde.com/.

Has the User Logged In?

The values stored in the client could be true or false. This flag could be present in a standalone variable or it could be calculated by an expression from other fields/parameters. It could be the presence of one or more tokens, numbers, key-value maps valid until time X. A presence of expiration time in the active variable is important for security reasons.

Source of Authentication

Currently you could find endless possibilities of source of authentication.

  • Internal Authentications – they are preferred by Application Engineers, because they are independent from external services and give the most control.
    • The most powerful, important, and used option is a Private Database. This means in most cases email + B-Crypt Encrypted passwords.
    • In some small cases the Email is a Username and alternatively – GSM Mobile Number.
  • External Services – delegating the pain of authentication and focus more on the Service part.
    • LDAP & ERP – probably mostly used in corporate, institutional and legacy systems.
    • OAuth & OpenID – mostly applied in systems for the broad public.

Social Media Authentication for Apps

Most Social Network use OAuth & OpenID. They have Web Interface for Developers where you could set the required settings so your external service or app is authorized against their servers.

Authorization State of  a User

The Software Community as a whole have invested a lot of time, effort and energy in improving most important layer of the Internet. People found meaningful to separate the Authentication from the Authorization for a security, modularity and scalability reasons.

  • Cookie – old systems use cookies

Cookies are key-value files that are sent to the client by a HTTP Application Server. The value is usually a big number or GUID. They require from the Application Server to store the association of the key-value in the cookie to your log-in session. This approach is considered old and unscalable. But, you’ve got to first understand what is your purpose with the software. If some Web Site does not have many active in the same time – registered users, this approach is totally fine.

  • JWT – the modern way are the JSON Web Tokens.

JWTs are cryptographically protected. They could be verified by any Application Server that has a copy of the Private Key that have created them. The Minds of the Internet World have embraced them. The smart people are thinking new ways every year – how these tokens could be extended to accommodate the endless new use cases. Having Community for Standards – educational and non-profit organizations – All participants test and try to keep up with the new Encryption and Security Solutions.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Feature Flags – Enable Functionality from the BackEnd
  • Integrating xAI Grok API with Spring Boot
  • How to Progresively Integrate AI
  • What is an AI Agent
  • Flutter image scaling

Categories

  • Apps (22)
  • ChatGPT (23)
  • Choosing a Framework (38)
  • Flutter (256)
  • Graphical User Interface (14)
  • Marketing (116)
  • Software Development (281)
  • Spring (44)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (14)

Tags

Algorithms (9) crypto (29) flutterdev (39) General (86) Java (7) QR & Bar Codes (3) Software Dev Choices (33) Spring Boot (1) standards (1) Theme (3) User Authentication & Authorization (9) User Experience (10) Utilities (19) WordPress (11)

Product categories

  • All Technologies (84)
    • Flutter Apps (24)
    • GPT (4)
    • Java (38)
    • Native Android (3)
    • PHP (9)
    • Spring (Boot) / Quarkus (35)
    • Utils (15)
    • Vaadin 24+ (27)
    • Vaadin 8 (1)
  • Apps (18)
    • Employees DB (1)
    • Notes (6)
    • Personal Budget (1)
    • Recipes Book (1)
    • Stuff Organizer (1)
    • To-Do (2)
  • PDF Books (3)
  • Source Code Generators (8)

Recent Posts

  • Feature Flags – Enable Functionality from the BackEnd
  • Integrating xAI Grok API with Spring Boot
  • How to Progresively Integrate AI
  • What is an AI Agent
  • Flutter image scaling

Post Categories

  • Apps (22)
  • ChatGPT (23)
  • Choosing a Framework (38)
  • Flutter (256)
  • Graphical User Interface (14)
  • Marketing (116)
  • Software Development (281)
  • Spring (44)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (14)