Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 19, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 19, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 19, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 19, 2025

      Computex

      May 19, 2025

      DOOM: The Dark Ages gets Path Tracing update in June, bringing better visuals for PC players

      May 19, 2025

      Early Memorial Day deals are LIVE on Windows PCs, gaming accessories, and more — 6 hand-picked discounts on our favorites

      May 19, 2025

      Microsoft open sources the Windows Subsystem for Linux — invites developers to help more seamlessly integrate Linux with Windows

      May 19, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      How JavaScript’s at() method makes array indexing easier

      May 19, 2025
      Recent

      How JavaScript’s at() method makes array indexing easier

      May 19, 2025

      Motherhood and Career Balance in Tech: Stories from Perficient LATAM

      May 19, 2025

      ES6: Set Vs Array- What and When?

      May 19, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Computex

      May 19, 2025
      Recent

      Computex

      May 19, 2025

      DOOM: The Dark Ages gets Path Tracing update in June, bringing better visuals for PC players

      May 19, 2025

      Early Memorial Day deals are LIVE on Windows PCs, gaming accessories, and more — 6 hand-picked discounts on our favorites

      May 19, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Databases»Introducing MongoDB Atlas Service Accounts via OAuth 2.0

    Introducing MongoDB Atlas Service Accounts via OAuth 2.0

    April 2, 2025

    Authentication is a crucial aspect of interacting with the MongoDB Atlas Administration API, as it ensures that only authorized users or applications can access and manage resources within a MongoDB Atlas project. While MongoDB Atlas users currently have programmatic API keys (PAKs) as their primary authentication method, we recognize that development teams have varying authentication workflow requirements.

    To help developer teams meet these requirements, we’re excited to announce that Service Accounts via OAuth 2.0 for MongoDB Atlas is now generally available! MongoDB Atlas Service Accounts offer a more streamlined way of authenticating API requests for applications, enabling your developers to use their preferred authentication workflow.

    Addressing the challenges of using programmatic access keys

    At some point in your MongoDB Atlas journey, you have likely created PAKs. These API keys enable MongoDB Atlas project owners to authenticate access for their users. API keys include a public key and a private key. These two parts serve the same function as a username and a password when you make API requests to MongoDB Atlas. Each API key belongs to only one organization, but you can grant API keys access to any number of projects in that organization.

    PAKs use a method of authentication known as HTTP Digest, which is a challenge-response authentication mechanism that uses a hash function to securely transmit credentials without sending plaintext passwords over the network. MongoDB Atlas hashes the public key and the private key using a unique value called a nonce. The HTTP Digest authentication specifies that the nonce is only valid for a short amount of time. This is to prevent replay attacks so that you can’t cache a nonce and use it forever. It’s also why your API keys are a mix of random symbols, letters, and numbers and why you can only view a private key once. As a result, many teams must manage and rotate PAKs to maintain application access security. However, doing this across multiple applications can be cumbersome, especially for teams operating in complex environments.

    As a result, we’ve introduced support for an alternate authentication method through Service Accounts via OAuth 2.0, which enables users to take advantage of a more automated authentication method for application development.

    Using Service Accounts with an OAuth 2.0 client credentials flow

    OAuth 2.0 is a standard for interapplication authentication that relies on in-flight TLS encryption to secure its communication channels. This prevents unauthorized parties from intercepting or tampering with the data.
    The MongoDB Atlas Administration API supports in-flight TLS encryption and uses it to enable Service Accounts as an alternative method for authenticating users.

    MongoDB Atlas Service Accounts provide a form of OAuth 2.0 authentication that enables machine-to-machine communication. This enables applications, rather than users, to authenticate and access MongoDB Atlas resources. Authentication through Service Accounts follows the same access control model as PAKs, with full authentication lifecycle management. Service Accounts use the OAuth 2.0 client credentials flow, with MongoDB Atlas acting as both the identity provider and the authorization server. Like PAKs, Service Accounts are not tied to individual MongoDB Atlas users but are still ingrained with MongoDB Atlas.

    Figure 1. How it Works – MongoDB Atlas Service Accounts
    Diagram showing how MongoDB Atlas Service Accounts work. At the top, the customer creates a service account via Atlas. Step 2, the users takes Client ID and Secret and requests an access token in the OAuth2.0 client interfact. Finally, the user sends the API call with the access token to associate it with their Atlas account.

    Experiencing benefits through Service Accounts

    Using Service Accounts to manage programmatic access offers a number of advantages:

    Automation

    Service Accounts offer an automated way to manage access. Users don’t need to manually manage authentication mechanisms, like recreating a Service Account to rotate the “client secrets.” Instead, they only need to regenerate the client secrets while keeping the other configuration of the existing Service Account intact. Furthermore, Service Accounts are broadly supported across many platforms, enabling easier integration between different services and tools and facilitating easier connections across applications and infrastructure components, regardless of the underlying technology.

    Seamless integration with MongoDB Atlas

    Service Accounts enable developers to manage authentication in the workflow of their choice. Users can manage the Service Account lifecycle at the organization and project levels via the MongoDB Atlas Administration API, the provided client library (currently, the Atlas Go SDK) , and the Atlas UI. They integrate with MongoDB Atlas via the OAuth 2.0 client credential flow, enabling seamless authentication using cloud-native identity systems.

    Granular access control and role management

    Service Accounts also have robust security features, providing a standardized and consistent way to manage access. Each organization or project can have its own Service Account, simplifying credential management and access control. Additionally, you can define granular roles for a Service Account to limit its access to only the necessary resources. This reduces the risk of over-permissioning and unauthorized access.

    Ready to uplevel your user authentication?

    Learn how to create your first Service Account by visiting our documentation. Not a MongoDB Atlas user yet? Sign up for free today.

    Source: Read More

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleModeling Speech Emotion With Label Variance and Analyzing Performance Across Speakers and Unseen Acoustic Conditions
    Next Article Google Fixed Cloud Run Vulnerability Allowing Unauthorized Image Access via IAM Misuse

    Related Posts

    Development

    February 2025 Baseline monthly digest

    May 19, 2025
    Development

    How Cybercriminals Crack Your Passwords (And How to Stay One Step Ahead)

    May 19, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Microsoft Teams marches closer to letting you skip meetings, don’t tell your boss

    News & Updates

    Can test cases from test link be mapped to TFS?

    Development

    CVE-2025-4723 – iSourcecode Placement Management System SQL Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Understanding VAPT: What it is and Why You Need It

    Development

    Highlights

    News & Updates

    “I would have made different decisions than they made.” Diablo creator discusses the franchise’s move to MMO-style in a recent interview

    February 10, 2025

    David Brevik, creator of Diablo, reveals insights into early Diablo 3 concepts, including its ambitious…

    CMU Researchers Propose XGrammar: An Open-Source Library for Efficient, Flexible, and Portable Structured Generation

    November 24, 2024

    SelfGoal: An Artificial Intelligence AI Framework to Enhance an LLM-based Agent’s Capabilities to Achieve High-Level Goals

    June 15, 2024

    This is the cheapest Android tablet I’ve ever tested – and it’s surprisingly capable

    February 21, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.