uhi67/simplesamlphp-module-rrauth

There is no license information available for the latest version (1.0.5) of this package.

Authentication source based on a JSON webservice

Installs: 123

Dependents: 0

Suggesters: 0

Security: 0

Type:simplesamlphp-module

1.0.5 2022-12-12 20:59 UTC

This package is auto-updated.

Last update: 2024-03-17 20:42:06 UTC


README

version 1.0.5 (2022-12-12)

This module contains:

  • Test authentication source based on a JSON webservice

The purpose of this module is to replace exampleauth:UserPass test source with a simple external source. This module is backward compatible with exampleauth:UserPass module, it means that in addition to the parameters of the external source, it may contain local user data as well, just like in exampleauth:UserPass module. If the external source does not respond (properly), the login still available with these local users.

DIRECTORY STRUCTURE

  lib/Auth					Simple WebService authentication source

REQUIREMENTS

  • PHP >= 5.4.0.
  • SimpleSAMLphp >= v1.13
  • JSON auth compatible service to connect to

INSTALLATION

Preferred way:

composer require uhi67/simplesamlphp-module-rrauth

or simply copy the module directory under simplesamlphp/modules/

CONFIGURATION

in an IdP confiruration, you may create a webservice authentication source in file authsources.php

	'rr' => array(
		'rrAuth:auth',
		'url' => 'https://rr.test/samlres/auth/1',
		'scope' => 'pte.hu',
		// Secret generated by `rr` to connect to the webservice 
		'key' => 'xxx',
		// Local users are with the same syntax as in 
		'local' => array(
		    'user:password' => array(attributes...),
		    ...
		),
	),

The shared key can be obtained from the authentication source. No published version of server side currently exists. Create your authentication source using the following simple API description:

JSON auth protocol

  1. post to the configured url the following variables:

'secret' => sha256($login."\n".$password."\n".$key)

  1. The response of the server must be a JSON data:

{auth: boolean, attributes: {name: [value, value...], ...}}

CHANGES

1.0.5 (2022-12-12)

  • SSP classes, deprecations

1.0.4 (2021-02-11)

  • more informative errortext when connection to remote

1.0.3 (2019-02-27)

  • missing uid attribute added (default is login username)

1.0.2 (2019-02-26)

  • Packagist version

1.0.1 (2018-12-13)

  • SimpleSamlPHP backward compatibility (to 1.13)

1.0 (2018-12-03)