mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
parent
7a830b19d7
commit
ff716504b0
2 changed files with 14 additions and 5 deletions
|
@ -810,7 +810,7 @@ in {
|
||||||
nginx-proxyprotocol = runTest ./nginx-proxyprotocol/default.nix;
|
nginx-proxyprotocol = runTest ./nginx-proxyprotocol/default.nix;
|
||||||
nginx-pubhtml = runTest ./nginx-pubhtml.nix;
|
nginx-pubhtml = runTest ./nginx-pubhtml.nix;
|
||||||
nginx-redirectcode = runTest ./nginx-redirectcode.nix;
|
nginx-redirectcode = runTest ./nginx-redirectcode.nix;
|
||||||
nginx-sso = handleTest ./nginx-sso.nix {};
|
nginx-sso = runTest ./nginx-sso.nix;
|
||||||
nginx-status-page = handleTest ./nginx-status-page.nix {};
|
nginx-status-page = handleTest ./nginx-status-page.nix {};
|
||||||
nginx-tmpdir = handleTest ./nginx-tmpdir.nix {};
|
nginx-tmpdir = handleTest ./nginx-tmpdir.nix {};
|
||||||
nginx-unix-socket = handleTest ./nginx-unix-socket.nix {};
|
nginx-unix-socket = handleTest ./nginx-unix-socket.nix {};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
name = "nginx-sso";
|
name = "nginx-sso";
|
||||||
meta = {
|
meta = {
|
||||||
maintainers = with pkgs.lib.maintainers; [ ambroisie ];
|
maintainers = with pkgs.lib.maintainers; [ ambroisie ];
|
||||||
|
@ -8,7 +9,10 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
services.nginx.sso = {
|
services.nginx.sso = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configuration = {
|
configuration = {
|
||||||
listen = { addr = "127.0.0.1"; port = 8080; };
|
listen = {
|
||||||
|
addr = "127.0.0.1";
|
||||||
|
port = 8080;
|
||||||
|
};
|
||||||
|
|
||||||
providers.token.tokens = {
|
providers.token.tokens = {
|
||||||
myuser = {
|
myuser = {
|
||||||
|
@ -19,7 +23,12 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
acl = {
|
acl = {
|
||||||
rule_sets = [
|
rule_sets = [
|
||||||
{
|
{
|
||||||
rules = [ { field = "x-application"; equals = "MyApp"; } ];
|
rules = [
|
||||||
|
{
|
||||||
|
field = "x-application";
|
||||||
|
equals = "MyApp";
|
||||||
|
}
|
||||||
|
];
|
||||||
allow = [ "myuser" ];
|
allow = [ "myuser" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -47,4 +56,4 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
"curl -sSf -H 'Authorization: Token MyToken' -H 'X-Application: MyApp' http://localhost:8080/auth"
|
"curl -sSf -H 'Authorization: Token MyToken' -H 'X-Application: MyApp' http://localhost:8080/auth"
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
})
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue