Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eduGAIN Access Check - Account manager
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 Access Check - Account manager
Commits
43d54cd9
Commit
43d54cd9
authored
6 years ago
by
Guillaume ROUSSE
Browse files
Options
Downloads
Patches
Plain Diff
more consistency in log messages
parent
08dc4956
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/AccountManager/App.pm
+12
-30
12 additions, 30 deletions
lib/AccountManager/App.pm
with
12 additions
and
30 deletions
lib/AccountManager/App.pm
+
12
−
30
View file @
43d54cd9
...
...
@@ -303,7 +303,7 @@ sub req_select_email {
my
$entities
=
$metadata
->
parse
(
id
=>
$entityid
);
my
$entity
=
$entities
->
[
0
];
$self
->
abort
(
log
=>
sprintf
(
"
No such SP
'%s'
in metadata
",
$entityid
),
log
=>
"
No such SP
$entityid
in metadata
",
user
=>
"
no_such_entity
"
)
if
!
$entity
;
...
...
@@ -314,7 +314,7 @@ sub req_select_email {
# save in DB
$self
->
abort
(
log
=>
"
Failed to save service provider
object
",
log
=>
"
Failed to save service provider
",
user
=>
"
internal
"
)
if
!
$sp
->
save
();
}
...
...
@@ -378,11 +378,7 @@ sub req_complete_challenge {
## Check that email is a known contact for this SP
$self
->
abort
(
log
=>
sprintf
(
"
Requested a token for %s for an unautorized address '%s'
",
$entityid
,
$email
),
log
=>
"
Requested a token for SP
$entityid
with unautorized address
$email
",
user
=>
"
internal
",
)
if
!
$provider
->
is_contact
(
$email
);
...
...
@@ -395,7 +391,7 @@ sub req_complete_challenge {
if
(
$old_token
->
load
(
speculative
=>
1
))
{
$self
->
abort
(
log
=>
sprintf
(
"
Failed to delete
previous
authentication token
with ID %s
",
$old_token
->
id
())
,
log
=>
"
Failed to delete
old
authentication token
"
,
user
=>
"
internal
"
)
if
!
$old_token
->
delete
();
}
...
...
@@ -414,7 +410,7 @@ sub req_complete_challenge {
);
$self
->
abort
(
log
=>
"
Failed to save
service
authentication token
",
log
=>
"
Failed to save
creation
authentication token
",
user
=>
"
internal
"
)
if
!
$token
->
save
();
...
...
@@ -560,10 +556,7 @@ sub req_create_accounts {
}
$self
->
abort
(
log
=>
sprintf
(
"
Failed to create test accounts for SP with entityid %s
",
$entityid
),
log
=>
"
Failed to create test accounts for SP
$entityid
",
user
=>
"
accounts_creation_failure
"
)
if
!
@accounts
;
...
...
@@ -578,11 +571,8 @@ sub req_create_accounts {
);
};
$self
->
abort
(
log
=>
sprintf
(
"
Failed to create simpleSAMLphp configuration file: %s
",
$EVAL_ERROR
),
user
=>
"
accounts_creation_failed
"
log
=>
"
Failed to create simpleSAMLphp configuration file:
$EVAL_ERROR
",
user
=>
"
accounts_creation_failure
"
)
if
$EVAL_ERROR
;
$self
->
{
logger
}
->
infof
(
...
...
@@ -692,8 +682,8 @@ sub get_parameter {
if
(
$patterns
{
$name
})
{
$self
->
abort
(
log
=>
"
Incorrect parameter format:
entityid
",
user
=>
"
format_
entityid
"
log
=>
"
Incorrect parameter format:
$name
",
user
=>
"
format_
$name
"
)
if
$value
!~
$patterns
{
$name
};
}
...
...
@@ -726,20 +716,12 @@ sub check_token {
);
$self
->
abort
(
log
=>
sprintf
(
"
Failed to validate authentication token %s for entityid %s
",
$secret
,
$args
{
entityid
}
),
log
=>
"
No such authentication token
$secret
",
user
=>
"
wrong_token
"
)
if
!
$token
->
load
(
speculative
=>
1
);
$self
->
abort
(
log
=>
sprintf
(
"
Authentication token %s cannot be used for SP with entityid %s
",
$secret
,
$args
{
entityid
}
),
log
=>
"
Authentication token
$secret
cannot be used for SP
$args
{entityid}
",
user
=>
"
wrong_token_for_sp
"
)
if
$token
->
sp_entityid
()
ne
$args
{
entityid
};
...
...
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