Feeds

FSF Blogs: Exciting talks, hands-on workshops, and thrilling discussions await you at LibrePlanet 2024

GNU Planet! - Tue, 2024-02-27 15:39
In this blog post, we're sharing with you all the sessions that have been confirmed for LibrePlanet 2024: Cultivating Community.
Categories: FLOSS Project Planets

PyCoder’s Weekly: Issue #618 (Feb. 27, 2024)

Planet Python - Tue, 2024-02-27 14:30

#618 – FEBRUARY 27, 2024
View in Browser »

McKinney on Improving the Data Stack & Composable Systems

How do you avoid the bottlenecks of data processing systems? Is it possible to build tools that decouple storage and computation? This week on the show, creator of the pandas library Wes McKinney is here to discuss Apache Arrow, composable data systems, and community collaboration.
REAL PYTHON podcast

Introducing Flask-Muck: Building a REST API in 5 Minutes

Flask-Muck sits on top of a Flask/SQLAlchemy tech stack and uses a declarative and modular approach to replace huge amounts of boilerplate code by generating a full-featured set of standard CRUD endpoints for a resource. Learn how to use it by reading this post.
DANNY TIESLING • Shared by Danny Tiesling

Live Hack: Exploiting AI-Generated Code

Join Snyk’s Live Hack Workshop! Get live expert support while learning how to exploit & remediate vulnerabilities. March 6th | 11:00am ET (Worth 1 CPE credit) →
SNYK.IO sponsor

10 Years of Wagtail

Tom Dyson, a founding member of the Wagtail core team, shares some thoughts about how Wagtail CMS grew from a small, niche open source project into one of the most popular Python CMSs used by NASA, Google, the National Health Service, and many others.
TOM DYSON

Astral Takes Stewardship of Rye

ARMIN RONACHER

PySimpleGUI 4 Sunsets in Q2 2024

PYSIMPLEGUI

Discussions uv Another Rust Tool Written to Replace pip

PYTHON DISCUSS

Articles & Tutorials BNF Notation: Dive Deeper Into Python’s Grammar

In this tutorial, you’ll learn about Backus–Naur form notation (BNF), which is typically used for defining the grammar of programming languages. Python uses a variation of BNF, and here, you’ll learn how to read it to get a better understanding of some language constructs.
REAL PYTHON

Thread Local Data in Python

The article introduces the threading module’s local() for storing thread-local values. Since threads in Python share the memory space of their parent process, you might need to define thread-specific variables for specific use cases to avoid unintended side effects.
ADARSH DIVAKARAN • Shared by Adarsh Divakaran

Blocked by Slow Code Reviews? Here’s How to Stop Waiting

Code reviews are great - but they shouldn’t slow down your development. Sourcery can automatically review every one of your PR’s so your team can keep moving fast →
SOURCERY sponsor

Unleashing the Power of the Console With Rich

Rich is a powerful library for creating text-based user interfaces (TUIs) in Python. It enhances code readability by pretty-printing complex data structures and adds visual appeal with colored text, tables, animations, and more.
REAL PYTHON course

Python Monorepo Visualization

Monorepos can be a bit overwhelming, containing all the code for all your projects. Thankfully, there are ways to visualize a Python monorepo. This blog post introduces you to one repo visualizer: Polylith
DAVID VUJIC • Shared by David Vujic

Counting CPU Instructions in Python

Did you know it takes about 17,000 CPU instructions1 to print(“Hello”) in Python? And that it takes ~2 billion of them to import seaborn? Learn about the tools Matt used to find this out.
MATT STUCHLIK

The Broken Version Breakdown

Pypi is a real treasure box full of great Python tools. Unfortunately, released versions of most of them can suddenly be broken by a downstream dependency release.
IVO HOUBRECHTS • Shared by Ivo Houbrechts

Not Just NVIDIA: GPU Programming That Runs Everywhere

This article talks about wgpu-py, a GPU portable Python library. Ever want to use the GPU but use something other than NIVIDIA? This library might be for you.
ITAMAR TURNER-TRAURING

Add Versatility To AI Apps, Build With Popular Model Choices Like YOLOv8

Future-proof your AI apps with constantly expanding model compatibility, including YOLOv8, Padim, and more. Speed up development and deploy seamlessly with Intel’s OpenVINO toolkit.
INTEL CORPORATION sponsor

Floats Are Weird

This post attempts to demonstrate a calculus proof by applying floats, but of course the precision of floats get in the way. See what happens.
EXOZY

Django REST Framework and Vue vs HTMX

Learn how the development process varies between working with Django REST Framework and Vue versus Django and HTMX.
ŠPELA GIACOMELLI • Shared by Michael Herman

Projects & Code temporian: Library for Preprocessing Temporal Data

GITHUB.COM/GOOGLE

mac-cleanup-py: Cleanup Script for macOS in Python

GITHUB.COM/MAC-CLEANUP

lockbox: Forward Proxy for Making 3rd Party API Calls

GITHUB.COM/MKJT2

rexi: Terminal UI for Regex Testing

GITHUB.COM/ROYREZNIK

sqlite-web: Web-Based SQLite Database Browser

GITHUB.COM/COLEIFER

Events Weekly Real Python Office Hours Q&A (Virtual)

February 28, 2024
REALPYTHON.COM

SPb Python Drinkup

February 29, 2024
MEETUP.COM

PyLadies Amsterdam

February 29, 2024
MEETUP.COM

PyCon Namibia 2024

March 4 to March 8, 2024
PYCON.ORG

Melbourne Python Users Group, Australia

March 4, 2024
J.MP

PyCon Pakistan 2024

March 9 to March 11, 2024
PYCON.PK

Happy Pythoning!
This was PyCoder’s Weekly Issue #618.
View in Browser »

[ Subscribe to 🐍 PyCoder’s Weekly 💌 – Get the best Python news, articles, and tutorials delivered to your inbox once a week >> Click here to learn more ]

Categories: FLOSS Project Planets

New risk assessment framework offers clarity for open AI models

Open Source Initiative - Tue, 2024-02-27 12:45

There is a debate within the AI community around the risks of widely releasing foundation models with their weights and the societal impact of that decision. Some are arguing that the wide availability of Llama2 or Stable Diffusion XL are a net negative for society. A position paper released today shows that there is insufficient evidence to effectively characterize the marginal risk of these models relative to other technologies. 

The paper was authored by Sayash Kappor of Princeton University and Rishi Bommasani of Stanford University, me and others and is directed at AI developers, researchers investigating the risks of AI, competition regulators, and policymakers who are challenged with how to govern open foundation models. 

This paper introduces a risk assessment framework to be used with open models. This resource helps explain why the marginal risk is low in some cases where we already have evidence from past waves of digital technology. It reveals that past work has focused on different subsets of the framework with different assumptions, serving to clarify disagreements about misuse risks. By outlining the necessary components of a complete analysis of the misuse risk of open foundation models, it lays out a path to a more constructive debate moving forward.

I hope this work will support a constructive debate where risks of AI are grounded in science and today’s reality, rather than hypothetical, future scenarios. This paper offers a position that balances the case against open foundation models with substantiated analysis and a useful framework on which to build. Please read the paper and leave your comments on Mastodon or LinkedIn.

Categories: FLOSS Research

Kushal Das: Mullvad VPN repository for Fedora

Planet Python - Tue, 2024-02-27 12:37

Mullvad VPN now has proper rpm repository for their desktop client. You can use it in the following way on you Fedora system:

sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo sudo dnf install mullvad-vpn

Remember to verify the OpenPGP key Fingerprint:

Importing GPG key 0x66DE8DDF: Userid : "Mullvad (code signing) <admin@mullvad.net>" Fingerprint: A119 8702 FC3E 0A09 A9AE 5B75 D5A1 D4F2 66DE 8DDF From : https://repository.mullvad.net/rpm/mullvad-keyring.asc
Categories: FLOSS Project Planets

Mike Driscoll: uv – Python’s Fastest Package Installer and Resolver

Planet Python - Tue, 2024-02-27 09:09

There’s a new Python package installer out now and it’s called uv. The uv package installer and resolver is made by Astral. Uv is written in Rust instead of Python and is super fast! Astral is best known for Python’s fastest formatter, Ruff. The uv package is meant to be a drop-in replacement for pip and pip-tools. According to Astral, “uv is 8-10x faster than pip and pip-tools without caching, and 80-115x faster when running with a warm cache (e.g., recreating a virtual environment or updating a dependency)”.

Astral is also taking over the development of Rye, an experimental Python packaging tool from Armin Ronacher. From the sounds of Astral’s announcement, Rye and uv will become one tool as the two projects have a shared vision for Python packaging.

Installing uv

You can install uv using Curl:

curl -LsSf https://astral.sh/uv/install.sh | sh

Or you can use pip:

pip install uv

Now that you have uv installed, you can start installing packages!

Using uv

Let’s try running uv in your terminal:

c:\code> uv Usage: uv.exe [OPTIONS] <COMMAND> Commands: pip Resolve and install Python packages venv Create a virtual environment cache Manage the cache help Print this message or the help of the given subcommand(s) Options: -q, --quiet Do not print any output -v, --verbose Use verbose output --color <COLOR> Control colors in output [default: auto] [possible values: auto, always, never] -n, --no-cache Avoid reading from or writing to the cache [env: UV_NO_CACHE=] --cache-dir <CACHE_DIR> Path to the cache directory [env: UV_CACHE_DIR=] -h, --help Print help (see more with '--help') -V, --version Print version

You’ll need to create and activate a Python virtual environment to install packages with uv.

Here’s an example:

C:\code> uv venv test Using Python 3.11.5 interpreter at C:\Users\wheifrd\AppData\Local\Programs\Python\Python311\python.exe Creating virtualenv at: test Activate with: test\Scripts\activate C:\code> .\test\Scripts\activate (test) C:\books>

Now you’re ready to install a Python package. You can use numpy for a test run:

(test) C:\books> uv pip install numpy Resolved 1 package in 615ms Downloaded 1 package in 2.81s Installed 1 package in 332ms + numpy==1.26.4

As you might expect, you can also use uv to install:

  • a list of space-delimited packages
  • a requirements.txt file
  • a pyproject.toml file

If you need to generate a locked requirements.txt file, you can run uv pip compile.

Wrapping Up

Astral hopes to create a “Cargo for Python” with the release of uv. While it’s still early, this project is well worth watching as the Rust package itself is amazingly fast and useful even though it’s only been out for about a year. You can read more about uv in Astral’s blog post.

 

The post uv – Python’s Fastest Package Installer and Resolver appeared first on Mouse Vs Python.

Categories: FLOSS Project Planets

Real Python: Python Basics Exercises: Installing Packages With pip

Planet Python - Tue, 2024-02-27 09:00

So far on the Python Basics learning path, you’ve been working within the bounds of the Python standard library. Now it’s time to unlock packages that aren’t included with Python by default. To do that, you’ll need pip.

Many programming languages offer a package manager that automates the process of installing, upgrading, and removing third-party packages. Python is no exception. The de facto package manager for Python is called pip.

In this Python Basics Exercises course, you’ll test and reinforce your knowledge of installing packages and managing virtual environments.

In this video course, you’ll practice:

  • Installing and managing third-party packages with pip
  • Using virtual environments to separate project dependencies
  • Declaring requirements and re-create a development environment

By the end of this course, you’ll have an even stronger grasp of installing packages to suit your programming needs

This video course is part of the Python Basics series, which accompanies Python Basics: A Practical Introduction to Python 3. Note that you’ll be using IDLE to interact with Python throughout this course.

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

Modernized, streamlined, and fediverse-friendly: OpenSource.org is fully migrated and ready to connect!

Open Source Initiative - Tue, 2024-02-27 03:00

Two years ago, we started migrating our website from Drupal to WordPress. We knew it wasn’t going to be a quick weekend project, but more of a journey. Today, we celebrate the final leg of this journey – merging our blog back into the main site, creating a unified online experience for our community.

Let’s rewind to 2022. Our Drupal site, while trusty, was starting to show its age. It lacked the modern features and it was self hosted, which was taking a huge toll on our team. We knew a change was necessary, but a complete overhaul would have taken too long. So, we decided to move in steps: blog first, main site later.

We first migrated our blog content to a brand new, WordPress-powered platform in early 2023. This gave us a taste of the agility and flexibility WordPress offered. We loved the intuitive interface, the vast plugin ecosystem, and the worry-free managed WordPress provided by DreamHost.

Emboldened by this success, we set our sights on the bigger challenge: migrating the entire website. This wasn’t just about moving content; it was about restructuring, modernizing, and enhancing. We meticulously migrated web pages, ensuring the least amount of URL broke during the transition.

But migration wasn’t just about moving pixels and text. We took this opportunity to modernize our licenses pages. We added missing metadata and made them easily accessible to our users with a dedicated search engine. We also created a Custom Post Type for directors and forms to improve how we handle the nominations for the board elections

Closing the loop with the blog

Now, here we are, at the final stage of our migration journey: merging the blog back into the main site. This completes the circle, creating a unified online experience where our blog seamlessly integrates with the rest of our content – licenses, events, elections, blog and more.

But the most exciting part? We’ve embraced the power of the fediverse! Comments on our blog posts can now be posted and shared across different platforms, fostering a lively and open discussion space. This integration with ActivityPub opens up our content to a wider audience and encourages a more vibrant online community.

Looking back, our Drupal-to-WordPress migration was an odyssey filled with technical hurdles, strategic decisions, and moments of pure satisfaction. We learned, we created a single-sign-on mechanism for OSI members that works on other sites (OpenSource.net and the forum, to start) and ultimately, we emerged with a website that is modern, functional, and better serves our mission. 

Next steps for opensource.org

Next project for us will be a content cleanup and expansion. We will soon start combing through years of content, removing outdated information and streamlining what remained. This decluttering will make space for new content for the website to be more useful, letting visitors learn what Open Source is and how it can help them. We’ll also add more features for OSI members based on the new forum. Explore the new blog, engage with our content, and join the conversation on the fediverse! And if you’re considering a website migration yourself, take heart from our story. With careful planning, the right tools, and the wonderful help of Automattic and the Pressable team, even the most complex migration can be a successful and rewarding journey.

Categories: FLOSS Research

Specbee: How to integrate SSO with Drupal using SAML

Planet Drupal - Tue, 2024-02-27 01:51
Show of hands for anyone thrilled about logging in to every website every single time? Anyone? Didn't think so. When businesses prioritize convenience, customers will follow. Single Sign-On (SSO) is one such convenient feature that leaves your customers feeling satisfied and less stressed. It is a huge time-saver, is more secure (reduces password breach attacks), and increases productivity. In fact, businesses adopting SSO have seen an increase in user adoption rate too. Do you want to learn about how you can integrate SSO with your Drupal website? Keep reading and dive into the details! What is SSO ? Single Sign-On (SSO) is a user authentication service that allows users to use one login credential for all the systems integrated with SSO. Or, if there already is an open session in the main application, just clicking a button will log you in. An example: We can consider Quora as an example, as the forum allows you to create a new account, log in with those credentials, and also use social media logins (Google and Facebook).                          Source: https://www.quora.com/ Types of SSO Protocols Like any other concept, there are many available protocols to achieve this. Some of the common protocols are: Lightweight Directory Access Protocol (LDAP) Kerberos Security Assertion Markup Language (SAML) OAuth 2 OpenID Connect Things to know before we start XML Certificate/Key Generation XML XML (eXtensible Markup Language) is a markup language similar to HTML. It has the ability to store and transport data. Example: <start> <first>Data1</first> <new>NewData</new> </start>Certificate/Key Generation Certificates and private keys play a major role in SAML-based SSO. Since they are used for security reasons, they validate incoming requests. To generate an OpenSSL certificate and private key, run the following command in the terminal: openssl req -x509 -nodes -sha256 -days 3650 -newkey rsa:2048 -keyout private_key.key -out certificate.crtHow it Works In SAML SSO, we consider the application requesting login as a Service Provider (SP), and the application providing authentication information is the Identity Provider (IdP). Flow: When a user tries to log in to SP, the browser sends a request to the SP server. SP will generate a SAML request (which contains SAML data in XML format) and redirect to the configured IdP URL (in SP) for authentication. Then, the IdP will validate the SAML data from the request XML with the pre-configured data of SP(in IdP). Once validated, IdP will generate an XML formatted SAML response to the ACS URL from the SAML request of SP with the current email address (by default which can be overridden) value with other data for validation. Now, SP will validate the data of the SAML response and authenticate the user of the email address in the SAML response.                                                                   Source Here, both the SAML request and SAML Response will be encrypted and will be decrypted in the redirected application (SP/IdP). In most cases, Drupal is used as a service provider, but it can also be enhanced as an identity provider. We can have 3 different types of SAML Request(AuthNRequest): AuthNRequest <samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="ONELOGIN_809707f0030a5d00620c9d9df97f627afe9dcc24" Version="2.0" ProviderName="SP test" IssueInstant="2014-07-16T23:52:45Z" Destination="http://idp.example.com/SSOService.php" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" AssertionConsumerServiceURL="http://sp.example.com/demo1/index.php?acs"> <saml:Issuer>http://sp.example.com/demo1/metadata.php</saml:Issuer> <samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" AllowCreate="true"/> <samlp:RequestedAuthnContext Comparison="exact"> <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef> </samlp:RequestedAuthnContext> </samlp:AuthnRequest> With Signature (HTTP-Redirect binding) bM441nuRIzAjKeMM8RhegMFjZ4L4xPBHhAfHYqgnYDQnSxC++Qn5IocWuzuBGz7JQmT9C57nxjxgbFIatiqUCQN17aYrLn/mWE09C5mJMYlcV68ibEkbR/JKUQ+2u/N+mSD4/C/QvFvuB6BcJaXaz0h7NwGhHROUte6MoGJKMPE= AuthNRequest with embedded signature (HTTP-POST binding) <samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="pfx41d8ef22-e612-8c50-9960-1b16f15741b3" Version="2.0" ProviderName="SP test" IssueInstant="2014-07-16T23:52:45Z" Destination="http://idp.example.com/SSOService.php" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" AssertionConsumerServiceURL="http://sp.example.com/demo1/index.php?acs"> <saml:Issuer>http://sp.example.com/demo1/metadata.php</saml:Issuer> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <ds:Reference URI="#pfx41d8ef22-e612-8c50-9960-1b16f15741b3"> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <ds:DigestValue>yJN6cXUwQxTmMEsPesBP2NkqYFI=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue>g5eM9yPnKsmmE/Kh2qS7nfK8HoF6yHrAdNQxh70kh8pRI4KaNbYNOL9sF8F57Yd+jO6iNga8nnbwhbATKGXIZOJJSugXGAMRyZsj/rqngwTJk5KmujbqouR1SLFsbo7Iuwze933EgefBbAE4JRI7V2aD9YgmB3socPqAi2Qf97E=</ds:SignatureValue> <ds:KeyInfo> <ds:X509Data> <ds:X509Certificate>MIICajCCAdOgAwIBAgIBADANBgkqhkiG9w0BAQQFADBSMQswCQYDVQQGEwJ1czETMBEGA1UECAwKQ2FsaWZvcm5pYTEVMBMGA1UECgwMT25lbG9naW4gSW5jMRcwFQYDVQQDDA5zcC5leGFtcGxlLmNvbTAeFw0xNDA3MTcwMDI5MjdaFw0xNTA3MTcwMDI5MjdaMFIxCzAJBgNVBAYTAnVzMRMwEQYDVQQIDApDYWxpZm9ybmlhMRUwEwYDVQQKDAxPbmVsb2dpbiBJbmMxFzAVBgNVBAMMDnNwLmV4YW1wbGUuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7vU/6R/OBA6BKsZH4L2bIQ2cqBO7/aMfPjUPJPSn59d/f0aRqSC58YYrPuQODydUABiCknOn9yV0fEYm4bNvfjroTEd8bDlqo5oAXAUAI8XHPppJNz7pxbhZW0u35q45PJzGM9nCv9bglDQYJLby1ZUdHsSiDIpMbGgf/ZrxqawIDAQABo1AwTjAdBgNVHQ4EFgQU3s2NEpYx7wH6bq7xJFKa46jBDf4wHwYDVR0jBBgwFoAU3s2NEpYx7wH6bq7xJFKa46jBDf4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQCPsNO2FG+zmk5miXEswAs30E14rBJpe/64FBpM1rPzOleexvMgZlr0/smF3P5TWb7H8Fy5kEiByxMjaQmml/nQx6qgVVzdhaTANpIE1ywEzVJlhdvw4hmRuEKYqTaFMLez0sRL79LUeDxPWw7Mj9FkpRYT+kAGiFomHop1nErV6Q==</ds:X509Certificate> </ds:X509Data> </ds:KeyInfo> </ds:Signature> <samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" AllowCreate="true"/> <samlp:RequestedAuthnContext Comparison="exact"> <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef> </samlp:RequestedAuthnContext> </samlp:AuthnRequest>Reference: https://www.samltool.com/generic_sso_req.php We can have different types of SAML Response: SAML Response <samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="_8e8dc5f69a98cc4c1ff3427e5ce34606fd672f91e6" Version="2.0" IssueInstant="2014-07-17T01:01:48Z" Destination="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"> <saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer> <samlp:Status> <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/> </samlp:Status> <saml:Assertion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" ID="_d71a3a8e9fcc45c9e9d248ef7049393fc8f04e5f75" Version="2.0" IssueInstant="2014-07-17T01:01:48Z"> <saml:Issuer>http://idp.example.com/metadata.php</saml:Issuer> <saml:Subject> <saml:NameID SPNameQualifier="http://sp.example.com/demo1/metadata.php" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">_ce3d2948b4cf20146dee0a0b3dd6f69b6cf86f62d7</saml:NameID> <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"> <saml:SubjectConfirmationData NotOnOrAfter="2024-01-18T06:21:48Z" Recipient="http://sp.example.com/demo1/index.php?acs" InResponseTo="ONELOGIN_4fee3b046395c4e751011e97f8900b5273d56685"/> </saml:SubjectConfirmation> </saml:Subject> <saml:Conditions NotBefore="2014-07-17T01:01:18Z" NotOnOrAfter="2024-01-18T06:21:48Z"> <saml:AudienceRestriction> <saml:Audience>http://sp.example.com/demo1/metadata.php</saml:Audience> </saml:AudienceRestriction> </saml:Conditions> <saml:AuthnStatement AuthnInstant="2014-07-17T01:01:48Z" SessionNotOnOrAfter="2024-07-17T09:01:48Z" SessionIndex="_be9967abd904ddcae3c0eb4189adbe3f71e327cf93"> <saml:AuthnContext> <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:Password</saml:AuthnContextClassRef> </saml:AuthnContext> </saml:AuthnStatement> <saml:AttributeStatement> <saml:Attribute Name="uid" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> <saml:AttributeValue xsi:type="xs:string">test</saml:AttributeValue> </saml:Attribute> <saml:Attribute Name="mail" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> <saml:AttributeValue xsi:type="xs:string">test@example.com</saml:AttributeValue> </saml:Attribute> <saml:Attribute Name="eduPersonAffiliation" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic"> <saml:AttributeValue xsi:type="xs:string">users</saml:AttributeValue> <saml:AttributeValue xsi:type="xs:string">examplerole1</saml:AttributeValue> </saml:Attribute> </saml:AttributeStatement> </saml:Assertion> </samlp:Response>The rest of the types can be referred in https://www.samltool.com/generic_sso_res.php. The request and response can be sent as both GET and POST methods. Available Modules for SSO In Drupal, we have a list of modules for Service Provider and Identity Provider. Here are some of the SP and IdP modules: SP Modules: SAML Service Provider SAML Authentication Onelogin Integration miniOrange SAML SP(Paid Version)  IdP Modules: Light SAML IDP SAML IdP miniOrange SAML IDP (Paid Version) Testing Tools: Even though the data is encrypted, we can debug the SAML request with the help of the following tools. SAML Tracer for Mozilla Firefox. SAML Chrome Panel for Google Chrome. How to integrate SSO in Drupal using SAML Configure SSO module in SP Here we have used the saml_sp module for gearing up Drupal as a Service Provider. Configure SP module Settings Create the certificate and private_key and place them in a Drupal-readable location. Install the module.composer require 'drupal/saml_sp:^4.2' Enable the module in the Extend section.  Go to the configuration of the module (/admin/config/people/saml_sp). Configure the SP settings Provide the entityID if you want to override the default https://sp.lndo.site/user. Here https://sp.lndo.site is the domain. Provide an assertion URL similar to https://sp.lndo.site/saml/consume. Provide other mandatory details. Make sure that if you are using Sign specify the correct algorithm and select the Assertion and Encryption type based on requirement(based on the requirement of IdP). Provide the certificate and private key file path.Based on the data provided, Metadata will be generated. This XML metadata will be used for configuring the SP data in IdP. Configure Identity Providers in SP 1. Under Identity Providers click on Add Service Provider.2. Add the data from the metadata file/url provided by IdP. In SAML SP we can use the Drupal Login module once the above are configured. Under the Login Menu, configure the process of SAML login. For example, if a user without an account in SP but with an account in IdP creates an account in SP with an authenticated role. Configure SSO module in IdP Here we have used the light_saml_idp module for gearing up Drupal as an Identity Provider. Configure IdP module Settings: 1. Create the certificate and private_key and place it in a Drupal readable location.2. Install the module.3. Enable the module in the Extend section. 4. Go to the configuration (/admin/config/people/light_saml_idp) Provide the entity_id. Provide the other necessary details. Make sure to provide the correct file path of the certificate and private_key. Once the data is provided metadata will be generated under the Metadata tab. This needs to be provided to SP to configure there. Add the Service Provider under the Service Provider, with the data from SP metadata. The SSO will work properly once these are configured successfully. Hurray! SSO is integrated successfully. If you are not able to use the SSO, use testing tools to verify what is causing the issue. Final Thoughts You just learned how to seamlessly integrate SSO with Drupal using SAML for a stress-free user experience! Considering the protocols, certificates, and complex SAML login flow we've explored, SSO plays a significant role in simplifying user authentication. For a seamless SSO journey and Drupal development expertise, look no further than Specbee - your trusted partner in crafting exceptional digital experiences.  
Categories: FLOSS Project Planets

Python⇒Speed: Jevons Paradox doesn't always apply to software

Planet Python - Mon, 2024-02-26 19:00

When it comes to fighting climate change, I strongly believe that getting involved in politics is one of the most useful things you can do. But given how energy-intensive software is these days, writing more efficient software also seems worth doing, especially if your software is used at scale.

However, whenever efficiency is brought up, Jevons Paradox rears its head. Writing in the 19th century, Jevons pointed out that increased efficiency in the use of coal didn’t decrease the amount of coal used, it actually increased it. As it became more cost-effective and more useful, coal ended up being used in far more places.

So what about software: will faster software result in more usage, completely undoing the energy-consumption benefits of efficiency?

Read more...
Categories: FLOSS Project Planets

PyCharm: PyCharm 2023.3.4: AI Assistant’s Efficiency Boosters and a more powerful Django Structure tool window

Planet Python - Mon, 2024-02-26 16:10

This year, we are trying out a new approach with our releases, moving away from a quarterly schedule to more regular monthly feature-rich releases. This change is intended to deliver new features more rapidly and streamline the feedback process.

Upgrade to PyCharm 2023.3.4

New AI Assistant functionality [PyCharm Professional]

Get work done faster with new AI Assistant actions. Generate Python type annotations for functions and get Django views, admins, and serializers for models. Obtain a quick analysis of the data inside your DataFrame and convert Jupyter notebooks to scripts. Do all of this with just a click!

The Django Structure tool window [PyCharm Professional]

Navigate through your Django projects faster with the new features of the Django Structure tool window. Access settings.py or identify and register unregistered admins directly in the tool window.

Quick Documentation for type parameter declarations in the new syntax

If you have already adopted the new syntax for type parameter declarations introduced in PEP 695, this feature will definitely make your life easier. The Quick Documentation popup clearly explains the type parameters and type aliases used in your code.

These are the most notable updates featured in the PyCharm 2023.3.4 release. For a detailed overview of all the changes, we recommend reviewing the release notes.

Learn more about PyCharm 2023.3.4

Your feedback is invaluable to us as we work to improve PyCharm. We encourage you to share your thoughts and suggestions on the latest features and updates. Connect with us on X (formerly Twitter) or drop a comment below to let us know what you think. If you come across any bugs while working with the IDE, please report them to our issue tracker.

Categories: FLOSS Project Planets

FOSDEM 2024: two days on software freedom

FSF Blogs - Mon, 2024-02-26 15:35
We depend on software as a society. In such a world, software freedom has to be protected. Free Software Foundation's (FSF) Licensing and Compliance Manager, Krzysztof Siewicz is sharing his personal account of FOSDEM 2024.
Categories: FLOSS Project Planets

FSF Blogs: FOSDEM 2024: two days on software freedom

GNU Planet! - Mon, 2024-02-26 15:35
We depend on software as a society. In such a world, software freedom has to be protected. Free Software Foundation's (FSF) Licensing and Compliance Manager, Krzysztof Siewicz is sharing his personal account of FOSDEM 2024.
Categories: FLOSS Project Planets

Adnan Hodzic: App architecture with reliability in mind: From Kubernetes to Serverless with GCP Cloud Build & Cloud Run

Planet Debian - Mon, 2024-02-26 15:00

The blog post you’re reading is hosted on a private Kubernetes cluster that runs inside my home. Another workload that’s running on same cluster is...

The post App architecture with reliability in mind: From Kubernetes to Serverless with GCP Cloud Build & Cloud Run appeared first on FoolControl: Phear the penguin.

Categories: FLOSS Project Planets

Talking Drupal: Talking Drupal #439 - Drupal 7 Long-Term Support

Planet Drupal - Mon, 2024-02-26 14:00

Today we are talking about Drupal 7 Long Term Support, common security tips, and support services you can use with guests Greg Knaddison, Aaron Frost, and Dave Welch . We’ll also cover Storybook as our module of the week.

For show notes visit: www.talkingDrupal.com/439

Topics
  • Drupal 7 EoL
  • Drupal will not stop working
  • Security team perspective
  • Security concerns
  • Extened Community Support
  • Long Term support
  • HeroDevs
  • Never ending support (NES)
    • PHP
    • Hosting
    • Security
    • Contrib
  • Product advisor
  • Colorado Digital Service
Resources Guests

Greg Knaddison - morrisanimalfoundation.org greggles Aaron Frost - herodevs.com aaronfrost Dave Welch - herodevs.com dwelch2344

Hosts

Nic Laflin - nLighteneddevelopment.com nicxvan John Picozzi - epam.com johnpicozzi Ivan Stegic - ten7.com ivanstegic

MOTW Correspondent

Mark Casias - markie

  • Module name/project name:
  • Brief description:
    • The storybook module makes it easier to create a connection between Drupal and Storybook. It adds some Twig functionality so you can write Stories in Twig as opposed to YML or JSON or React
  • Brief history
    • How old: Less than a year
    • Versions available: Alpha4 came out earlier this month
  • Maintainership
    • Actively maintained: Yes
    • Number of open issues: 6
    • Test coverage: no
  • Usage stats:
    • N/A: for development only
    • Maintainer(s):
    • Mateu Aguiló Bosch (e0ipso) from Lullabot.
    • Module features and usage
    • Twig based stories
    • Pulls in Sites theme and base css.
    • So needs some updates to the development.services.yml
    • Also means it is hard to publish a storybook.
    • No need for SDC (but works well with it)
    • Great instructions on the module page
    • Way easier than previous integrations including cl_server.
    • Not as opinionated as previous storybook integrations.
Categories: FLOSS Project Planets

The Drop Times: Which CMS? Global City Website Trends Examined

Planet Drupal - Mon, 2024-02-26 13:04
Explore the trends of Content Management System (CMS) usage on official city websites with a comprehensive study spanning 466 cities worldwide. The research delves into the prevalence of open-source solutions, highlighting the dominance of WordPress, Drupal, and other platforms. The report categorizes findings based on city size, region, and EU membership, revealing intriguing patterns and insights. The study raises essential questions about the adoption of open-source systems in the public sector, shedding light on challenges and opportunities for promoting transparency and cost-efficiency in digital governance. Dive into the detailed analysis to understand the global dynamics of CMS choices in city administrations.
Categories: FLOSS Project Planets

The Drop Times: Innovation: The Lifeblood of Progress!

Planet Drupal - Mon, 2024-02-26 13:04

Dear Readers,

Innovation is the lifeblood of progress. It represents the pursuit of better solutions, the breaking of traditional boundaries, and products that challenge the status quo and push the boundaries of what is possible. True innovation involves a continuous cycle of exploration, experimentation, and adaptation, driven by a deep desire to solve complex problems and improve human experiences. It's about seeing beyond the current limitations and envisioning what could be, transforming bold visions into tangible solutions that can significantly advance how we live, work, and interact.

As a powerful tool for creating and maintaining dynamic web applications and the most sought-after enterprise-level CMS, Drupal stands as a testament to the power of innovation. As an open-source platform, Drupal thrives on its global community's collective creativity and technical prowess. Through Drupal, innovation is not just an individual pursuit but a shared journey, propelling the platform and its users toward new frontiers of digital possibility.`

Drupal means innovation, and the Drupal Association has introduced an Innovation Hub, a dedicated space to foster collaboration and advance innovation within the Drupal community. Headed by Alex Moreno, the initiative has devised a set of strategic goals for Drupal and its community for 2023-2025. With a focus on inspiration, collaboration, and driving Drupal forward, the Innovation Hub aims to shape the future of digital experiences and strengthen Drupal's vibrant ecosystem.

With that, welcome to the last week's most important content covered by The DropTimes.

Today marks the final day of Florida DrupalCamp 2024, and as media sponsors, The DropTimes came up with two interviews in the last week featuring two of the three featured speakers of FLDC 2024. I had the opportunity to interact with Matthew Ramir, who defied the limits posed by Cerebral Palsy and navigated the realms of Drupal. Read the full interview here.

Aubrey Sambor, the Lead Engineer at Lullabot and the featured speaker at FLDC 2024 in an interview with Kazima Abbas, sub-editor of The DropTimes, shares her experiences and expertise, offering a glimpse into the evolving world of web development and Drupal community contributions.

We have published a selection of essential modules that empower you to build a captivating online brand and turn your product features into compelling narratives with the help of Safallia Joseph, AcroCommerce. If you're crafting an e-commerce experience where storytelling and customer connection come first, Drupal with Drupal Commerce is your solution. If you've created or worked on a successful Drupal Commerce website, share your insights with us at editor@thedroptimes.com. This collaborative exchange will inspire and empower businesses to achieve extraordinary e-commerce results with Drupal and feature you in The DropTimes.

The Pantheon Autopilot Toolbar module addresses navigation deficiencies within Pantheon's Dashboard UI, enabling efficient access to Autopilot. Kevin Reynen, the Principal Web Applications Developer at the University of Colorado, discusses the module's creation and significance in this feature. Also, understand Pantheon's response to the issue. 

Mike Gifford shares his first-hand insights from FOSDEM'24, the eminent open-source conference, shedding light on the significant discussions around open-source solutions in government, digital public goods, and the evolving role of open-source in societal advancement. Read the full article here. The Drupal Delhi Meetup, organized by Anushri Kumari, Megha Sharma, and Libbna Mathew, marked great promise for Drupal devotees. Kazima Abbas connected with the organizers to learn more about the event.

In other news, DrupalCamp Rennes revealed its lineup of keynote speakers and conference topics, and early bird registration is now open for DrupalCon Portland 2024. Tickets are also available for Midcamp 2024, and the Drupal MountainCamp schedule is out

Drupal.org has made a significant announcement revealing that Drupal 11 is now open for development, while Drupal 10.3.x has been branched. A security advisory has been issued for the Node Access Rebuild Progressive module, identifying an access bypass vulnerability in versions prior to 2.0.2. Additionally, Neil Drumm has announced a streamlined process for accepting the Git Terms of Service within the Drupal community by transitioning the acceptance procedure to their GitLab instance.

We acknowledge that there are more stories to share. However, due to constraints in selection, we must pause further exploration for now.

To get timely updates, follow us on LinkedIn, Twitter and Facebook. Also, join us on Drupal Slack at #thedroptimes.

Thank you,

Sincerely
Alka Elizabeth
Sub-editor, TheDropTimes.

Categories: FLOSS Project Planets

FSF Events: Free Software Directory meeting on IRC: Friday, March 01, starting at 12:00 EST (17:00 UTC)

GNU Planet! - Mon, 2024-02-26 12:58
Join the FSF and friends on Friday, March 01, from 12:00 to 15:00 EST (17:00 to 20:00 UTC) to help improve the Free Software Directory.
Categories: FLOSS Project Planets

Chapter Three: Next-Drupal 2.0: Making a Good Thing Even Better

Planet Drupal - Mon, 2024-02-26 12:27
Remember Next-Drupal? It’s that thing we used to talk about incessantly but have been fairly quiet about in recent months. Not to worry – we haven’t lost interest. In fact, we’ve been working hard to make our Next.js-powered decoupled Drupal front-end product even better in Next-Drupal 2.0! For those of you who are not yet familiar, here is a good introduction to Next-Drupal. For those already acquainted, please read on. Making a Fast Front-End Even Faster The primary reason for the new release is that Next.js has recently released a new feature called App Router. App Router is a new model for building applications in React that allows users to render some React components on the server side, as opposed to on the user side only.
Categories: FLOSS Project Planets

ComputerMinds.co.uk: Aegir 3 and Drupal 10: just about working

Planet Drupal - Mon, 2024-02-26 12:00

In my previous article I outlined that I really needed to get Drupal 10 sites running in Aegir 3. I had no time to wait around for other solutions, and I was going to try to decouple Aegir from running Drupal sites, so that it wouldn't be tied to Drupal versions.

Since writing that article and actually sitting down to do this work, I realised that it's quite an undertaking, and the approach outlined by Omega8cc in various github issues was worth a second look.

It works!

But it's wild. It comprises three main things:

  1. A custom/forked version of Drush 8.
  2. A custom/forked version of Provision 3.
  3. A custom/forked version of Drupal 10.
  4. (A sneaky fourth is that you absolutely do not want to have site-local Drush)

So...yeah...it's not going to be for the faint-hearted, but I'm going to detail out those three things a little, and how you might want to apply them to your situation.

Custom Drush 8

So the official Drush 8 doesn't support Drupal 10. But, it's actually not that much work to get this up and running, since Drush has pluggable 'engines' that load code based on the Drupal version that's detected when running commands.

Omega8cc has done a great job of doing the leg-work and providing a forked version of Drush, you can see the changes that have been made to support Drupal 10 here:
 

https://github.com/omega8cc/drush/compare/8.4.12...8-boa-micro

Although note, that there are some Aegir specific and non Drush 10 supporting changes in there too, so what I did was to make my own (private) fork of Drush and go through and apply the relevant changes to the files. If you don't know what the relevant changes are, then you probably are better off simply replacing your Drush with the Omega8cc fork, and it'll probably be fine.

Essentially this step is needed so that Drush sees the Drupal 10 codebase, and can interact with it correctly. It's likely that in Drupal 10's lifetime something will change, and Drush 8 will need some more work to be compatible with 10.3 and 10.4 etc.

If you were to run Drush 8 commands at this point, they'd start to bootstrap the site, but would fail with fatal errors. You need changes in Drupal 10 core too...

Custom Provision 3

Provision also makes use of Drush engines to load the correct code for the correct situation, so that if you ask Aegir to install a new site on a platform it'll load up the correct bit of code for the relevant Drupal version.

Again Omega8cc has done all the hard work here and provided the changes you need, but they are a bit harder to pick out of the repo. Try searching for files that contain '_10':

https://github.com/omega8cc/provision

And that should get you the files you need. I will note that unlike the Drush fork above, this really is a heavy fork. You are getting a lot more besides Drupal 10 support, if you can, I'd go for patching this into your existing Provision codebase.

I could add these to official provision 3 on Drupal.org, but without the other pieces they are useless and won't help you. Aegir 3 is essentially unmaintained, so while I've committed some PHP 8 fixes in the last few weeks, I'm not going to commit huge things like this.
I suppose we could have some code maintained in an issue fork or a patch.

This step is need so that Provision will call the correct bits of code at the right time, as far as I can see, these are largely the same as Drupal 9 versions of the engines.

Custom Drupal 10

Now for the big compromise.

The main problem here is that Drupal 10 uses Symfony 6, which has type hints on various interfaces and methods, and Drush 8 uses Symfony 2, which does not.

So, if you load one before the other, then as soon as PHP tries to load the second, it'll die because either the types are there, or they aren't.

This is a bit of a showstopper and there's no decent way to get it to work nicely. Instead, Omega8cc has discovered some band-aids you can slap on and while it'll work, it's brittle!

Omega8cc's fork of Provision automatically tries to apply some of these patches to Drupal 10 platforms, and gives you a nice way to add/remove them. But again, also has a lot of other opinionated changes (to provision), so if you want to know what to do to Drupal 10 core...keep reading:

We need to:

  1. Remove a bunch of typehints from Drupal core's logging mechanisms.
  2. Downgrade psr/log
  3. Patch symfony/console

 

Removing the typehints

Omega8cc have got a nice patch that does this:

https://raw.githubusercontent.com/omega8cc/boa/5.x-dev/aegir/patches/drupal-ten-aegir-01.patch

And you can apply that using composer patches if you want.

Note that if you have any classes that extend these patched classes, they'll need patching too, so if you have any custom or contrib loggers, you'll need to go sort those out.

Downgrading psr/log

Composer makes this one super easy:

composer require 'psr/log:1.1.4 as 3.0.0'

Will do what you want. It's the companion to the first step, those classes implement these interfaces, so they need to get downgraded too. This might need to get adjusted if Drupal 10 core requires psr/log 3.1.0 or something like that, but the principles should still work.

If your Drupal 10 codebase isn't managed by Composer...well...getta out here and get that sorted first.

Patching symfony/console

Drush 8 only uses part of this package, so we can get away with patching just a tiny bit of it. Essentially you want to remove the 'Input' directory within the package. If you have a build system you could delete the files as part of your build process. Omega8cc's approach is to make the directory essentially unreadable.

Either way the result is that when PHP tries to load some code that uses version 6 of Symfony\console\Input it'll fail to find the code in Drupal core, and instead fallback to the version that came with Drush 8. Luckily this code isn't used by Drupal core, but you'll need to check that your custom and contrib code doesn't use it either, or handles the case when it magically loads code from Symfony 2.

For me and my codebase this was fine. None of our custom or contrib code used the classes or interfaces, so all good.

That's it

For Drupal 10 support in Aegir, that should be it. You can run Aegir 3 in PHP 8.1 and Drupal 7 and Drupal 10 on the same box. Magic.

Make sure you don't have a site-local Drush in your composer require, otherwise, Drush 8 being the great tool that it is will find it, and pass execution over to it, but it's not the same Drush that Aegir has all it's claws/hooks in, so things will go badly quite quickly.

Gotchas

Probably many, we've not actually rolled this out into our production environment yet, but we're close.

The main thing I can think of is that Drupal 10 contrib modules are very much going to assume that there's a modern version of Drush running commands, and not Drush 8, so it's likely that they aren't going to provide Drush 8 commands. You might need to write your own shims that copy/paste large lumps of code, or call through the new style Drush commandfiles, but that means that Drush command hooks won't be working quite right etc.

So yeah, danger if you're doing anything interesting using Drush commands on your sites.

Oh, and I guess it's possible that this will all break hard in the Drupal 10 lifecycle. I mean, it probably won't because it'll always be a foundation of Symfony 6, but you never know, the Drop is always moving and all that.

Thanks to Omega8cc

This was all shown to be possible, and documented in code by the great team at Omega8cc, so thanks very much for the work they are doing. I have nothing against there heavy forks of Aegir, they just aren't for me, hence why I've tried to pull out just the bits you need into this post.

Future

I still think that Aegir 3 could be decoupled from hosting Drupal sites. So that it was hosting 'sites' and then one could have some well-defined way to interact with those sites via some command line tool depending on what they were. However, that's a big effort, and Aegir 3 is essentially unmaintained now, so that's not going to happen. 

A number of others in the #aegir Drupal.org Slack channel have mentioned other alternatives, such as Aegir 5, or getting Drush 12 running Provision commands and running everything with Drush 12 instead of Drush 8, or using some other tool as the outer runner.
I think they are all going to run into the same issues/have to deal with the same thing: abstracting the notion of the 'site'. Provision 3 takes a number of shortcuts to make it really easy to pass data around between itself and the site, and those shortcuts simply aren't possible in Modern Drupal.

However, in case there's someone out there with a big ol' budget, and a desire to keep Aegir 3 going, I think the 'decoupled' Aegir would look something like:

  • A provision where the places that it calls through to functions executed in the Drupal context abstracted out into some kind of site specific 'plugin'. Instead of trying to use the nice Drush functions for calling a 'inner' Drush command, instead the usual command line interface would be used and data simply encoded on stdin/stdout/stderr in a format not tightly coupled to Drush 8 or Drush 12/13 etc.
  • Provision calls into the Drupal site a lot and because it's never needed to be explicit about doing it, it's sometimes hard to spot where this is happening.
  • Some kind of shim package that can be composer required into sites hosted on Aegir that would provide some way for the Provision plugins to call into the Drupal site and get the response it needs. Maybe this would merely provide some Drush commands.

Good luck if anyone ever embarks on such a project! Or contact us if you want a shoulder to cry on to hire us for a project!

Categories: FLOSS Project Planets

Pages