<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kaiwalya Koparkar</title>
    <description>The latest articles on DEV Community by Kaiwalya Koparkar (@kaiwalyakoparkar).</description>
    <link>https://dev.to/kaiwalyakoparkar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F390315%2F38b33822-7d99-4b8d-ae9b-d1a2f1ebd556.jpeg</url>
      <title>DEV Community: Kaiwalya Koparkar</title>
      <link>https://dev.to/kaiwalyakoparkar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kaiwalyakoparkar"/>
    <language>en</language>
    <item>
      <title>SFTPGo: Free Open Source SFTP Server with Advanced File Management</title>
      <dc:creator>Kaiwalya Koparkar</dc:creator>
      <pubDate>Mon, 25 Nov 2024 07:40:46 +0000</pubDate>
      <link>https://dev.to/elestio/sftpgo-free-open-source-sftp-server-with-advanced-file-management-15l6</link>
      <guid>https://dev.to/elestio/sftpgo-free-open-source-sftp-server-with-advanced-file-management-15l6</guid>
      <description>&lt;p&gt;Managing file storage and transfers efficiently and securely has become critical for modern businesses. &lt;a href="https://elest.io/open-source/sftpgo?ref=blog.elest.io" rel="noopener noreferrer"&gt;&lt;strong&gt;SFTPGo&lt;/strong&gt;&lt;/a&gt;, a free, open-source SFTP server, delivers on this need with advanced file management features.&lt;/p&gt;

&lt;p&gt;It extends beyond traditional SFTP by integrating cloud storage, offering fine-grained role-based permissions, and enabling event-driven automations. If you’re looking for file sharing, cloud storage workflows, while maintaining compatibility with classic tools like FileZilla, SFTPGo offers the perfect free solution.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Watch our SFTPGo platform overview on YouTube&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Cloud File Storage&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;SFTPGo goes beyond being just a secure file transfer server. It can also function as a cloud-native file storage system, offering features like encrypted at-rest storage, virtual file systems, and on-the-fly compression.&lt;br&gt;&lt;br&gt;
This capability allows users to handle large-scale file transfers and long-term file storage in one unified platform. By supporting multiple storage backends, SFTPGo provides businesses the flexibility to adapt to various operational needs.&lt;/p&gt;

&lt;p&gt;For example, you can configure SFTPGo to store files locally (on the SFTPGo server), or scale up by leveraging cloud integrations, ensuring seamless performance regardless of the workload.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;S3 &amp;amp; Cloud Storage Integrations&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One of SFTPGo’s standout features is its &lt;strong&gt;deep integration with cloud storage platforms&lt;/strong&gt;. It supports popular cloud storage services, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Amazon S3 Compatible (Minio, R2, ...)&lt;/strong&gt;: Store files directly in your S3 buckets and use SFTPGo as the bridge for secure file transfers to and from S3.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Cloud Storage&lt;/strong&gt; : Link to Google Cloud buckets to create an efficient hybrid cloud environment for your business needs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Azure Blob Storage&lt;/strong&gt; : Ensure seamless compatibility with Microsoft’s cloud storage service, enabling smooth workflows for Azure users.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These integrations simplify file management for businesses operating in hybrid or multi-cloud setups. By combining SFTP with scalable cloud storage, organizations can focus on growth without worrying about infrastructure limitations.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Advanced Roles &amp;amp; Permissions&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Security and compliance are paramount when handling sensitive files, and SFTPGo excels in this area with its &lt;strong&gt;granular role and permissions system&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Admins can define specific access rights at various levels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Assign permissions per user or group.&lt;/li&gt;
&lt;li&gt;Set up access for individual directories or files.&lt;/li&gt;
&lt;li&gt;Implement upload/download restrictions for enhanced control.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Such detailed permissions not only boost security but also streamline collaboration by ensuring that team members access only what they need.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Event-Driven Automation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Modern workflows often require dynamic responses to file-related events. SFTPGo’s &lt;strong&gt;event-driven automation&lt;/strong&gt; empowers users to configure custom actions triggered by specific events, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File uploads&lt;/li&gt;
&lt;li&gt;Downloads&lt;/li&gt;
&lt;li&gt;Deletions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By leveraging its webhook and scripting capabilities, you can integrate SFTPGo into your existing automation ecosystem. For example, you can trigger notifications, update databases, or sync files across systems as part of a seamless workflow. This makes SFTPGo a powerful tool for reducing manual intervention and improving efficiency.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Classic SFTP Compatibility&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;While SFTPGo introduces cutting-edge features, it doesn’t forget its roots. The server is fully compatible with classic &lt;strong&gt;SFTP clients&lt;/strong&gt; , such as &lt;strong&gt;FileZilla&lt;/strong&gt; , &lt;strong&gt;WinSCP&lt;/strong&gt; , and &lt;strong&gt;Cyberduck&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Users familiar with these tools can effortlessly connect to SFTPGo without needing additional training or adjustments, ensuring a smooth transition for teams. This compatibility is essential for organizations that rely on legacy systems while embracing modern solutions.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;SFTPGo is more than just an SFTP server—it's a versatile and feature-rich file management platform. From robust cloud integrations and advanced permission settings to event-driven automations and compatibility with classic SFTP clients, SFTPGo meets the needs of modern businesses.&lt;/p&gt;

&lt;p&gt;As a free and open-source solution, it’s ideal for organizations seeking cost-effective, secure, and scalable file storage and transfer capabilities. If you’re looking for a way to modernize your file transfer processes without compromising on flexibility or security, SFTPGo is an excellent choice.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://elest.io/open-source/sftpgo?ref=blog.elest.io" rel="noopener noreferrer"&gt;Discover how SFTPGo can transform your file management workflows by trying it today with Elestio&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensourcesoftwares</category>
    </item>
    <item>
      <title>Best Practices for Building Interactive Dashboards in Apache Superset</title>
      <dc:creator>Kaiwalya Koparkar</dc:creator>
      <pubDate>Sun, 24 Nov 2024 06:39:18 +0000</pubDate>
      <link>https://dev.to/elestio/best-practices-for-building-interactive-dashboards-in-apache-superset-48f9</link>
      <guid>https://dev.to/elestio/best-practices-for-building-interactive-dashboards-in-apache-superset-48f9</guid>
      <description>&lt;p&gt;Hello everyone! we’ll explore the essential best practices for building interactive dashboards in &lt;a href="https://elest.io/open-source/superset?ref=blog.elest.io" rel="noopener noreferrer"&gt;Apache Superset&lt;/a&gt;. Superset is an open-source data visualization platform that helps users to create insightful dashboards and explore data effortlessly. However, to fully use its potential, understanding optimization techniques and design principles is important. This guide will provide you with strategies to enhance query performance, improve usability, and ensure security, enabling you to create efficient and visually appealing dashboards that meet the needs of your users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optimizing Query Performance
&lt;/h2&gt;

&lt;p&gt;Optimizing query performance in Apache Superset is crucial to ensure that your visualizations load quickly and efficiently. Several best practices can significantly enhance query efficiency, minimizing response time for users while preventing excessive load on your database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Indexing&lt;/strong&gt; : One of the simplest yet most effective ways to boost query performance is by indexing the columns frequently used in filters, joins, and group by clauses. Indexes allow the database to retrieve data faster, reducing the time it takes to complete queries. Without proper indexing, the database scans entire tables, which becomes time-consuming, especially with large datasets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Partitioning&lt;/strong&gt; : Partitioning your tables by frequently queried columns can improve performance by limiting the data that needs to be scanned during a query. For example, partitioning based on date ranges can be particularly useful for time-series data, helping the database to isolate and retrieve only the necessary partitions, thereby reducing overall query time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aggregation&lt;/strong&gt; : Using pre-aggregated tables or materialized views allows you to summarize data before querying. This technique minimizes the amount of data processed during a query, as the database can reference these pre-computed results rather than calculating them in real time. It’s especially helpful when dealing with complex queries involving large datasets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Caching&lt;/strong&gt; : Apache Superset includes a caching mechanism that can store the results of frequent queries. By caching commonly accessed query results, subsequent queries can be served from the cache, dramatically reducing load times. Properly configuring caching for dashboards with repetitive queries is essential to maintaining fast performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Query Optimization&lt;/strong&gt; : Writing efficient SQL is fundamental. Avoid using broad patterns like &lt;code&gt;SELECT *&lt;/code&gt;, which retrieves all columns and can slow down performance. Instead, select only the necessary columns. Additionally, using the &lt;code&gt;EXPLAIN&lt;/code&gt; function allows you to analyze query plans and identify potential bottlenecks, enabling further optimization of your SQL queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Database Tuning&lt;/strong&gt; : It’s vital to regularly monitor and tune your database settings to align with your workload patterns. Database tuning involves adjusting parameters, such as memory allocation and connection pooling, to ensure that your system is performing optimally as your data volume and query complexity grow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dashboard Design and Usability
&lt;/h2&gt;

&lt;p&gt;When designing an Apache Superset dashboard, we should prioritize usability and user experience. A well-designed dashboard not only conveys information effectively but also enhances the decision-making process for users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understand Your Audience&lt;/strong&gt; : Knowing your audience is key to creating an effective dashboard. Analysts may need detailed, granular data to drill into specifics, while executives might prefer high-level overviews. Understanding the user’s role and what they need to accomplish with the data allows you to tailor your design accordingly. Construct your dashboards to meet these needs ensures the right information is accessible at the right time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simplify the Design&lt;/strong&gt; : Less is more when it comes to dashboards. Avoid overwhelming users with excessive charts, tables, or data points. Focus on the critical metrics that offer the most value. Effective use of whitespace can help to organize information logically, preventing the dashboard from appearing cluttered and making it easier to navigate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consistent Layout&lt;/strong&gt; : Maintaining a consistent layout across all your dashboards allows users to familiarize themselves with the interface and locate information quickly. Group related charts and metrics together, and align them symmetrically for a polished and professional appearance. Consistency creates a seamless user experience, helping users to focus on the data rather than on figuring out the layout.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use of Colors&lt;/strong&gt; : Colors should be used purposefully to guide the user's eye and emphasize important data points. Avoid using too many colors, which can lead to confusion. Instead, maintain a coherent color scheme that highlights trends and outliers while remaining easy on the eyes. Use color to indicate categories, performance levels, or thresholds to enhance interpretability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Responsive Design&lt;/strong&gt; : Ensure that your dashboard is accessible on devices of varying screen sizes is crucial. Apache Superset offers the flexibility to design dashboards that adjust to different screen resolutions, ensuring usability whether accessed on a desktop, tablet, or smartphone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accessibility&lt;/strong&gt; : Designing with accessibility in mind is important to ensure your dashboards are usable by all individuals, including those with disabilities. Consider color contrast, readable fonts, and keyboard navigation to create dashboards that accommodate a wider audience, adhering to best practices in accessibility design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance&lt;/strong&gt; : Large datasets can slow down dashboards, leading to a frustrating user experience. Optimizing your dashboard for quick load times—whether by reducing unnecessary charts, filtering data, or using caching mechanisms—is crucial for performance. Fast, responsive dashboards encourage user engagement and reduce friction during data exploration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security Best Practices
&lt;/h2&gt;

&lt;p&gt;Security is a cornerstone when working with any data platform, and Apache Superset is no exception. Ensuring that your deployment is secure protects sensitive information and minimizes vulnerabilities that could compromise your data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authentication and Authorization&lt;/strong&gt; : Apache Superset integrates with Flask AppBuilder, offering an authentication and role-based access control system. Make sure you configure user roles properly and restrict access based on necessity. Avoid altering permissions without a clear purpose, and regularly update roles to stay aligned with security policies. After upgrades, always refresh permissions using &lt;code&gt;superset init&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTTPS Configuration&lt;/strong&gt; : Always secure your Superset deployment with HTTPS, particularly when handling sensitive data in production environments. SSL/TLS encryption ensures that traffic between users and your server remains secure. Consider SSL/TLS offloading through a reverse proxy or load balancer to further enhance security.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Content Security Policy (CSP)&lt;/strong&gt;: Implement a Content Security Policy (CSP) using Flask Talisman to mitigate risks like cross-site scripting (XSS) or data injection attacks. A well-configured CSP can act as an additional layer of security, preventing unauthorized content execution within your Superset dashboards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Database Security&lt;/strong&gt; : When choosing a database for Superset, use supported databases such as PostgreSQL or MySQL, and avoid using SQLite in production environments due to its limitations in scalability and security. Additionally, ensure regular backups of your metadata database to safeguard against data loss.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Secret Management&lt;/strong&gt; : Properly manage and secure sensitive data like the &lt;code&gt;SECRET_KEY&lt;/code&gt; and database credentials. Store secrets securely, and rotate keys periodically to ensure that any potential breaches can be contained and resolved quickly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Telemetry Opt-Out&lt;/strong&gt; : If data privacy is a concern, you can opt out of Superset’s telemetry data collection by adjusting your Docker image configuration. This is particularly important for users in highly regulated industries where data sharing, even for metrics, could pose a risk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scalability and High Availability
&lt;/h2&gt;

&lt;p&gt;Apache Superset is designed to handle large-scale environments with high availability. Its architecture can be configured to meet the demands of scaling both horizontally and vertically, making it a reliable choice for organizations with extensive data needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flexibility in Configuration&lt;/strong&gt; : Superset offers a flexible, cloud-native architecture, giving you options for customizing various components. For instance, you can choose from different web servers like Gunicorn, Nginx, or Apache and a range of metadata database engines, including PostgreSQL, MySQL, and MariaDB. It also integrates with popular message queues such as Celery, Redis, RabbitMQ, or Amazon SQS for background tasks, ensuring smooth operations at scale.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance Considerations&lt;/strong&gt; : The underlying database engines play a significant role in determining the performance of your Superset instance. Superset serves as a visualization layer, relying on the database to return query results efficiently. Monitoring and scaling your databases, as well as tuning query performance, are essential steps to ensure smooth operation, especially when dealing with large datasets or complex queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Integration with Event-Logging Services&lt;/strong&gt; : Superset integrates with popular event-logging and monitoring services like StatsD, NewRelic, and DataDog. These services allow you to track system performance, user interactions, and other critical metrics, providing valuable insights that help maintain system health as your user base grows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Effective Use of Caching
&lt;/h2&gt;

&lt;p&gt;Caching is one of the most critical techniques for improving the performance of dashboards in Apache Superset. By storing frequent query results, caching reduces the load on your database and accelerates the user experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cache Configuration&lt;/strong&gt; : To set up caching in Superset, you can configure multiple caching layers in the &lt;code&gt;superset_config.py&lt;/code&gt; file, using backends such as Redis, Memcached, or the filesystem. Here are some recommended configurations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dashboard Filter State&lt;/strong&gt; : Use the &lt;code&gt;FILTER_STATE_CACHE_CONFIG&lt;/code&gt; to cache filter states across dashboards, improving load times when users apply filters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explore Chart Form Data&lt;/strong&gt; : The &lt;code&gt;EXPLORE_FORM_DATA_CACHE_CONFIG&lt;/code&gt; caches chart form data, reducing the need to recalculate form inputs for each query.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metadata Cache&lt;/strong&gt; : The &lt;code&gt;CACHE_CONFIG&lt;/code&gt; can be set up to store metadata, allowing for faster dashboard rendering when reloading the same dataset.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dataset Query Results&lt;/strong&gt; : Use &lt;code&gt;DATA_CACHE_CONFIG&lt;/code&gt; to cache results of expensive dataset queries.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example &lt;code&gt;Redis&lt;/code&gt; configuration for cache setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FILTER_STATE_CACHE_CONFIG = {
    'CACHE_TYPE': 'RedisCache',
    'CACHE_DEFAULT_TIMEOUT': 86400,
    'CACHE_KEY_PREFIX': 'superset_filter_cache',
    'CACHE_REDIS_URL': 'redis://localhost:6379/0'
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Best Practices&lt;/strong&gt; : You should align caching strategies with your data usage patterns. Regularly clear outdated cache entries, particularly when data changes frequently, to ensure users see the latest information. For dashboards accessed by multiple users, cached query results can significantly reduce load times, especially during peak traffic periods.&lt;/p&gt;

&lt;p&gt;By effectively utilizing caching, you can create a smoother, faster experience for your users, ensuring that large datasets or complex queries do not hinder dashboard performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Source Management
&lt;/h2&gt;

&lt;p&gt;Managing data sources is essential for getting the most out of Apache Superset.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connecting to New Databases&lt;/strong&gt; : Superset makes it easy to connect to various SQL-speaking databases. To add a new database, navigate to the &lt;strong&gt;+&lt;/strong&gt; menu, select &lt;strong&gt;Data&lt;/strong&gt; , and click on &lt;strong&gt;Connect Database&lt;/strong&gt;. This process allows you to select the appropriate database type (e.g., PostgreSQL, MySQL, or SQLite for testing environments) and input the connection credentials, including the SQLAlchemy URI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Database Connection Strings&lt;/strong&gt; : For different environments, you can use the appropriate connection strings. For instance, in Linux Docker setups, you might use a connection string like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mysql://user:password@localhost/dbname?charset=utf8

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Be sure to test the connection before proceeding with data exploration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Supported Databases and Drivers&lt;/strong&gt; : Superset supports various databases, but make sure you install the necessary Python drivers for your specific database. For example, use &lt;code&gt;psycopg2&lt;/code&gt; for PostgreSQL or &lt;code&gt;mysqlclient&lt;/code&gt; for MySQL. This ensures compatibility and enables smooth data retrieval from the connected data sources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Customization and Extensibility
&lt;/h2&gt;

&lt;p&gt;Apache Superset’s flexibility extends beyond its out-of-the-box functionality, allowing users to customize the platform according to their specific needs. Whether you’re creating custom visualization plugins or extending the platform’s capabilities, Superset can be tailored to fit your organization’s unique requirements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Visualization Plugins&lt;/strong&gt; : Superset allows you to create custom visualization plugins using JavaScript or TypeScript. These plugins can be added to the Superset frontend and integrated into your dashboard. For example, by modifying the &lt;code&gt;superset-frontend/src/visualizations/presets/MainPreset.js&lt;/code&gt; file, you can introduce new chart types that cater to specific business needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Customization Options&lt;/strong&gt; : The platform also allows for customizing features like authentication backends, role-based access controls, and even the SQL editor. Superset’s modular design makes it easy to extend functionality by adding custom connectors or embedding new data processing modules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installation Options&lt;/strong&gt; : Superset can be installed using various methods, such as Docker, Kubernetes, or directly from PyPI. Each installation method provides different levels of control and customization, allowing you to configure Superset in a way that best suits your infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitoring and Logging
&lt;/h2&gt;

&lt;p&gt;Effective monitoring and logging are useful for maintaining a reliable and scalable Apache Superset deployment. With the right monitoring strategy, you can proactively detect issues, optimize performance, and maintain system integrity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Metrics and Alerting&lt;/strong&gt; : Superset can integrate with monitoring tools such as Prometheus, StatsD, and DataDog to track critical metrics like query performance, system resource usage, and error rates. Setting up real-time alerts based on key performance indicators ensures that you are immediately notified when performance drops or issues arise.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Centralized Logging&lt;/strong&gt; : Superset logs user interactions, database queries, and system events. Storing these logs in a centralized logging system like ELK (Elasticsearch, Logstash, Kibana) or Splunk allows for easier analysis, long-term storage, and improved troubleshooting capabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structured Logging&lt;/strong&gt; : Use structured logging formats like JSON to make it easier to search, filter, and analyze log data. This becomes especially important in distributed environments where logs from different services need to be correlated for a comprehensive view of system behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  Collaboration and Sharing
&lt;/h2&gt;

&lt;p&gt;Apache Superset supports you to enhance team collaboration, making it easy for users to share insights and work together on data analysis projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Role-Based Access Control (RBAC)&lt;/strong&gt;: Superset’s RBAC system allows administrators to assign user permissions based on roles, ensuring that only authorized users can access sensitive data. This promotes collaboration while maintaining data security, enabling users to share dashboards, charts, and datasets without risking unauthorized access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dashboard Sharing&lt;/strong&gt; : Dashboards can be easily shared among team members, allowing for collaborative data exploration. Superset’s email and Slack integrations also enable automated report sharing, making it easier for teams to stay informed and make data-driven decisions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Version Control&lt;/strong&gt; : Implementing version control for dashboards ensures that changes are tracked and documented. This feature is particularly useful for large teams working on complex projects, allowing members to review and revert changes when necessary.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Thanks for reading ❤️&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;By adhering to these best practices and leveraging the full suite of features that Apache Superset offers, you can create powerful, scalable, and secure data visualization platforms that drive better business decisions. Thank you so much for reading and do check out the Elestio resources and Official Keycloak documentation to learn more about Superset. You can click the button below to create your service on &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio&lt;/a&gt;. See you in the next one👋&lt;/p&gt;

&lt;p&gt;&lt;a href="https://elest.io/open-source/superset?ref=blog.elest.io" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc5zvhkzhhcg8kfvnm6up.png" alt="Best Practices for Building Interactive Dashboards in Apache Superset" width="194" height="40"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>superset</category>
      <category>opensourcesoftwares</category>
      <category>elestio</category>
    </item>
    <item>
      <title>How to Install Extensions in Keycloak</title>
      <dc:creator>Kaiwalya Koparkar</dc:creator>
      <pubDate>Sun, 24 Nov 2024 06:38:47 +0000</pubDate>
      <link>https://dev.to/elestio/how-to-install-extensions-in-keycloak-33oj</link>
      <guid>https://dev.to/elestio/how-to-install-extensions-in-keycloak-33oj</guid>
      <description>&lt;p&gt;We will see how to install extensions in &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Keycloak&lt;/a&gt;. Before we start, ensure you have deployed Keycloak, we will be self-hosting it on &lt;a href="https://elest.io/open-source/n8n?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio&lt;/a&gt;. Keycloak is an open-source identity and access management solution, offering single sign-on (SSO), social login, and centralized authentication and authorization. To enhance its functionality, you can install various extensions. This guide provides a walkthrough on how to install and configure Keycloak extensions, using Keycloak authentication as an example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;To install a Keycloak extension in your application, follow these detailed steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Access the Extension Management Section:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Within your application's administrative dashboard, navigate to the extension management section. This section might be labelled as "Manage Extensions," "Extension Management," "Add-ons," or something similar.&lt;/li&gt;
&lt;li&gt;This area allows you to view, add, and manage the various extensions that can be integrated with your application, enhancing its capabilities.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Find and Install the Keycloak Extension:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;In the extension management page, click the tab to view available extensions. This tab is often labelled as "Available Extensions" or "Browse Extensions."&lt;/li&gt;
&lt;li&gt;Use the filter or search bar to look for "Keycloak." This feature helps you quickly locate the desired extension from the potentially extensive list of available options.&lt;/li&gt;
&lt;li&gt;Once you find the Keycloak extension, click either “Install without restart” or “Download now and install after restart.” These options allow for flexibility based on whether you can afford to restart your application immediately.&lt;/li&gt;
&lt;li&gt;If required, restart your application to complete the installation process. Restarting ensures that the newly installed extension is loaded properly and is ready for configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;Once the Keycloak extension is installed, you need to configure it to use Keycloak for authentication. Here’s a step-by-step guide:&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Create a Keycloak Client in a Realm&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Set Up the Keycloak Realm and Client:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Log in to your Keycloak administration console with the credentials provided on the Elestio dashboard. This console is the central interface for managing all your Keycloak settings and configurations.&lt;/li&gt;
&lt;li&gt;Create a new realm or use an existing one. A realm in Keycloak is a space where you manage objects, including users, applications (clients), and roles. For this example, let’s call the realm &lt;code&gt;myrealm&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;In the &lt;code&gt;myrealm&lt;/code&gt; realm, create a new client. Name the client according to your application’s purpose. For instance, if your application runs on port 8080, you might name the client &lt;code&gt;myapp&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Ensure you configure the client correctly by setting parameters such as the client protocol (typically SAML or OpenID Connect), redirect URIs, and any other required settings. Proper configuration ensures seamless communication between Keycloak and your application.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create Sample Users:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Within the &lt;code&gt;myrealm&lt;/code&gt; realm, create some sample users for testing purposes. This step is crucial for verifying that the Keycloak authentication integration works correctly. For instance, you could create a user named &lt;code&gt;testuser&lt;/code&gt; with a simple password.&lt;/li&gt;
&lt;li&gt;Assign appropriate roles and permissions to these users to match the typical usage scenarios of your application.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Copy the Keycloak Configuration File&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Obtain the Keycloak Configuration File:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the 'Installation' tab of your client settings in Keycloak. This tab provides various configuration options and formats for integrating Keycloak with different applications.&lt;/li&gt;
&lt;li&gt;Download the &lt;code&gt;keycloak.json&lt;/code&gt; file or copy the JSON configuration data. This file contains essential information that your application needs to authenticate with Keycloak, such as realm details, client ID, and endpoints.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Configure Your Application to Use Keycloak&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Access Your Application’s Security Settings:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;In your application's global security settings page, locate the section where you configure authentication methods or security realms. This section might be found under settings like "Security," "Authentication," or "Identity Providers."&lt;/li&gt;
&lt;li&gt;Choose the Keycloak Authentication Extension or equivalent option for your application. This step integrates Keycloak as the identity provider for your application.&lt;/li&gt;
&lt;li&gt;Paste the content of the &lt;code&gt;keycloak.json&lt;/code&gt; file or input the JSON configuration data as required. This configuration links your application with Keycloak, allowing it to handle user authentication.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Test the Keycloak Integration&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Log In to Your Application:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Try to log in to your application. The login process should now redirect you to the Keycloak login page for authentication. This redirection confirms that your application is correctly configured to use Keycloak as its identity provider.&lt;/li&gt;
&lt;li&gt;Enter the credentials of the test user you created in Keycloak (e.g., &lt;code&gt;testuser&lt;/code&gt;). Successful authentication demonstrates that Keycloak is handling user logins as expected.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Successful Authentication:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;After successfully logging in via Keycloak, you should be redirected back to your application, now authenticated. This flow from your application to Keycloak and back ensures a smooth user experience and confirms that the integration is working correctly.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Installing and configuring extensions in Keycloak can significantly enhance your application's authentication capabilities. By following these steps, you can integrate Keycloak’s authentication features, providing robust security and a seamless login experience for your users. This setup ensures that your application benefits from industry-standard security practices while simplifying user management and authentication processes. Additionally, enabling Keycloak extensions allows for greater flexibility and functionality, catering to diverse application needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Thanks for reading ❤️&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Thank you so much for reading and do check out the Elestio resources and Official &lt;a href="https://www.keycloak.org/documentation?ref=blog.elest.io" rel="noopener noreferrer"&gt;Keycloak documentation&lt;/a&gt; to learn more about Keycloak. Click the button below to create your service on &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio&lt;/a&gt;. See you in the next one👋&lt;/p&gt;

&lt;p&gt;&lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc5zvhkzhhcg8kfvnm6up.png" alt="How to Install Extensions in Keycloak" width="194" height="40"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>keycloak</category>
      <category>softwares</category>
      <category>elestio</category>
    </item>
    <item>
      <title>Setting up Sign in with LinkedIn using Keycloak</title>
      <dc:creator>Kaiwalya Koparkar</dc:creator>
      <pubDate>Sun, 24 Nov 2024 06:38:29 +0000</pubDate>
      <link>https://dev.to/elestio/setting-up-sign-in-with-linkedin-using-keycloak-4c4m</link>
      <guid>https://dev.to/elestio/setting-up-sign-in-with-linkedin-using-keycloak-4c4m</guid>
      <description>&lt;p&gt;Hey everyone, in this blog we will be setting up the "Sign in with LinkedIn" option using Keycloak. We will be using a self-hosted Keycloak instance deployed on Elestio. So, to get started head over to &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio Dashboard&lt;/a&gt; and deploy and login into the Keycloak instance to get started. To set up LinkedIn as an identity provider in Keycloak, follow these detailed steps. Keycloak’s integration with LinkedIn allows users to log in using their LinkedIn credentials, simplifying authentication and enhancing security.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a New Realm
&lt;/h2&gt;

&lt;p&gt;According to the Keycloak documentation&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A realm manages a set of users, credentials, roles, and groups. A user belongs to and logs into a realm. Realms are isolated from one another and can only manage and authenticate the users that they control.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once you are logged in, head over to the drop-down menu on the top left. Notice that there is a default realm, &lt;strong&gt;Keycloak master&lt;/strong&gt; , which has higher privileges. To ensure a safer configuration, it’s recommended to create a new realm. Click on &lt;strong&gt;Create realm&lt;/strong&gt; and add realm details, like the realm name. For example, here we’ll name it &lt;strong&gt;LinkedIn-Auth&lt;/strong&gt;. After entering the details, click on &lt;strong&gt;Create&lt;/strong&gt; to establish your new realm.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F01j3kgfjhvvqsnuyxfdt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F01j3kgfjhvvqsnuyxfdt.jpg" alt="Setting up Sign in with LinkedIn using Keycloak" width="290" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Initial Setup in Keycloak
&lt;/h2&gt;

&lt;p&gt;With your new realm ready, navigate to the &lt;strong&gt;Identity Providers&lt;/strong&gt; section. In the &lt;strong&gt;Social&lt;/strong&gt; section, select &lt;strong&gt;LinkedIn&lt;/strong&gt; to create a new LinkedIn identity provider integration. This action opens a configuration page where you’ll input the credentials needed to connect with LinkedIn.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj63iostkysg4d13wbadh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj63iostkysg4d13wbadh.jpg" alt="Setting up Sign in with LinkedIn using Keycloak" width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On this page, you’ll find a &lt;strong&gt;Redirect URI&lt;/strong&gt; specific to Keycloak. Copy this URI, as you’ll need to register it in LinkedIn’s application settings in the next step. The Redirect URI is crucial, as it ensures a seamless login flow by redirecting users back to Keycloak after authenticating through LinkedIn.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvpsen5cimf7r4urzv4ja.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvpsen5cimf7r4urzv4ja.jpg" alt="Setting up Sign in with LinkedIn using Keycloak" width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Register a New OAuth Application on LinkedIn
&lt;/h2&gt;

&lt;p&gt;To enable LinkedIn login, you’ll need to register Keycloak as an OAuth application within your &lt;a href="https://www.linkedin.com/developers/?ref=blog.elest.io" rel="noopener noreferrer"&gt;LinkedIn Developer Portal&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Log in to the LinkedIn Developer Portal and create a new application.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffdqf3y5piab197my2hb8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffdqf3y5piab197my2hb8.jpg" alt="Setting up Sign in with LinkedIn using Keycloak" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fill in the required fields, including &lt;strong&gt;App Name&lt;/strong&gt; and &lt;strong&gt;App Logo&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4nzsa68wnwsf99vd8knt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4nzsa68wnwsf99vd8knt.jpg" alt="Setting up Sign in with LinkedIn using Keycloak" width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Since you have added a LinkedIn you will have to request the access to provide authentication. Once you request you will get a url that you can send to the page admin to verify and approve the request. Click on &lt;strong&gt;Request access&lt;/strong&gt; in front of &lt;strong&gt;Sign In with LinkedIn using OpenID connect&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2igsrh45m3bnhe7hw2t7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2igsrh45m3bnhe7hw2t7.jpg" alt="Setting up Sign in with LinkedIn using Keycloak" width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Under &lt;strong&gt;OAuth 2.0 Settings&lt;/strong&gt; , add the &lt;strong&gt;Redirect URI&lt;/strong&gt; you copied from Keycloak’s setup page. Ensure that this URI matches exactly, as any differences will prevent LinkedIn from completing the authentication flow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4fluc9op7t05um5wcpk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4fluc9op7t05um5wcpk.jpg" alt="Setting up Sign in with LinkedIn using Keycloak" width="777" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After filling out the form, click on the &lt;strong&gt;Create app&lt;/strong&gt; to register it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Obtain Client ID and Client Secret
&lt;/h2&gt;

&lt;p&gt;Once the application is registered, LinkedIn will provide a &lt;strong&gt;Client ID&lt;/strong&gt; and &lt;strong&gt;Client Secret&lt;/strong&gt;. These credentials are essential for Keycloak to communicate securely with LinkedIn for user authentication. Copy both the Client ID and Client Secret; you’ll need them for the next step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2wxz3jwpo2hs45a5ut4p.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2wxz3jwpo2hs45a5ut4p.jpg" alt="Setting up Sign in with LinkedIn using Keycloak" width="790" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Enter LinkedIn Credentials in Keycloak
&lt;/h3&gt;

&lt;p&gt;Go back to Keycloak’s LinkedIn identity provider configuration page and paste the &lt;strong&gt;Client ID&lt;/strong&gt; and &lt;strong&gt;Client Secret&lt;/strong&gt; into the respective fields. Save the configuration. Once saved, Keycloak will recognize LinkedIn as a valid identity provider, allowing users to authenticate using their LinkedIn accounts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc3jp916loanj5asaseda.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc3jp916loanj5asaseda.jpg" alt="Setting up Sign in with LinkedIn using Keycloak" width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Configuration: Setting the First Login Flow
&lt;/h3&gt;

&lt;p&gt;To ensure a smooth first-time login experience, scroll down in the LinkedIn provider settings until you find the &lt;strong&gt;First Login Flow&lt;/strong&gt; option. If it’s not set to &lt;strong&gt;First Broker Login&lt;/strong&gt; by default, change it to this option. This ensures that users logging in for the first time with LinkedIn will go through the appropriate login and account linking flow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj7ejdtrueui42l8lwiaf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj7ejdtrueui42l8lwiaf.jpg" alt="Setting up Sign in with LinkedIn using Keycloak" width="640" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With everything configured, navigate to the login URL specific to your new realm. You should now see an option to &lt;strong&gt;Sign in with LinkedIn&lt;/strong&gt;. Test the integration by logging in with your LinkedIn credentials to confirm that everything is working correctly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frh17uoxex25sus0e1o08.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frh17uoxex25sus0e1o08.jpg" alt="Setting up Sign in with LinkedIn using Keycloak" width="770" height="697"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Thanks for reading ❤️&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Thank you so much for reading and do check out the resources provided to learn more about the Keycloak. You can click the button below to create your service on &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio&lt;/a&gt; and implement this authentication method. See you in the next one👋&lt;/p&gt;

</description>
      <category>keycloak</category>
      <category>opensourcesoftwares</category>
      <category>elestio</category>
    </item>
    <item>
      <title>Setting up Sign in with GitLab using Keycloak</title>
      <dc:creator>Kaiwalya Koparkar</dc:creator>
      <pubDate>Sun, 24 Nov 2024 06:38:24 +0000</pubDate>
      <link>https://dev.to/elestio/setting-up-sign-in-with-gitlab-using-keycloak-3n82</link>
      <guid>https://dev.to/elestio/setting-up-sign-in-with-gitlab-using-keycloak-3n82</guid>
      <description>&lt;p&gt;Hey everyone, in this blog we will be setting up the "Sign in with GitLab" option using Keycloak. We will be using a self-hosted Keycloak instance deployed on Elestio. So, to get started head over to &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio Dashboard&lt;/a&gt; and deploy and login into the Keycloak instance to get started. To set up GitLab as an identity provider in Keycloak, follow these detailed steps. Keycloak’s integration with GitLab allows users to log in using their GitLab credentials, simplifying authentication and enhancing security.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a New Realm
&lt;/h2&gt;

&lt;p&gt;According to the Keycloak documentation&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A realm manages a set of users, credentials, roles, and groups. A user belongs to and logs into a realm. Realms are isolated from one another and can only manage and authenticate the users that they control.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once you are logged in, head over to the drop-down menu on the top left. Notice that there is a default realm, &lt;strong&gt;Keycloak master&lt;/strong&gt; which has higher privileges. To ensure a safer configuration, it’s recommended to create a new realm. Click on &lt;strong&gt;Create realm&lt;/strong&gt; and add realm details, like the realm name. For example, here we’ll name it &lt;strong&gt;GitLab-Auth.&lt;/strong&gt; After entering the details, click on &lt;strong&gt;Create&lt;/strong&gt; to establish your new realm.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjwirdxopq79w80472t5a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjwirdxopq79w80472t5a.jpg" alt="Setting up Sign in with GitLab using Keycloak" width="310" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Initial Setup in Keycloak
&lt;/h2&gt;

&lt;p&gt;With your new realm ready, navigate to the &lt;strong&gt;Identity Providers&lt;/strong&gt; section. In the &lt;strong&gt;Social&lt;/strong&gt; section, select &lt;strong&gt;GitLab&lt;/strong&gt; to create a new GitLab identity provider integration. This action opens a configuration page where you’ll input the credentials needed to connect with GitLab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy4napbbpaoivqmjl2z5b.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy4napbbpaoivqmjl2z5b.jpg" alt="Setting up Sign in with GitLab using Keycloak" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On this page, you’ll find a &lt;strong&gt;Redirect URI&lt;/strong&gt; specific to Keycloak. Copy this URI, as you’ll need to register it in GitLab’s application settings in the next step. The Redirect URI is crucial, as it ensures a seamless login flow by redirecting users back to Keycloak after authenticating through GitLab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7pc2mwh2tpukcz8b0qo3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7pc2mwh2tpukcz8b0qo3.jpg" alt="Setting up Sign in with GitLab using Keycloak" width="800" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Register a New OAuth Application on GitLab
&lt;/h2&gt;

&lt;p&gt;To enable GitLab login, you’ll need to register Keycloak as an OAuth application within your GitLab account. Start by logging into GitLab and going to &lt;strong&gt;Settings&lt;/strong&gt; &amp;gt; &lt;strong&gt;Applications&lt;/strong&gt; in your GitLab account. Click &lt;strong&gt;New Application&lt;/strong&gt; to start the registration.&lt;/p&gt;

&lt;p&gt;In the registration form, enter the required details:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Name&lt;/strong&gt; : A descriptive name for your app, such as "Keycloak Authentication".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Redirect URI&lt;/strong&gt; : Paste the Redirect URI you copied from Keycloak's GitLab identity provider setup page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fozil3azfoadh2dv3oao5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fozil3azfoadh2dv3oao5.jpg" alt="Setting up Sign in with GitLab using Keycloak" width="800" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scopes&lt;/strong&gt; : Select &lt;code&gt;openid&lt;/code&gt;, &lt;code&gt;profile&lt;/code&gt;, and any other scopes required for your application.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb4opjtxbt6p40rgtqvsv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb4opjtxbt6p40rgtqvsv.jpg" alt="Setting up Sign in with GitLab using Keycloak" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After filling out the form, click on &lt;strong&gt;Save application&lt;/strong&gt; to register it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Obtain Client ID and Client Secret
&lt;/h2&gt;

&lt;p&gt;Once the application is registered, GitLab will provide a &lt;strong&gt;Client ID&lt;/strong&gt; and &lt;strong&gt;Client Secret&lt;/strong&gt;. These credentials are essential for Keycloak to communicate securely with GitLab for user authentication. Copy both the Client ID and Client Secret; you’ll need them for the next step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvjfmsmjin08p891h073b.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvjfmsmjin08p891h073b.jpg" alt="Setting up Sign in with GitLab using Keycloak" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Enter GitLab Credentials in Keycloak
&lt;/h3&gt;

&lt;p&gt;Go back to Keycloak’s GitLab identity provider configuration page and paste the &lt;strong&gt;Client ID&lt;/strong&gt; and &lt;strong&gt;Client Secret&lt;/strong&gt; into the respective fields. Save the configuration. Once saved, Keycloak will recognize GitLab as a valid identity provider, allowing users to authenticate using their GitLab accounts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy9im2t0224pqjdw26gea.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy9im2t0224pqjdw26gea.jpg" alt="Setting up Sign in with GitLab using Keycloak" width="800" height="497"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Configuration
&lt;/h2&gt;

&lt;p&gt;To ensure a smooth first-time login experience, scroll down in the GitLab provider settings until you find the &lt;strong&gt;First Login Flow&lt;/strong&gt; option. If it’s not set to &lt;strong&gt;First Broker Login&lt;/strong&gt; by default, change it to this option. This ensures that users logging in for the first time with GitLab will go through the appropriate login and account linking flow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftzv5h6zlfx4v8k7tba78.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftzv5h6zlfx4v8k7tba78.jpg" alt="Setting up Sign in with GitLab using Keycloak" width="634" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With everything configured, navigate to the login URL specific to your new realm. You should now see an option to &lt;strong&gt;Sign in with GitLab&lt;/strong&gt;. Test the integration by logging in with your GitLab credentials to confirm that everything is working correctly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frnjts50revhxvuaai6ek.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frnjts50revhxvuaai6ek.jpg" alt="Setting up Sign in with GitLab using Keycloak" width="746" height="685"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Thanks for reading ❤️&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Thank you so much for reading and do check out the resources provided to learn more about the Keycloak. You can click the button below to create your service on &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio&lt;/a&gt; and implement this authentication method. See you in the next one👋&lt;/p&gt;

</description>
      <category>gitlab</category>
      <category>keycloak</category>
      <category>opensourcesoftwares</category>
      <category>elestio</category>
    </item>
    <item>
      <title>Setting up Sign in with GitHub using Keycloak</title>
      <dc:creator>Kaiwalya Koparkar</dc:creator>
      <pubDate>Sun, 24 Nov 2024 06:38:18 +0000</pubDate>
      <link>https://dev.to/elestio/setting-up-sign-in-with-github-using-keycloak-107p</link>
      <guid>https://dev.to/elestio/setting-up-sign-in-with-github-using-keycloak-107p</guid>
      <description>&lt;p&gt;Hey everyone, in this blog we will be setting up the "Sign in with GitHub" option using Keycloak. We will be using a self-hosted Keycloak instance deployed on Elestio. So, to get started head over to &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio Dashboard&lt;/a&gt; and deploy and login into the Keycloak instance to get started. To set up GitHub as an identity provider in Keycloak, follow these detailed steps. Keycloak’s integration with GitHub allows users to log in using their GitHub credentials, simplifying authentication and enhancing security.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating New Realm
&lt;/h2&gt;

&lt;p&gt;According to the Keycloak documentation&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A realm manages a set of users, credentials, roles, and groups. A user belongs to and logs into a realm. Realms are isolated from one another and can only manage and authenticate the users that they control.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once you are logged in, head over to the drop-down menu on the top left hand. It is important to notice that there is a realm " &lt;strong&gt;&lt;em&gt;Keycloak master&lt;/em&gt;&lt;/strong&gt;" already available. This realm has higher privileges hence it is recommended to create a new realm. Click on " &lt;strong&gt;&lt;em&gt;Create realm&lt;/em&gt;&lt;/strong&gt;".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxhgrhodd71i988c8cm4c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxhgrhodd71i988c8cm4c.jpg" alt="Setting up Sign in with GitHub using Keycloak" width="290" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now add the realm information such as Realm name. For eg: Here I have given it a name " &lt;strong&gt;&lt;em&gt;GitHub-Auth&lt;/em&gt;&lt;/strong&gt;". Click on " &lt;strong&gt;&lt;em&gt;Create&lt;/em&gt;&lt;/strong&gt;" to create new realm.&lt;/p&gt;

&lt;h2&gt;
  
  
  Initial Setup in Keycloak
&lt;/h2&gt;

&lt;p&gt;Navigating to the &lt;strong&gt;Identity Providers&lt;/strong&gt; section. From the &lt;strong&gt;Social&lt;/strong&gt; section, select &lt;strong&gt;GitHub&lt;/strong&gt; to create a new GitHub identity provider integration. This selection opens a configuration page where you’ll input the necessary credentials to connect with GitHub.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faeibal4qbnz9mk85ewli.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faeibal4qbnz9mk85ewli.jpg" alt="Setting up Sign in with GitHub using Keycloak" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On this configuration page, you’ll find a &lt;strong&gt;Redirect URI&lt;/strong&gt; specific to Keycloak, which you’ll need to register with GitHub later in the setup. Copy this Redirect URI, as it will be essential when configuring the GitHub app to ensure a smooth login flow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft0155yhj9134s3ywm4s9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft0155yhj9134s3ywm4s9.jpg" alt="Setting up Sign in with GitHub using Keycloak" width="800" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Register a New OAuth App on GitHub
&lt;/h2&gt;

&lt;p&gt;Next, you need to register Keycloak as an OAuth application in GitHub. Start by logging into your &lt;a href="https://github.com/settings/developers?ref=blog.elest.io" rel="noopener noreferrer"&gt;GitHub Developer Settings&lt;/a&gt; and navigating to &lt;strong&gt;OAuth Apps&lt;/strong&gt;. Click on &lt;strong&gt;New OAuth App&lt;/strong&gt; to start the registration process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm8y9mudvovldk5b5l4cm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm8y9mudvovldk5b5l4cm.jpg" alt="Setting up Sign in with GitHub using Keycloak" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the registration form, provide your application’s details, including the &lt;strong&gt;Application name&lt;/strong&gt; and &lt;strong&gt;Homepage URL&lt;/strong&gt;. In the &lt;strong&gt;Authorization callback URL&lt;/strong&gt; field, paste the Redirect URI you copied from Keycloak’s setup page. This callback URL ensures that, after a successful GitHub login, users are redirected back to Keycloak to complete the authentication process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjk6ruhjc523kkfkd406e.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjk6ruhjc523kkfkd406e.jpg" alt="Setting up Sign in with GitHub using Keycloak" width="800" height="575"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Obtain Client ID and Client Secret
&lt;/h2&gt;

&lt;p&gt;After completing the form, GitHub will generate a &lt;strong&gt;Client ID&lt;/strong&gt; and &lt;strong&gt;Client Secret&lt;/strong&gt; for your new OAuth app. These credentials allow Keycloak to securely communicate with GitHub’s authentication system. Copy both the Client ID and Client Secret, as you’ll need them for the next step.&lt;/p&gt;

&lt;p&gt;To view the &lt;strong&gt;Client Secret&lt;/strong&gt; , select the &lt;strong&gt;Generate a new client secret&lt;/strong&gt; option in the OAuth app settings if you haven’t done so already. It’s important to store this information securely since it enables your Keycloak instance to interact with GitHub for user authentication.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fepnm7g3hbysu0cwqc1w0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fepnm7g3hbysu0cwqc1w0.jpg" alt="Setting up Sign in with GitHub using Keycloak" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Enter GitHub Credentials in Keycloak
&lt;/h2&gt;

&lt;p&gt;Return to Keycloak and, on the GitHub identity provider configuration page, paste the &lt;strong&gt;Client ID&lt;/strong&gt; and &lt;strong&gt;Client Secret&lt;/strong&gt; you obtained from GitHub. Save your changes to finalize the integration. Once saved, Keycloak will now treat GitHub as a valid identity provider, allowing users to authenticate with their GitHub credentials.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwr9wgcelca664am0c7gx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwr9wgcelca664am0c7gx.jpg" alt="Setting up Sign in with GitHub using Keycloak" width="800" height="606"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For a little last configuration, scroll a little bit down until you find the &lt;strong&gt;First login flow override&lt;/strong&gt; option and if not on the &lt;strong&gt;first broker login&lt;/strong&gt; by default then change it to it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvhtbuabo56fu3n2baoe.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvhtbuabo56fu3n2baoe.jpg" alt="Setting up Sign in with GitHub using Keycloak" width="703" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And done! Now you can head over to the sign-in url specific to your realm and you will find an option to Sign in with GitHub.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc5lserr00dwbegh0locw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc5lserr00dwbegh0locw.jpg" alt="Setting up Sign in with GitHub using Keycloak" width="764" height="688"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Thanks for reading ❤️&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Thank you so much for reading and do check out the resources provided to learn more about the Keycloak. You can click the button below to create your service on &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio&lt;/a&gt; and implement this authentication method. See you in the next one👋&lt;/p&gt;

</description>
      <category>keycloak</category>
      <category>opensourcesoftwares</category>
      <category>elestio</category>
    </item>
    <item>
      <title>Setting up Sign in with Facebook using Keycloak</title>
      <dc:creator>Kaiwalya Koparkar</dc:creator>
      <pubDate>Sun, 24 Nov 2024 06:38:10 +0000</pubDate>
      <link>https://dev.to/elestio/setting-up-sign-in-with-facebook-using-keycloak-1gg8</link>
      <guid>https://dev.to/elestio/setting-up-sign-in-with-facebook-using-keycloak-1gg8</guid>
      <description>&lt;p&gt;Hey everyone, in this blog we will be setting up the "Sign in with Facebook" option using Keycloak. We will be using a self-hosted Keycloak instance deployed on Elestio. So, to get started head over to &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio Dashboard&lt;/a&gt; and deploy and login into the Keycloak instance to get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating New Realm
&lt;/h2&gt;

&lt;p&gt;According to the Keycloak documentation&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A realm manages a set of users, credentials, roles, and groups. A user belongs to and logs into a realm. Realms are isolated from one another and can only manage and authenticate the users that they control.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once you are logged in, head over to the drop-down menu on the top left hand. It is important to notice that there is a realm " &lt;strong&gt;&lt;em&gt;Keycloak master&lt;/em&gt;&lt;/strong&gt;" already available. This realm has higher privileges hence it is recommended to create a new realm. Click on " &lt;strong&gt;&lt;em&gt;Create realm&lt;/em&gt;&lt;/strong&gt;".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7gez2ndtg55nzkmshvf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7gez2ndtg55nzkmshvf.jpg" alt="Setting up Sign in with Facebook using Keycloak" width="287" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now add the realm information such as &lt;em&gt;the&lt;/em&gt; Realm name. For eg: Here I have given it the name " &lt;strong&gt;&lt;em&gt;Social&lt;/em&gt;&lt;/strong&gt;". Click on " &lt;strong&gt;&lt;em&gt;Create&lt;/em&gt;&lt;/strong&gt;" to create a new realm. Next, navigate to the &lt;strong&gt;Identity Providers&lt;/strong&gt; section as shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F83guv0w1ft6mchnrcirm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F83guv0w1ft6mchnrcirm.jpg" alt="Setting up Sign in with Facebook using Keycloak" width="800" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the &lt;strong&gt;Social&lt;/strong&gt; section menu, select &lt;strong&gt;Facebook&lt;/strong&gt; to create a new Facebook identity provider integration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F86bb9s3vrp8dhu4rpwdt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F86bb9s3vrp8dhu4rpwdt.jpg" alt="Setting up Sign in with Facebook using Keycloak" width="800" height="606"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This selection opens the configuration page for Facebook as an identity provider. Here, Keycloak will provide fields to input your &lt;strong&gt;Client ID&lt;/strong&gt; and &lt;strong&gt;Client Secret&lt;/strong&gt; , which you will obtain from Facebook shortly. You’ll also see a &lt;strong&gt;Redirect URI&lt;/strong&gt; on this page – copy it, as it’s required when registering Keycloak with Facebook. Having this Redirect URI is essential; it allows Facebook to redirect users back to Keycloak after a successful login attempt, enabling a smooth login experience. This Redirect URI will need to be provided to Facebook when configuring the app settings in the developer console.&lt;/p&gt;

&lt;h2&gt;
  
  
  Register a New App on the Facebook Developer Console
&lt;/h2&gt;

&lt;p&gt;To allow Facebook login, you’ll need to create a new app on the &lt;a href="https://developers.facebook.com/?ref=blog.elest.io" rel="noopener noreferrer"&gt;Facebook Developer Console&lt;/a&gt;. Once logged in, find the &lt;strong&gt;My Apps&lt;/strong&gt; menu in the top right, and choose &lt;strong&gt;Create App&lt;/strong&gt;. Facebook frequently updates the Developer Console’s interface, so if the exact steps differ, look for options related to creating a new application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqsj7ca2mn0dznnoeeg2r.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqsj7ca2mn0dznnoeeg2r.jpg" alt="Setting up Sign in with Facebook using Keycloak" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When adding a new app, select &lt;strong&gt;Authenticate and request data from users with Facebook Login&lt;/strong&gt; as the platform and skip any additional optional steps, and submit to proceed. Once completed, you’ll land on the app’s dashboard, which serves as the primary management hub for all Facebook app settings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcw5hxhxibj7zdtcmwv90.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcw5hxhxibj7zdtcmwv90.jpg" alt="Setting up Sign in with Facebook using Keycloak" width="800" height="514"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Add a Platform and Configure the Redirect URI
&lt;/h2&gt;

&lt;p&gt;Now, within the app dashboard, select &lt;strong&gt;Settings&lt;/strong&gt; from the left-side menu. Scroll to the end of the page and click on &lt;strong&gt;+ Add Platform&lt;/strong&gt;. Choose &lt;strong&gt;Website&lt;/strong&gt; again, as Keycloak will serve as the primary access portal through which users authenticate. In the &lt;strong&gt;Site URL&lt;/strong&gt; field of Facebook’s Website settings, paste the Redirect URI you copied from Keycloak’s Add Identity Provider page. This step ensures that the Facebook app correctly redirects users back to Keycloak after login, finalizing the authentication flow.&lt;/p&gt;

&lt;p&gt;Additionally, under &lt;strong&gt;Use Case &amp;gt;&lt;/strong&gt;  &lt;strong&gt;Settings&lt;/strong&gt; , confirm that the required fields are filled and that your app category is accurate. This helps ensure that Facebook’s permissions align with the intended use of the app, preventing access issues when Keycloak requests authentication from Facebook.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F78lybhzz4500z3yro8co.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F78lybhzz4500z3yro8co.jpg" alt="Setting up Sign in with Facebook using Keycloak" width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Make the App Public
&lt;/h2&gt;

&lt;p&gt;Next, you must make the Facebook app public to allow all users to access it. In the left-side menu, select &lt;strong&gt;App Review&lt;/strong&gt; and switch the visibility toggle to &lt;strong&gt;Yes&lt;/strong&gt;. This step is critical without making the app public, only users with developer access can use Facebook to log in, limiting the functionality for end users. Setting the app to public also means that Facebook will enforce any app-specific permissions or guidelines, so ensure that the app settings align with the privacy and data-sharing expectations of your user base.&lt;/p&gt;

&lt;h2&gt;
  
  
  Retrieve and Add Client Credentials in Keycloak
&lt;/h2&gt;

&lt;p&gt;To finalize the setup, return to the &lt;strong&gt;Dashboard&lt;/strong&gt; in the Facebook Developer Console. Here, you’ll find both the &lt;strong&gt;App ID&lt;/strong&gt; and &lt;strong&gt;App Secret&lt;/strong&gt;. Click &lt;strong&gt;Show&lt;/strong&gt; next to App Secret to make it visible. Copy both the App ID and App Secret.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxbcyls8dcko11kqij6ry.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxbcyls8dcko11kqij6ry.jpg" alt="Setting up Sign in with Facebook using Keycloak" width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then navigate back to Keycloak’s Facebook configuration page and paste them into the respective fields. These credentials allow Keycloak to securely communicate with Facebook and request user information as needed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo3plokfzh62l2pzcwzha.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo3plokfzh62l2pzcwzha.jpg" alt="Setting up Sign in with Facebook using Keycloak" width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking Your New Sign-In Option
&lt;/h2&gt;

&lt;p&gt;In the &lt;strong&gt;Default Scopes&lt;/strong&gt; field on Keycloak’s Facebook provider setup page, you can specify any additional permissions (or scopes) that you want Facebook to ask users to approve when logging in. For example, adding permissions like &lt;code&gt;public_profile&lt;/code&gt; and &lt;code&gt;email&lt;/code&gt; allows access to basic profile information and the user’s email address. By default, Keycloak includes the &lt;strong&gt;email&lt;/strong&gt; scope. For more complex use cases, consult the &lt;a href="https://developers.facebook.com/docs/graph-api?ref=blog.elest.io" rel="noopener noreferrer"&gt;Facebook Graph API documentation&lt;/a&gt; for a comprehensive list of scopes to add based on your app’s needs.&lt;/p&gt;

&lt;p&gt;As you do all these above steps correctly you will see &lt;strong&gt;Facebook&lt;/strong&gt; as a login option under your sign in box. Now you can use it to quickly login into your application!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjzp7p6emlce2ck4azrel.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjzp7p6emlce2ck4azrel.jpg" alt="Setting up Sign in with Facebook using Keycloak" width="670" height="678"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Thanks for reading ❤️&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Thank you so much for reading and do check out the resources provided to learn more about the Keycloak. You can click the button below to create your service on &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio&lt;/a&gt; and implement this authentication method. See you in the next one👋&lt;/p&gt;

</description>
      <category>keycloak</category>
      <category>opensourcesoftwares</category>
      <category>elestio</category>
    </item>
    <item>
      <title>Setting up Sign in with Twitter using Keycloak</title>
      <dc:creator>Kaiwalya Koparkar</dc:creator>
      <pubDate>Sun, 24 Nov 2024 06:38:03 +0000</pubDate>
      <link>https://dev.to/elestio/setting-up-sign-in-with-twitter-using-keycloak-4022</link>
      <guid>https://dev.to/elestio/setting-up-sign-in-with-twitter-using-keycloak-4022</guid>
      <description>&lt;p&gt;Hey everyone, in this blog we will be setting up the "Sign in with Twitter" option using Keycloak. We will be using a self-hosted Keycloak instance deployed on Elestio. So, to get started head over to &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio Dashboard&lt;/a&gt; and deploy and login into the Keycloak instance to get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating New Realm
&lt;/h2&gt;

&lt;p&gt;According to the Keycloak documentation&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A realm manages a set of users, credentials, roles, and groups. A user belongs to and logs into a realm. Realms are isolated from one another and can only manage and authenticate the users that they control.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once you are logged in, head over to the drop-down menu on the top left hand. It is important to notice that there is a realm " &lt;strong&gt;&lt;em&gt;Keycloak master&lt;/em&gt;&lt;/strong&gt;" already available. This realm has higher privileges hence it is recommended to create a new realm. Click on " &lt;strong&gt;&lt;em&gt;Create realm&lt;/em&gt;&lt;/strong&gt;".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffutsx4ddebl8hzkx2a5m.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffutsx4ddebl8hzkx2a5m.jpg" alt="Setting up Sign in with Twitter using Keycloak" width="287" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now add the realm information such as &lt;em&gt;the&lt;/em&gt; Realm name. For eg: Here I have given it the name " &lt;strong&gt;&lt;em&gt;Twitter-Auth&lt;/em&gt;&lt;/strong&gt;". Click on " &lt;strong&gt;&lt;em&gt;Create&lt;/em&gt;&lt;/strong&gt;" to create a new realm. Next, navigate to the &lt;strong&gt;Identity Providers&lt;/strong&gt; section as shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frbpsx3ij2sscoexizugu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frbpsx3ij2sscoexizugu.jpg" alt="Setting up Sign in with Twitter using Keycloak" width="800" height="490"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the &lt;strong&gt;Social&lt;/strong&gt; section menu, select &lt;strong&gt;Twitter&lt;/strong&gt; to create a new Facebook identity provider integration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxx1a29qahtyxpc5s2tey.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxx1a29qahtyxpc5s2tey.jpg" alt="Setting up Sign in with Twitter using Keycloak" width="800" height="647"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This selection opens the configuration page for Twitter as an identity provider. Here, Keycloak will provide fields to input your &lt;strong&gt;Client ID&lt;/strong&gt; and &lt;strong&gt;Client Secret&lt;/strong&gt; , which you will obtain from Twitter shortly. You’ll also see a &lt;strong&gt;Redirect URI&lt;/strong&gt; on this page – copy it, as it’s required when registering Keycloak with Twitter.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63t4tv5kn94cpppi61rs.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63t4tv5kn94cpppi61rs.jpg" alt="Setting up Sign in with Twitter using Keycloak" width="800" height="523"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Having this Redirect URI is essential; it allows Twitter to redirect users back to Keycloak after a successful login attempt, enabling a smooth login experience. This Redirect URI will need to be provided to Twitter when configuring the app settings in the developer console.&lt;/p&gt;

&lt;h2&gt;
  
  
  Register a New App on Twitter
&lt;/h2&gt;

&lt;p&gt;To enable Twitter login, you’ll need to register Keycloak as an OAuth application on the &lt;a href="https://developer.twitter.com/?ref=blog.elest.io" rel="noopener noreferrer"&gt;Twitter Developer Portal&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sign in to the Twitter Developer Portal and create a new app and head over and click on &lt;strong&gt;Set up&lt;/strong&gt; to use this app for authentication purposes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff9rtgxbzwdpq6czvum0c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff9rtgxbzwdpq6czvum0c.jpg" alt="Setting up Sign in with Twitter using Keycloak" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the &lt;strong&gt;App settings&lt;/strong&gt; , provide details like the &lt;strong&gt;App Name&lt;/strong&gt; and &lt;strong&gt;Website URL.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Authentication Settings &amp;gt; App info&lt;/strong&gt; , add the &lt;strong&gt;Redirect URI&lt;/strong&gt; you copied from Keycloak’s setup page. This will be used to redirect users back to Keycloak upon successful login through Twitter.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9o2ow4hrdvzvgm197sd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9o2ow4hrdvzvgm197sd.jpg" alt="Setting up Sign in with Twitter using Keycloak" width="663" height="688"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose the necessary &lt;strong&gt;Permissions&lt;/strong&gt; for your app, such as &lt;code&gt;Read&lt;/code&gt; access to public information.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkk52ennp5ophcmyg4qkt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkk52ennp5ophcmyg4qkt.png" alt="Setting up Sign in with Twitter using Keycloak" width="528" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you complete the setup, click &lt;strong&gt;Create&lt;/strong&gt; to register the application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Obtain API Key and API Secret Key
&lt;/h2&gt;

&lt;p&gt;After the app is registered, Twitter will generate an &lt;strong&gt;API Key&lt;/strong&gt; and an &lt;strong&gt;API Secret Key&lt;/strong&gt; for your new application. These credentials are essential for Keycloak to securely communicate with Twitter’s authentication system. Copy both the API Key and API Secret Key, as you’ll need them in the next step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzt4o881oym1yjak2nqes.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzt4o881oym1yjak2nqes.jpg" alt="Setting up Sign in with Twitter using Keycloak" width="598" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Enter Twitter Credentials in Keycloak
&lt;/h2&gt;

&lt;p&gt;Return to Keycloak and paste the &lt;strong&gt;API Key&lt;/strong&gt; and &lt;strong&gt;API Secret Key&lt;/strong&gt; into the respective fields on the Twitter identity provider configuration page. Save the changes to finalize the integration. Once saved, Keycloak will recognize Twitter as a valid identity provider, allowing users to authenticate using their Twitter accounts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb4yfj94cth6xr4vcijbz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb4yfj94cth6xr4vcijbz.jpg" alt="Setting up Sign in with Twitter using Keycloak" width="800" height="661"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Configuration: Setting the First Login Flow
&lt;/h2&gt;

&lt;p&gt;To make the first login experience smoother, scroll down in the Twitter provider settings until you find the &lt;strong&gt;First Login Flow&lt;/strong&gt; option. If it’s not set to &lt;strong&gt;First Broker Login&lt;/strong&gt; by default, switch it to this option. This ensures that users logging in for the first time with Twitter go through the appropriate login and account linking process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj3wmuzm0ggxab8d7eiij.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj3wmuzm0ggxab8d7eiij.jpg" alt="Setting up Sign in with Twitter using Keycloak" width="591" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking Your New Sign-In Option
&lt;/h2&gt;

&lt;p&gt;With everything configured, go to the login URL specific to your new realm. You should now see an option to &lt;strong&gt;Sign in with Twitter&lt;/strong&gt;. Test the integration by logging in with a Twitter account to confirm that the setup is functioning as expected.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm93eh4ugax2yx9f8t1jy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm93eh4ugax2yx9f8t1jy.jpg" alt="Setting up Sign in with Twitter using Keycloak" width="742" height="705"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Thanks for reading ❤️&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Thank you so much for reading and do check out the resources provided to learn more about the Keycloak. You can click the button below to create your service on &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio&lt;/a&gt; and implement this authentication method. See you in the next one👋&lt;/p&gt;

</description>
      <category>keycloak</category>
      <category>opensourcesoftwares</category>
      <category>twitter</category>
      <category>elestio</category>
    </item>
    <item>
      <title>What is the User Storage Federation in Keycloak</title>
      <dc:creator>Kaiwalya Koparkar</dc:creator>
      <pubDate>Sun, 24 Nov 2024 06:37:30 +0000</pubDate>
      <link>https://dev.to/elestio/what-is-the-user-storage-federation-in-keycloak-3d55</link>
      <guid>https://dev.to/elestio/what-is-the-user-storage-federation-in-keycloak-3d55</guid>
      <description>&lt;p&gt;&lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Keycloak&lt;/a&gt; supports LDAP and Active Directory out of the box, enabling rapid integration with these popular directories. For other types of databases or custom user data solutions, Keycloak provides a &lt;strong&gt;User Storage SPI (Service Provider Interface)&lt;/strong&gt;, allowing developers to create custom plugins that can connect Keycloak to virtually any data source. This blog will walk through the steps and best practices for setting up and configuring user storage federation in Keycloak.&lt;/p&gt;

&lt;h2&gt;
  
  
  How User Storage Federation Works
&lt;/h2&gt;

&lt;p&gt;Keycloak's user federation functionality follows a straightforward process that enhances flexibility in user authentication.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Login Process&lt;/strong&gt; : When a user attempts to log in, Keycloak first checks its internal user store to see if the user exists locally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Federation Process&lt;/strong&gt; : If Keycloak doesn’t find the user in its internal store, it automatically moves through each configured external User Storage provider associated with that realm until it finds a matching user.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Mapping&lt;/strong&gt; : Data retrieved from external sources is transformed into a standardized format, or "common user model," which Keycloak can easily interpret. This standard model can then be used to generate OpenID Connect (OIDC) token claims and SAML assertion attributes for applications that rely on Keycloak for authentication.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Handling Missing Data in External Stores
&lt;/h2&gt;

&lt;p&gt;External user databases may not always contain all the attributes that Keycloak requires for its features. In these cases, Keycloak allows for flexible handling of missing data. The User Storage Provider can be configured to store specific data locally within Keycloak. This enables Keycloak to retain essential user attributes and extend functionality without altering the external database. Some storage providers support syncing, allowing Keycloak to import users from an external database periodically. This feature is helpful in scenarios where Keycloak needs to update user data frequently. If the external store lacks support for features like one-time passwords (OTP), Keycloak can manage and store this information locally, assuming the storage provider supports such configurations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding a User Storage Provider in Keycloak
&lt;/h2&gt;

&lt;p&gt;Adding a storage provider in Keycloak is an easy process that allows administrators to quickly set up connections with external data sources.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the Keycloak Admin Console.&lt;/li&gt;
&lt;li&gt;From the left sidebar, select the &lt;strong&gt;User Federation&lt;/strong&gt; menu item.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Add a New Provider&lt;/strong&gt; :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;On the &lt;strong&gt;User Federation&lt;/strong&gt; page, locate the &lt;strong&gt;Add Provider&lt;/strong&gt; dropdown menu on the right side. This menu lists various types of external providers, such as LDAP and Kerberos, that Keycloak supports.&lt;/li&gt;
&lt;li&gt;Choose the provider type (e.g., LDAP, Kerberos) that you want to add. Selecting a provider will open a configuration page specific to that provider type.&lt;/li&gt;
&lt;li&gt;On the configuration page, fill in the required details, such as server URL, connection settings, and attribute mappings (e.g., mapping LDAP attributes to Keycloak fields). Adjust any additional options based on your setup needs, then save your changes to complete the integration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxw89204l8x6jf34zri0e.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxw89204l8x6jf34zri0e.jpg" alt="What is the User Storage Federation in Keycloak" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Configure Provider Settings&lt;/strong&gt; :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Each provider will have unique configuration settings depending on the type of database it connects to. For LDAP, for instance, you’ll need to input the LDAP server URL, connection settings, user mappings, and other options.&lt;/li&gt;
&lt;li&gt;Customize the configuration as per your organization’s requirements, including mapping user attributes and handling authentication mechanisms.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Save and Test the Configuration&lt;/strong&gt; :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;After entering the necessary information, save the configuration.&lt;/li&gt;
&lt;li&gt;Test the integration by attempting to log in with a user from the external database to ensure that Keycloak can successfully authenticate and retrieve user data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Thanks for reading ❤️&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This federation capability enables Keycloak to act as a central identity provider across applications, improving security and enhancing the user experience across your organization’s digital landscape. Thank you so much for reading and do check out the resources provided to learn more about the Keycloak. You can click the button below to create your service on &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio&lt;/a&gt;. See you in the next one👋&lt;/p&gt;

&lt;p&gt;&lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F88vgc8t4oxwoqylzn1mt.png" alt="What is the User Storage Federation in Keycloak" width="194" height="40"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>keycloak</category>
      <category>storagefederation</category>
      <category>elestio</category>
    </item>
    <item>
      <title>Mapping Claims and Assertions in Keycloak</title>
      <dc:creator>Kaiwalya Koparkar</dc:creator>
      <pubDate>Sun, 24 Nov 2024 06:37:12 +0000</pubDate>
      <link>https://dev.to/elestio/mapping-claims-and-assertions-in-keycloak-2fp4</link>
      <guid>https://dev.to/elestio/mapping-claims-and-assertions-in-keycloak-2fp4</guid>
      <description>&lt;p&gt;&lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Keycloak’s&lt;/a&gt; integration with external identity providers (IDPs) via SAML (Security Assertion Markup Language) and OIDC (OpenID Connect) enables user authentication while bringing valuable user profile information. The integration process &lt;strong&gt;claims and assertions&lt;/strong&gt; to Keycloak’s local user attributes, which can then be used by applications within your realm. This blog will walk through the steps and best practices for setting up and configuring claims and assertions mapping in Keycloak.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding SAML and OIDC Metadata Imports
&lt;/h2&gt;

&lt;p&gt;When integrating an IDP, Keycloak can import its SAML or OIDC metadata, which defines how the IDP transmits user data. This import includes the user profile data, claims (for OIDC), and assertions (for SAML), which can then be mapped onto Keycloak’s user attributes. Once integrated, every new user who logs in through the external provider has an entry created in Keycloak’s database, making it easier to manage these users within the realm.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Import Metadata?
&lt;/h3&gt;

&lt;p&gt;Importing metadata from the IDP into Keycloak allows you to synchronize user attributes and customize access controls based on information from the external provider. This setup helps ensure secure, efficient authentication and user data flow from IDP to Keycloak, allowing seamless access for applications that rely on Keycloak’s identity and access management.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up Mappers for Claims and Assertions
&lt;/h2&gt;

&lt;p&gt;After the external IDP is connected, configuring mappers in Keycloak is essential to translate the IDP’s data into Keycloak’s user model. Mappers help assign data from SAML assertions or OIDC claims to user attributes and roles in Keycloak.&lt;/p&gt;

&lt;h3&gt;
  
  
  Accessing Mappers in Keycloak
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Navigate to the Identity Providers Page&lt;/strong&gt; : Within your realm, go to &lt;strong&gt;Identity Providers&lt;/strong&gt; and select the configured provider.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open the Mappers Tab&lt;/strong&gt; : Under the settings for your chosen IDP, go to the &lt;strong&gt;Mappers&lt;/strong&gt; tab. Here, you can define how specific claims or assertions map to Keycloak’s internal structure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Click Create&lt;/strong&gt; : Use the &lt;strong&gt;Add mapper&lt;/strong&gt; button to add a new broker mapper. Broker mappers allow you to transform IDP-provided data into local attributes, allowing applications to access external user data seamlessly.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdt95shaho18vuk2rp1x4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdt95shaho18vuk2rp1x4.jpg" alt="Mapping Claims and Assertions in Keycloak" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Selecting and Configuring Mapper Types
&lt;/h3&gt;

&lt;p&gt;When creating a new mapper, Keycloak offers different mapper types, each designed for specific tasks. Common mapper types include the following things.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SAML Attribute Mapper&lt;/strong&gt; : Maps attributes in SAML assertions from the IDP to Keycloak user attributes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OIDC Claim Mapper&lt;/strong&gt; : Maps OIDC claims, such as &lt;code&gt;email&lt;/code&gt; or &lt;code&gt;name&lt;/code&gt;, to Keycloak’s internal user fields.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Select the appropriate mapper type and complete the necessary fields, such as &lt;strong&gt;Token Claim Name&lt;/strong&gt; (for OIDC) or &lt;strong&gt;Attribute Name&lt;/strong&gt; (for SAML). These fields specify the exact claim or assertion Keycloak should import, as well as the local Keycloak attribute to which it maps.&lt;/p&gt;

&lt;h3&gt;
  
  
  Practical Example: Mapping an Email Claim
&lt;/h3&gt;

&lt;p&gt;For example, if the external IDP provides an &lt;code&gt;email&lt;/code&gt; claim, you can map this to the email field in Keycloak’s user attributes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Mapper Type&lt;/strong&gt; : Select &lt;strong&gt;OIDC Claim Mapper&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Token Claim Name&lt;/strong&gt; : Enter &lt;code&gt;email&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User Attribute Name&lt;/strong&gt; : Enter &lt;code&gt;email&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This configuration will automatically populate the email field for any user authenticating through the external IDP.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advanced Mapping with JSON-Based Claims
&lt;/h3&gt;

&lt;p&gt;For more complex data structures, especially JSON-based claims, Keycloak supports dot notation and array indexing. This functionality is useful when the IDP’s user data includes nested fields or arrays. For example, if a claim from the IDP has &lt;code&gt;contact.address[0].country&lt;/code&gt;, you can use this exact notation in the mapper configuration to ensure Keycloak extracts the correct data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Debugging and Testing Mappers
&lt;/h3&gt;

&lt;p&gt;After configuring mappers, it’s a good idea to verify that the mappings are correct and functioning as expected. Keycloak provides a logging feature that enables detailed inspection of user profile data received from social identity providers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Enable DEBUG Logging&lt;/strong&gt; : In the server configuration file (&lt;code&gt;standalone.xml&lt;/code&gt; or &lt;code&gt;domain.xml&lt;/code&gt;), enable the logger &lt;code&gt;org.keycloak.social.user_profile_dump&lt;/code&gt; at the DEBUG level.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review the Output&lt;/strong&gt; : The debug log will provide a JSON output of user data, allowing you to examine the claim structure and refine mappings as necessary.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Thanks for reading ❤️&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Mapping claims and assertions in Keycloak is crucial for leveraging the full functionality of external IDPs. By setting up mappers to import SAML attributes and OIDC claims, Keycloak can centralize user data management while giving applications easy access to enriched user profiles. Thank you so much for reading and do check out the resources provided to learn more about the Keycloak. You can click the button below to create your service on &lt;a href="https://elest.io/open-source/keycloak?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio&lt;/a&gt;. See you in the next one👋&lt;/p&gt;

</description>
      <category>keycloak</category>
      <category>elestio</category>
    </item>
    <item>
      <title>Caching with Redis for Backend in Apache Superset</title>
      <dc:creator>Kaiwalya Koparkar</dc:creator>
      <pubDate>Sun, 24 Nov 2024 06:36:56 +0000</pubDate>
      <link>https://dev.to/elestio/caching-with-redis-for-backend-in-apache-superset-p1d</link>
      <guid>https://dev.to/elestio/caching-with-redis-for-backend-in-apache-superset-p1d</guid>
      <description>&lt;p&gt;Self-hosting &lt;a href="https://elest.io/open-source/superset?ref=blog.elest.io" rel="noopener noreferrer"&gt;Apache Superset&lt;/a&gt; and &lt;a href="https://elest.io/open-source/redis?ref=blog.elest.io" rel="noopener noreferrer"&gt;Redis&lt;/a&gt; on Elestio provides a foundation for creating interactive dashboards with optimized performance. One way to improve performance is by configuring Redis as the caching backend for Superset. This guide walks through the process of integrating Redis with Superset, highlights common pitfalls, and explains how to verify the setup to ensure everything is working as expected.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why Use Redis as a Caching Backend?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Redis is a high-performance in-memory data structure store, often used as a database, cache, and message broker. In the context of Superset, Redis can significantly speed up dashboard queries by caching query results and reducing the load on your database. Moreover, Redis is also used for task scheduling and backend message handling when Celery is configured for Superset.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Hosting Superset and Redis on Elestio&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Both Superset and Redis need to be set up on Elestio. Ensure that Redis is properly installed and running. You should have access to the Redis host, port, password, and optionally, database numbers for caching and Celery. Similarly, Superset should be up and running with its dependencies configured.&lt;/p&gt;

&lt;p&gt;For Redis on Elestio:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log in to your Elestio dashboard and create a new Redis service.&lt;/li&gt;
&lt;li&gt;Note down the connection details (host, port, and password).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F78of31wmfne99nqmqwx6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F78of31wmfne99nqmqwx6.jpg" alt="Caching with Redis for Backend in Apache Superset" width="800" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Configuring Superset for Redis Caching&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;On your Elestio dashboard head over to the &lt;strong&gt;Tools&lt;/strong&gt; section and access the &lt;strong&gt;VS Code&lt;/strong&gt; there. We will be making all the required updates in the VS Code instance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr195jrdsoxlrfn3c23nq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr195jrdsoxlrfn3c23nq.jpg" alt="Caching with Redis for Backend in Apache Superset" width="800" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Locate your Superset configuration file (commonly &lt;code&gt;superset_config.py&lt;/code&gt;) under &lt;strong&gt;docker &amp;gt; pythonpath_dev&lt;/strong&gt; and add Redis details for both caching and Celery task scheduling. In the file add the following code in the places shown like in the image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frdm1dcpws5b6errg973u.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frdm1dcpws5b6errg973u.jpg" alt="Caching with Redis for Backend in Apache Superset" width="800" height="432"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;REDIS_PASSWORD = get_env_variable("REDIS_PASSWORD")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Configure Celery&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Celery enables task scheduling and background execution. Update the Celery configuration in &lt;code&gt;superset_config.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;broker_url = f"redis://:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}/{REDIS_CELERY_DB}"

imports = ("superset.sql_lab",)

result_backend = f"redis://:{REDIS_PASSWORD}@{REDIS_HOST}:{REDIS_PORT}/{REDIS_RESULTS_DB}"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Configure Caching&lt;/strong&gt; :&lt;br&gt;&lt;br&gt;
Use Redis for query caching by adding the following configuration to &lt;code&gt;superset_config.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CACHE_CONFIG = {
    "CACHE_TYPE": "RedisCache",
    "CACHE_DEFAULT_TIMEOUT": 300,
    "CACHE_KEY_PREFIX": "superset_",
    "CACHE_REDIS_HOST": REDIS_HOST,
    "CACHE_REDIS_PORT": REDIS_PORT,
    "CACHE_REDIS_DB": REDIS_RESULTS_DB,
    "CACHE_REDIS_PASSWORD": REDIS_PASSWORD,
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Define Redis Environment Variables&lt;/strong&gt; :&lt;br&gt;&lt;br&gt;
If you're using Docker, include the following environment variables in your &lt;code&gt;.env&lt;/code&gt; file, these files are mounted in your &lt;code&gt;docker-compose&lt;/code&gt; file. Be sure to make these changes in both the env files.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft6bnty1i7z2f5vwcektp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft6bnty1i7z2f5vwcektp.jpg" alt="Caching with Redis for Backend in Apache Superset" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After updating the configuration, restart your Superset services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker-compose down &amp;amp;&amp;amp; docker-compose up -d

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Verifying Redis Connectivity&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Check Superset Logs&lt;/strong&gt; :&lt;br&gt;&lt;br&gt;
Access the Superset dashboard and find the &lt;strong&gt;View app logs&lt;/strong&gt; under the &lt;strong&gt;Software&lt;/strong&gt; section. Here you can see worker logs that state the success of the connection.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0upxwye9ds9ptcnuh0fm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0upxwye9ds9ptcnuh0fm.jpg" alt="Caching with Redis for Backend in Apache Superset" width="800" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Redis Insights&lt;/strong&gt; :&lt;br&gt;&lt;br&gt;
Under the Redis service dashboard, you can access &lt;strong&gt;Redis Insights&lt;/strong&gt;. Use the credentials provided to access the Redis Insights&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhps9ks4kakgk8th4uej1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhps9ks4kakgk8th4uej1.jpg" alt="Caching with Redis for Backend in Apache Superset" width="800" height="441"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you are logged in, you can add your Redis Database by clicking on &lt;strong&gt;Add Redis Database&lt;/strong&gt; and providing the details from the service dashboard. Here you will be able to see different statistics and usage to confirm the success of the connection.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiqjb6ckqcco0ln9wz9ev.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiqjb6ckqcco0ln9wz9ev.jpg" alt="Caching with Redis for Backend in Apache Superset" width="779" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Debugging Common Issues&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you encounter issues such as "invalid username-password pair" or "authentication required," double-check the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensure the &lt;code&gt;broker_url&lt;/code&gt; and &lt;code&gt;result_backend&lt;/code&gt; in CeleryConfig are correctly formatted: &lt;code&gt;redis://:&amp;lt;password&amp;gt;@&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;db&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Verify that the Redis password is correct and that Redis is configured to allow password-protected access.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Thanks for reading ❤️&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Integrating Redis as a caching backend in Apache Superset enhances the platform's responsiveness, especially for dashboards with heavy queries or frequent updates. By following this guide, you can ensure a seamless integration and enjoy the benefits of optimized performance in your analytics workflows.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://elest.io/open-source/superset?ref=blog.elest.io" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F88vgc8t4oxwoqylzn1mt.png" alt="Caching with Redis for Backend in Apache Superset" width="194" height="40"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>elestio</category>
      <category>redis</category>
      <category>caching</category>
      <category>superset</category>
    </item>
    <item>
      <title>Tracking E-Commerce Sales Performance with Superset</title>
      <dc:creator>Kaiwalya Koparkar</dc:creator>
      <pubDate>Sun, 24 Nov 2024 06:35:56 +0000</pubDate>
      <link>https://dev.to/elestio/tracking-e-commerce-sales-performance-with-superset-2l9a</link>
      <guid>https://dev.to/elestio/tracking-e-commerce-sales-performance-with-superset-2l9a</guid>
      <description>&lt;p&gt;An effective sales performance dashboard can help businesses track their revenue, monitor order value, and assess conversion rates all in one place. &lt;a href="https://elest.io/open-source/superset?ref=blog.elest.io" rel="noopener noreferrer"&gt;Apache Superset&lt;/a&gt; provides a platform to create such a dashboard, giving you actionable insights to optimize sales strategies. This guide will show you how to build a real-time e-commerce sales dashboard using Apache Superset. By the end, you will have a system that tracks key metrics like revenue, average order value (AOV), and conversion rates, and allows you to filter data by product category or time period.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Build a Sales Dashboard in Superset?
&lt;/h2&gt;

&lt;p&gt;An e-commerce sales dashboard allows you to centralize your sales data from multiple platforms, providing a complete view of your business in real time. Apache Superset can connect to various data sources and provide a highly customizable dashboard experience. The major benefits of using Apache Superset for a real-time sales performance dashboard include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Instant Insights&lt;/strong&gt; : Access to real-time data ensures that you're always up-to-date with how your sales are performing. This allows you to make quick, informed decisions about marketing strategies, adjust ongoing promotions, or manage inventory in response to spikes in demand. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Centralization&lt;/strong&gt; : By consolidating sales data from various channels—whether it’s Shopify, WooCommerce, or a custom e-commerce platform—into a single dashboard, you eliminate the need for manually compiling reports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Visualizations&lt;/strong&gt; : Creating dynamic and interactive charts in Apache Superset allows you to transform complex datasets into simplified visuals that are easy to interpret. These custom visualizations help stakeholders quickly understand trends and make data-driven decisions. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Connecting Superset to Your E-Commerce Database
&lt;/h2&gt;

&lt;p&gt;The first step to building your sales dashboard is to connect Apache Superset to your sales database. Whether you’re using &lt;a href="https://elest.io/open-source/mysql?ref=blog.elest.io" rel="noopener noreferrer"&gt;MySQL&lt;/a&gt;, &lt;a href="https://elest.io/open-source/postgresql?ref=blog.elest.io" rel="noopener noreferrer"&gt;PostgreSQL&lt;/a&gt;, &lt;a href="https://elest.io/open-source/clickhouse?ref=blog.elest.io" rel="noopener noreferrer"&gt;ClickHouse&lt;/a&gt;, or another database to store sales data, Apache Superset supports various connections.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Access Database Connection in Superset&lt;/strong&gt; : In the Superset UI, navigate to the &lt;strong&gt;Database Connections&lt;/strong&gt; under settings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F09rmcbqv23jzzafc9t3z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F09rmcbqv23jzzafc9t3z.png" alt="Tracking E-Commerce Sales Performance with Superset" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Add a New Database&lt;/strong&gt; : Click &lt;strong&gt;+ Database&lt;/strong&gt; &amp;gt; &lt;strong&gt;Supported Databases&lt;/strong&gt; &amp;gt; &lt;strong&gt;Other&lt;/strong&gt; and provide the connection details for your database, such as the SQLAlchemy URI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff83kns4r4q5xipcn6v1v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff83kns4r4q5xipcn6v1v.png" alt="Tracking E-Commerce Sales Performance with Superset" width="499" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enter Connection Details&lt;/strong&gt; : Provide the database credentials, including the SQLAlchemy URI. For example, connecting to a MySQL database would look something like this:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;connection+driver://username:password@hostname:port/database_name

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Test the Connection&lt;/strong&gt; : Verify that Superset is able to pull data from the database. Once the connection is successful, you're ready to move to the next step.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating Datasets from Sales Data
&lt;/h2&gt;

&lt;p&gt;Now that Superset is connected to your e-commerce database, it’s time to create datasets from your sales tables. These datasets will serve as the foundation for your visualizations.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Go to the Datasets Section&lt;/strong&gt; : In Superset, click on &lt;strong&gt;Datasets&lt;/strong&gt; and then select &lt;strong&gt;+ Dataset&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flpyf9xsxfk9x8tnyqzf9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flpyf9xsxfk9x8tnyqzf9.jpg" alt="Tracking E-Commerce Sales Performance with Superset" width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Select the Relevant Sales Table&lt;/strong&gt; : Choose the sales data table that contains information such as order transactions, product details, and customer information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Define Key Metrics&lt;/strong&gt; : You’ll need to create metrics like total revenue, number of orders, conversion rate, and average order value (AOV). These will allow you to build meaningful visualizations that track the health of your sales.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Total Revenue&lt;/strong&gt; : Sum of all sales transactions during a specific time period.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Number of Orders&lt;/strong&gt; : The total number of individual orders placed by customers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conversion Rate&lt;/strong&gt; : The percentage of visitors who make a purchase on your site.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Average Order Value (AOV)&lt;/strong&gt;: A calculation of how much customers are spending per order, which helps you understand customer purchasing behaviour.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8eaylxtmvj730jrlgn6d.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8eaylxtmvj730jrlgn6d.jpg" alt="Tracking E-Commerce Sales Performance with Superset" width="800" height="542"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Building Visualizations for Sales Metrics
&lt;/h2&gt;

&lt;p&gt;Once your datasets are ready, the next step is to create visualizations to display the key metrics of your e-commerce performance. Superset offers a wide array of chart types that are perfect for sales analytics.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Revenue Over Time (Time Series Chart)&lt;/strong&gt;: A time series chart will allow you to monitor how revenue fluctuates day-to-day, week-to-week, or month-to-month. You can use this chart to identify peaks during sales promotions or dips during slow periods.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Average Order Value (Bar Chart)&lt;/strong&gt;: A bar chart can be used to visualize the average order value. This gives insight into purchasing patterns and can help identify opportunities for upselling or cross-selling to increase the AOV.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conversion Rate (Gauge or Pie Chart)&lt;/strong&gt;: A gauge chart or pie chart can provide a quick visual snapshot of your current conversion rate. Tracking this over time will give you an idea of how effective your website and marketing campaigns are in turning visitors into customers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sales by Product Category (Pie Chart)&lt;/strong&gt;: A pie chart allows you to see which product categories are performing best. This can inform decisions about product promotion, inventory management, or discontinuing underperforming products.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating a Real-Time Sales Performance Dashboard
&lt;/h2&gt;

&lt;p&gt;Once you’ve built your key visualizations, the next step is to assemble them into a single, cohesive dashboard.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Navigate to the Dashboards Section&lt;/strong&gt; : In Superset, go to &lt;strong&gt;Dashboards&lt;/strong&gt; and click &lt;strong&gt;+ Dashboard&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foq0w8250g2a3a9vrkcms.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foq0w8250g2a3a9vrkcms.png" alt="Tracking E-Commerce Sales Performance with Superset" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Add Charts to Your Dashboard&lt;/strong&gt; : Drag and drop your visualizations, including total revenue, AOV, conversion rate, and sales by product category, into the dashboard interface or &lt;strong&gt;Create New Chart&lt;/strong&gt; according to your needs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvoqeimhb2rc9wejzi4wf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvoqeimhb2rc9wejzi4wf.jpg" alt="Tracking E-Commerce Sales Performance with Superset" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Customize Layout&lt;/strong&gt; : You can resize and rearrange charts to create a layout that fits your business needs. Consider placing the most important metrics (like total revenue or AOV) at the top for easy access.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Adding Filters for Dynamic Analysis
&lt;/h2&gt;

&lt;p&gt;To enable more granular analysis, you can add filters to your dashboard. Filters allow users to narrow down the data they’re viewing by criteria such as date range, product category, or geographic region.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Date Range Filter&lt;/strong&gt; : The date range filter is crucial for understanding how sales performance evolves over time. By allowing users to specify a custom date range, such as a day, week, month, or even a year, it offers flexibility in how you view your sales data. This helps in spotting seasonal trends, understanding the impact of promotions, or identifying periods of high and low sales activity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Product Category Filter&lt;/strong&gt; : The product category filter allows for more granular analysis by letting you focus on the sales performance of specific categories, such as electronics, clothing, or home goods. By adding a dropdown menu for category selection, users can quickly filter their dashboard to analyze which product lines are performing well or underperforming. This helps in identifying which categories drive the most revenue and which may need promotional efforts, better stock management, or potential discounts. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Geographic Filter&lt;/strong&gt; : For businesses that operate in multiple regions, a geographic filter provides valuable insights into how sales performance varies across different locations. By filtering data by country, state, or even city, you can identify geographic trends, such as regions with the highest sales, markets that are expanding, or areas that may need more attention in terms of marketing or promotions. This information can guide regional marketing strategies, help allocate resources, and ensure that inventory levels are optimized for specific markets. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key Metrics to Track in Your Sales Dashboard
&lt;/h2&gt;

&lt;p&gt;A successful sales performance dashboard tracks essential KPIs that reflect your business’s overall health. Here are a few critical metrics you should be tracking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Total Revenue&lt;/strong&gt; : The most important metric for any e-commerce business, showing how much revenue has been generated over a given period.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conversion Rate&lt;/strong&gt; : This tells you what percentage of visitors are converting into paying customers. Monitoring this metric helps you gauge the effectiveness of your sales funnel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Average Order Value (AOV)&lt;/strong&gt;: A higher AOV indicates that customers are purchasing more expensive items or larger quantities, making it a useful metric for measuring the success of upselling and cross-selling efforts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Product Category Sales&lt;/strong&gt; : Understanding which product categories generate the most revenue can help guide your inventory decisions and promotional efforts.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Monitoring Real-Time Data with Alerts
&lt;/h2&gt;

&lt;p&gt;Superset also allows you to set up alerts for critical sales metrics. For example, if your conversion rate drops below a certain threshold or your daily revenue exceeds a set target, you can receive an alert via email or webhook.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To set up an alert system, head over to &lt;strong&gt;Settings &amp;gt; Alerts &amp;amp; Reports&lt;/strong&gt; from the top right-hand corner.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fah7ea58tuskykf8cb0sc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fah7ea58tuskykf8cb0sc.jpg" alt="Tracking E-Commerce Sales Performance with Superset" width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next, click on &lt;strong&gt;+ Alert&lt;/strong&gt; and fill out the alert information like &lt;strong&gt;Alert Name&lt;/strong&gt; , &lt;strong&gt;Owners&lt;/strong&gt; , &lt;strong&gt;Conditions&lt;/strong&gt; , &lt;strong&gt;Contents,&lt;/strong&gt; etc click on &lt;strong&gt;Add&lt;/strong&gt; once you are done.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp8g35l5mnyaqq1odd7ql.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp8g35l5mnyaqq1odd7ql.jpg" alt="Tracking E-Commerce Sales Performance with Superset" width="473" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Thanks for reading ❤️&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;By integrating your sales data, setting up custom visualizations, and enabling filters, you can create a dashboard that gives you a clear view of your business's performance. Thank you so much for reading and do check out the Elestio resources and Official &lt;a href="https://superset.apache.org/docs/intro/?ref=blog.elest.io" rel="noopener noreferrer"&gt;Superset documentation&lt;/a&gt; to learn more about Superset. You can click the button below to create your service on &lt;a href="https://elest.io/open-source/superset?ref=blog.elest.io" rel="noopener noreferrer"&gt;Elestio&lt;/a&gt;. See you in the next one👋&lt;/p&gt;

&lt;p&gt;&lt;a href="https://elest.io/open-source/superset?ref=blog.elest.io" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc5zvhkzhhcg8kfvnm6up.png" alt="Tracking E-Commerce Sales Performance with Superset" width="194" height="40"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>superset</category>
      <category>opensourcesoftwares</category>
      <category>elestio</category>
    </item>
  </channel>
</rss>
