更改密码套件导致SSO登录错误

时间:2019-01-21 13:30:10

标签: encryption login suite

我有Perl脚本,该脚本尝试使用https连接使用用户名和密码登录网站(mywebserver.com),然后注销。

可以观察到,当在Apache Config。中增强服务器(mywebserver.com)上的密码套件时,登录Web服务器失败。 用户名和密码都没有更改,mywebserver.com的服务器证书也没有过期。

mywebserver.com的Web服务器上的密码更改可能导致登录失败。该Perl脚本正在其上执行的客户端是否应该支持mywebserver.com中更新的所有新密码套件?

如何从运行Perl脚本的客户端计算机(SUN OS)中找到支持的密码列表?以及如何解决登录问题?

在mywebserver.com的apache配置中更新了新密码套件:

SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSADS-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128- GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH + AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA: ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE- DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5 :!PSK

SSLProxyCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSADS-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128- GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH + AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA: ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE- DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5 :!PSK

在Apache配置中已替换的旧密码套件:

SSLCipherSuite -ALL:ECDH + AESGCM:DH + AESGCM:ECDH + AES256:DH + AES256:ECDH + AES128:DH + AES:RSA + AESGCM:RSA + AES:!aNULL:!MD5:!DSS:!AES256 :!ECDH + 3DES:!DH + 3DES:!RSA + 3DES

SSLProxyCipherSuite -ALL:ECDH + AESGCM:DH + AESGCM:ECDH + AES256:DH + AES256:ECDH + AES128:DH + AES:RSA + AESGCM:RSA + AES:!aNULL:!MD5:!DSS:!AES256 :!ECDH + 3DES:!DH + 3DES:!RSA + 3DES

Perl脚本:enter code here

#!/opt/SP/perl/perl-5.18.2-reloc/bin/perl -w


use strict;
use warnings;
use LWP;
use Time::Piece;
use Time::HiRes qw[gettimeofday tv_interval];

my $time1=[gettimeofday()];

my $browser = LWP::UserAgent->new;
$browser->agent($0.' $Revision: 778 $');
$browser->cookie_jar( {} );

my @ns_headers = (
        'Accept' => 'text/html, text/plain, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*',
        'Accept-Charset' => 'iso-8859-1,*',
        'Accept-Language' => 'en-US',
);
my $login= "https://mywebsite.com/opensso/rest/1.0/opensso/identity/authenticate";
my $logout="https://mywebsite.com/opensso/rest/1.0/opensso/identity/logout";
my $response;

# Logon
$response = $browser->post(
        $login,
        [
                username => 'test@123',
                password => 'pssd123',
        ],
        @ns_headers);

do_die("login: ".$response->status_line) unless $response->is_success;

do_die("No token received ".$response->content) unless $response->content=~ /^token\.id=(\S+)$/;

# Logoff
my $token= $1;

$response = $browser->post(
        $logout,
        [
                subjectid => $token,
        ],
        @ns_headers);

do_die("logout: ".$response->status_line) unless $response->is_success;

my $date = localtime->strftime('%y%m%d');
my $time = localtime->strftime('%R');

my $milliseconds = tv_interval($time1);

open (MYFILE, '>>/var/SP/data/reporting/customersystems/result_KPI.txt');
print MYFILE "$date $time    GIS     sso_logon_logoff        0       $milliseconds\n";
close (MYFILE);
exit 0;

sub do_die {
        my($text)= @_;
        # $text=~ s/\n/\\n/g;
        print $text;
        open (MYFILE, '>>/var/SP/data/reporting/customersystems/result_KPI.txt');
        print MYFILE "$date $time    GIS     sso_logon_logoff        1       $milliseconds\n";
        close (MYFILE);
        exit 1;
}

0 个答案:

没有答案