Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eduGAIN Connectivity Check
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
edugain
eduGAIN Connectivity Check
Commits
fce2f3f3
Commit
fce2f3f3
authored
3 years ago
by
Marco Malavolti
Browse files
Options
Downloads
Patches
Plain Diff
Fixed issue
#11
parent
1d75ed06
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
eccs_properties.py.template
+4
-2
4 additions, 2 deletions
eccs_properties.py.template
utils.py
+3
-5
3 additions, 5 deletions
utils.py
with
7 additions
and
7 deletions
eccs_properties.py.template
+
4
−
2
View file @
fce2f3f3
...
@@ -51,8 +51,10 @@ ROBOTS_USER_AGENT = "ECCS/2.0 (+https://technical.edugain.org/eccs)"
...
@@ -51,8 +51,10 @@ ROBOTS_USER_AGENT = "ECCS/2.0 (+https://technical.edugain.org/eccs)"
JAVASCRIPT = '"x-my-okta-version"'
JAVASCRIPT = '"x-my-okta-version"'
IDPERROR = "error\s(has\s)?occur(r)?ed|Error\swhen\sprocessing\s(the\s)?authentication\srequest|The\s(server|system)\sencountered\san\s(internal\s)?error|Internal\sServer\sError|403\sForbidden|Service\sUnavailable|InvalidProfileConfiguration|Unexpected\sSystem\sError|404\s(.\s)?not\sfound|OpenAthens:\s404|On\stapahtunut\svirhe|Unhandled\sexception|Bad\sGateway|Page\sNot\sFound|Δεν\sεπιτρέπεται\sη\sπρόσβαση|tempora(ry|rily)\s(unavailable|error)+|License\serror|n'est\spas\sgérée|Invalid\sRequest|Erreur\s!|Please\sreport\sthis\serror\sto|该网站无法访问|proxy\serror|There\sis\sa\sproblem\swith\syour\saccount"
IDPERROR = "error\s(has\s)?occur(r)?ed|Error\swhen\sprocessing\s(the\s)?authentication\srequest|The\s(server|system)\sencountered\san\s(internal\s)?error|Internal\sServer\sError|403\sForbidden|Service\sUnavailable|InvalidProfileConfiguration|Unexpected\sSystem\sError|404\s(.\s)?not\sfound|OpenAthens:\s404|On\stapahtunut\svirhe|Unhandled\sexception|Bad\sGateway|Page\sNot\sFound|Δεν\sεπιτρέπεται\sη\sπρόσβαση|tempora(ry|rily)\s(unavailable|error)+|License\serror|n'est\spas\sgérée|Invalid\sRequest|Erreur\s!|Please\sreport\sthis\serror\sto|该网站无法访问|proxy\serror|There\sis\sa\sproblem\swith\syour\saccount"
METADATAPATTERN = "Unable\sto\slocate(\sissuer\sin|)\smetadata(\sfor|)|no\smetadata\sfound|profile\sis\snot\sconfigured\sfor\srelying\sparty|Cannot\slocate\sentity|fail\sto\sload\sunknown\sprovider|does\snot\srecognise\sthe\sservice|unable\sto\sload\sprovider|Nous\sn'avons\spas\spu\s(charg|charger)\sle\sfournisseur\sde\sservice|Metadata\snot\sfound|application\s(you\shave\saccessed\s)?is\snot\sregistered\s(for\suse\sthis\sservice)?|Message\sdid\snot\smeet\ssecurity\srequirements|unsupported\s[Rr]equest|METADATANOTFOUND|Unknown\slogin\srequester|is\sunspecified\sor\sunsupported|Unknown\sservice\sprovider|Richiesta\snon\ssupportata|Metadati\snon\strovati|untrusted\sprovider|Unregistered\sService|UNHANDLEDEXCEPTION|Metadata.*.expired|Could\snot\sfind\sany.*.metadata.*.for|不支持的请求|l'application\sn'est\spas\senregistrée|Requisição\snão\ssuportada|トされていないリクエスト|is\snot\sallowed|Authorization\sFailure|Pedido\snão\ssuportado|Nicht\sunterstützte\sAnfrage|Service\sNot\sAuthorized\sfor\sSingle\sSign-On|Your\sbrowser\ssent\sa\srequest\sthat\sthis\sserver\scould\snot\sunderstand|Application\sNot\sAuthorized\sTo\sUse\sCAS"
METADATAPATTERN = "Unable\sto\slocate(\sissuer\sin|)\smetadata(\sfor|)|no\smetadata\sfound|profile\sis\snot\sconfigured\sfor\srelying\sparty|Cannot\slocate\sentity|fail\sto\sload\sunknown\sprovider|does\snot\srecognise\sthe\sservice|unable\sto\sload\sprovider|Nous\sn'avons\spas\spu\s(charg|charger)\sle\sfournisseur\sde\sservice|Metadata\snot\sfound|application\s(you\shave\saccessed\s)?is\snot\sregistered\s(for\suse\sthis\sservice)?|Message\sdid\snot\smeet\ssecurity\srequirements|unsupported\s[Rr]equest|METADATANOTFOUND|Unknown\slogin\srequester|is\sunspecified\sor\sunsupported|Unknown\sservice\sprovider|Richiesta\snon\ssupportata|Metadati\snon\strovati|untrusted\sprovider|Unregistered\sService|UNHANDLEDEXCEPTION|Metadata.*.expired|Could\snot\sfind\sany.*.metadata.*.for|不支持的请求|l'application\sn'est\spas\senregistrée|Requisição\snão\ssuportada|トされていないリクエスト|is\snot\sallowed|Authorization\sFailure|Pedido\snão\ssuportado|Nicht\sunterstützte\sAnfrage|Service\sNot\sAuthorized\sfor\sSingle\sSign-On|Your\sbrowser\ssent\sa\srequest\sthat\sthis\sserver\scould\snot\sunderstand|Application\sNot\sAuthorized\sTo\sUse\sCAS"
PASSWORDPATTERN = '<input[\s]+[^>]*(type=\s*[\'"]password[\'"]|password)[^>]*>'
XPATH_CHECK_PATTERN = '//input[@type="password"]|//input[@type="Password"]|//input[@type="text"]|//input[@type="email"]|//input[@type="user"]|//input[@name="name"]|//form[@action="/idp/module.php/multiauth/selectsource.php"]'
USERNAMEPATTERN = '<input[\s]+[^>]*((type=\s*[\'"](text|email)[\'"]|user)|(name=\s*[\'"](name)[\'"]))[^>]*>'
#PASSWORDPATTERN = '<input[\s]+[^>]*(type=\s*[\'"]password[\'"]|password)[^>]*>'
#USERNAMEPATTERN = '<input[\s]+[^>]*((type=\s*[\'"](text|email)[\'"]|user)|(name=\s*[\'"](name)[\'"]))[^>]*>'
#REFUSEDPATTERN = '(^http)(.*\.png$)|(.*\.css$)|(.*\.js$)|(.*\.gif$)|(.*\.svg$)|(.*\.jpg$)'
# { 'reg_auth':'reason' }
# { 'reg_auth':'reason' }
FEDS_DISABLED_DICT = {
FEDS_DISABLED_DICT = {
...
...
This diff is collapsed.
Click to expand it.
utils.py
+
3
−
5
View file @
fce2f3f3
...
@@ -307,9 +307,8 @@ def check_idp_response_selenium(sp,idp,test):
...
@@ -307,9 +307,8 @@ def check_idp_response_selenium(sp,idp,test):
if
(
load_js
):
if
(
load_js
):
driver
.
refresh
()
driver
.
refresh
()
input_xpath
=
'
//input[@type=
"
password
"
]|//input[@type=
"
Password
"
]|//input[@type=
"
text
"
]|//input[@type=
"
email
"
]|//input[@type=
"
user
"
]|//input[@name=
"
name
"
]
'
WebDriverWait
(
driver
,
e_p
.
ECCS_SELENIUMPAGELOADTIMEOUT
).
until
(
WebDriverWait
(
driver
,
e_p
.
ECCS_SELENIUMPAGELOADTIMEOUT
).
until
(
EC
.
presence_of_element_located
((
By
.
XPATH
,
input_xpath
))
EC
.
presence_of_element_located
((
By
.
XPATH
,
e_p
.
XPATH_CHECK_PATTERN
))
)
)
if
(
test
):
pgsrc
=
f
"
\n
[WAYFLESS_URL]
\n
{
wayfless_url
}
- OK
"
if
(
test
):
pgsrc
=
f
"
\n
[WAYFLESS_URL]
\n
{
wayfless_url
}
- OK
"
...
@@ -323,8 +322,7 @@ def check_idp_response_selenium(sp,idp,test):
...
@@ -323,8 +322,7 @@ def check_idp_response_selenium(sp,idp,test):
metadata_not_found
=
re
.
search
(
e_p
.
METADATAPATTERN
,
driver
.
page_source
,
re
.
IGNORECASE
)
metadata_not_found
=
re
.
search
(
e_p
.
METADATAPATTERN
,
driver
.
page_source
,
re
.
IGNORECASE
)
try
:
try
:
input_xpath
=
'
//input[@type=
"
password
"
]|//input[@type=
"
Password
"
]|//input[@type=
"
text
"
]|//input[@type=
"
email
"
]|//input[@type=
"
user
"
]|//input[@name=
"
name
"
]
'
input_xpath_found
=
driver
.
find_element
(
By
.
XPATH
,
e_p
.
XPATH_CHECK_PATTERN
)
input_password_found
=
driver
.
find_element
(
By
.
XPATH
,
input_xpath
)
except
NoSuchElementException
as
e
:
except
NoSuchElementException
as
e
:
# This IF is for those IdP that doesn't consuming the eduGAIN metadata and reaching Timeout
# This IF is for those IdP that doesn't consuming the eduGAIN metadata and reaching Timeout
...
@@ -374,7 +372,7 @@ def check_idp_response_selenium(sp,idp,test):
...
@@ -374,7 +372,7 @@ def check_idp_response_selenium(sp,idp,test):
if
(
stored
):
if
(
stored
):
return
(
idp
[
'
entityID
'
],
wayfless_url
,
check_time
,
"
Timeout
"
,
webdriver_error
)
return
(
idp
[
'
entityID
'
],
wayfless_url
,
check_time
,
"
Timeout
"
,
webdriver_error
)
#
<
input
type="password">
found
# input
_xpath has been
found
# This IF is for those IdPs that Timeout is caused by an image or other that do not prevent the Login process.
# This IF is for those IdPs that Timeout is caused by an image or other that do not prevent the Login process.
if
(
test
):
pgsrc
=
f
"
\n
[PAGE_SOURCE]
\n
{
driver
.
page_source
}
- Timeout but OK
"
if
(
test
):
pgsrc
=
f
"
\n
[PAGE_SOURCE]
\n
{
driver
.
page_source
}
- Timeout but OK
"
else
:
pgsrc
=
driver
.
page_source
else
:
pgsrc
=
driver
.
page_source
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment