Skip to content

Commit cf10f86

Browse files
committed
WIP for #685
1 parent 83edaad commit cf10f86

13 files changed

Lines changed: 278 additions & 198 deletions

File tree

dashboard-gui/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<parent>
33
<groupId>org.openconext</groupId>
44
<artifactId>dashboard</artifactId>
5-
<version>13.0.11</version>
5+
<version>13.0.12-SNAPSHOT</version>
66
<relativePath>../pom.xml</relativePath>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>

dashboard-gui/src/javascripts/locale/en.js

Lines changed: 84 additions & 68 deletions
Large diffs are not rendered by default.

dashboard-gui/src/javascripts/locale/nl.js

Lines changed: 96 additions & 75 deletions
Large diffs are not rendered by default.

dashboard-gui/src/javascripts/locale/pt.js

Lines changed: 53 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ I18n.translations.pt = {
3939
forms: {
4040
required: '{{name}} is a required field',
4141
invalidUrl: '{{url}} in an invalid URL',
42-
errors: 'There are invalid / missing inputs'
42+
errors: 'There are invalid / missing inputs',
4343
},
4444
confirmation_dialog: {
4545
title: 'Confirme por favor',
@@ -138,7 +138,7 @@ I18n.translations.pt = {
138138
tooltip:
139139
'Multi factor authentication by the IdP is required.<br>For more information see the <a href="https://support.surfconext.nl/mfa-nl" target="_blank" rel="noopener noreferrer">wiki</a>.',
140140
none: 'None',
141-
other: 'Other'
141+
other: 'Other',
142142
},
143143
attribute_manipulation: {
144144
name: 'Script de manipulação de atributos personalizado',
@@ -251,7 +251,7 @@ I18n.translations.pt = {
251251
consent: 'Consent',
252252
authorization_policy: 'Authorization policy',
253253
surf_secure_id: 'SURFsecureID',
254-
mfa: 'MFA'
254+
mfa: 'MFA',
255255
},
256256
},
257257
},
@@ -372,14 +372,15 @@ I18n.translations.pt = {
372372
subtitle: '{{name}} quer receber os seguintes atributos',
373373
title: 'Atributos',
374374
your_value: 'O seu valor',
375-
your_values_tooltip: 'The values for these attributes as they are for your own account. This might not be representative for other accounts in your organization. Only values are shown for attributes that originate at your IdP.',
375+
your_values_tooltip:
376+
'The values for these attributes as they are for your own account. This might not be representative for other accounts in your organization. Only values are shown for attributes that originate at your IdP.',
376377
filter: 'Para este atributo foram aplicados os seguintes filtros:',
377378
filterTooltip: 'For this attribute a filter have been applied that potentially limits the available values',
378379
motivation: 'Purpose',
379380
motivationTooltip:
380381
'The column ‘purpose‘ contains, to the extent available, the explanation of the supplier why they need this attribute.',
381382
source: 'Source',
382-
persistentMotivation: "Primary identifier of the user",
383+
persistentMotivation: 'Primary identifier of the user',
383384
sources: {
384385
idp: 'Your IdP',
385386
surf: 'SURFconext',
@@ -388,11 +389,12 @@ I18n.translations.pt = {
388389
eduid: 'eduID',
389390
sab: 'SURF Autorisation Management',
390391
ala: 'Your IdP',
391-
pseudo_email:'Your IdP',
392+
pseudo_email: 'Your IdP',
392393
manage: 'SURFconext',
393-
sabrest: 'SAB'
394+
sabrest: 'SAB',
394395
},
395-
sourceTooltip: "Which authority supplies the values for this attribute. Your IdP only needs to provide the items marked with 'Your IdP'.",
396+
sourceTooltip:
397+
"Which authority supplies the values for this attribute. Your IdP only needs to provide the items marked with 'Your IdP'.",
396398
no_attribute_value: '<não foi recebido nenhum valor>',
397399
attribute_value_generated: '<é gerado pelo SURFconext>',
398400
filterInfo:
@@ -401,36 +403,37 @@ I18n.translations.pt = {
401403
nameIdInfo:
402404
"The user’s identity is transmitted as a NameID element with the type '%{type}' - <a href='https://support.surfconext.nl/uids' target='_blank'>generated by SURFconext</a>",
403405
attributes: {
404-
"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified": "Unique identifier",
405-
"urn:mace:dir:attribute-def:eduPersonTargetedID": "Persitente identifier",
406-
"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent": "Persistente identifier",
407-
"urn:mace:dir:attribute-def:eduPersonPrincipalName": "Unieke identifier",
408-
"urn:mace:dir:attribute-def:displayName": "Display name",
409-
"urn:mace:dir:attribute-def:cn": "Common name",
410-
"urn:mace:dir:attribute-def:givenName": "Given name",
411-
"urn:mace:dir:attribute-def:sn": "Surname",
412-
"urn:mace:dir:attribute-def:mail": "Email",
413-
"urn:mace:dir:attribute-def:ou": "Organizational unit",
414-
"urn:mace:terena.org:attribute-def:schacHomeOrganization": "Your IdP abbrevation",
415-
"urn:mace:terena.org:attribute-def:schacHomeOrganizationType": "Type of IdP",
416-
"urn:schac:attribute-def:schacPersonalUniqueCode": "Unique code",
417-
"urn:mace:dir:attribute-def:eduPersonAffiliation": "Affiliations",
418-
"urn:mace:dir:attribute-def:eduPersonScopedAffiliation": "Scoped affiliations",
419-
"urn:mace:dir:attribute-def:eduPersonEntitlement": "Entitlements",
420-
"urn:mace:dir:attribute-def:eduPersonOrcid": "ORCID iD",
421-
"urn:mace:dir:attribute-def:eduPersonAssurance": "Assurances",
422-
"urn:mace:surf.nl:attribute-def:eckid": "ECK iD",
423-
"urn:mace:eduid.nl:1.1": "eduID identifier",
424-
"urn:mace:surf.nl:attribute-def:surf-crm-id": "SURF CRM organization identifier",
425-
"urn:mace:dir:attribute-def:isMemberOf": "Memberships",
426-
"urn:mace:dir:attribute-def:uid": "Login name",
427-
"urn:mace:dir:attribute-def:preferredLanguage": "Preferred language",
428-
"urn:mace:surffederatie.nl:attribute-def:nlEduPersonOrgUnit": "eduPerson organisation"
429-
}
406+
'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified': 'Unique identifier',
407+
'urn:mace:dir:attribute-def:eduPersonTargetedID': 'Persitente identifier',
408+
'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent': 'Persistente identifier',
409+
'urn:mace:dir:attribute-def:eduPersonPrincipalName': 'Unieke identifier',
410+
'urn:mace:dir:attribute-def:displayName': 'Display name',
411+
'urn:mace:dir:attribute-def:cn': 'Common name',
412+
'urn:mace:dir:attribute-def:givenName': 'Given name',
413+
'urn:mace:dir:attribute-def:sn': 'Surname',
414+
'urn:mace:dir:attribute-def:mail': 'Email',
415+
'urn:mace:dir:attribute-def:ou': 'Organizational unit',
416+
'urn:mace:terena.org:attribute-def:schacHomeOrganization': 'Your IdP abbrevation',
417+
'urn:mace:terena.org:attribute-def:schacHomeOrganizationType': 'Type of IdP',
418+
'urn:schac:attribute-def:schacPersonalUniqueCode': 'Unique code',
419+
'urn:mace:dir:attribute-def:eduPersonAffiliation': 'Affiliations',
420+
'urn:mace:dir:attribute-def:eduPersonScopedAffiliation': 'Scoped affiliations',
421+
'urn:mace:dir:attribute-def:eduPersonEntitlement': 'Entitlements',
422+
'urn:mace:dir:attribute-def:eduPersonOrcid': 'ORCID iD',
423+
'urn:mace:dir:attribute-def:eduPersonAssurance': 'Assurances',
424+
'urn:mace:surf.nl:attribute-def:eckid': 'ECK iD',
425+
'urn:mace:eduid.nl:1.1': 'eduID identifier',
426+
'urn:mace:surf.nl:attribute-def:surf-crm-id': 'SURF CRM organization identifier',
427+
'urn:mace:dir:attribute-def:isMemberOf': 'Memberships',
428+
'urn:mace:dir:attribute-def:uid': 'Login name',
429+
'urn:mace:dir:attribute-def:preferredLanguage': 'Preferred language',
430+
'urn:mace:surffederatie.nl:attribute-def:nlEduPersonOrgUnit': 'eduPerson organisation',
431+
},
430432
},
431433
connected_resource_servers_panel: {
432434
title: 'Connected Resource Servers',
433-
subtitle: "{{name}} is an OIDC Relying Party and is allowed to query the API's of the following Resource Servers",
435+
subtitle:
436+
"{{name}} is an OIDC Relying Party and is allowed to query the API's of the following Resource Servers",
434437
clientId: 'Client ID',
435438
name: 'Name',
436439
description: 'Description',
@@ -477,9 +480,9 @@ I18n.translations.pt = {
477480
dpa_not_applicable: 'The service is not a processor according to GDPR',
478481
dpa_in_surf_agreement: 'Agreements are dealt with through SURF',
479482
dpa_model_surf: 'We are open to signing the SURF model contract/we have signed the SURF model contract',
480-
dpa_supplied_by_service: 'We have arranged the company\'s data processing agreement',
483+
dpa_supplied_by_service: "We have arranged the company's data processing agreement",
481484
other: 'Other',
482-
}
485+
},
483486
},
484487
consent_panel: {
485488
title: 'Consentimento de novos utilizadores',
@@ -582,7 +585,8 @@ I18n.translations.pt = {
582585
jira_unreachable: 'Algo falhou com o seu pedido',
583586
jira_unreachable_description: 'Não é possivel realizar um pedido neste momento. Tente novamente mais tarde.',
584587
jira_down: 'Manutenção',
585-
jira_down_description: 'Devido a manutenção, não é possível fazer pedidos de emparelhamento até segunda-feira de manhã, 27 de junho. Se você deseja vincular um serviço, envie uma mensagem para support@surfconext.nl',
588+
jira_down_description:
589+
'Devido a manutenção, não é possível fazer pedidos de emparelhamento até segunda-feira de manhã, 27 de junho. Se você deseja vincular um serviço, envie uma mensagem para support@surfconext.nl',
586590
license: 'licença',
587591
license_info: 'informação de licença',
588592
obtain_license: {
@@ -917,8 +921,7 @@ I18n.translations.pt = {
917921
description: 'Descrição',
918922
idps_placeholder: 'Selecione os Fornecedores de Identidade - zero ou mais',
919923
institutions: 'Instituições',
920-
intro:
921-
'Define who can access this service. Need help? <a href="https://support.surfconext.nl/dashboard-help-pdp" target="_blank" rel="noopener noreferrer">Read our manual.</a>',
924+
intro: 'Define who can access this service. Need help? <a href="https://support.surfconext.nl/dashboard-help-pdp" target="_blank" rel="noopener noreferrer">Read our manual.</a>',
922925
isActive: 'Ativo',
923926
isActiveDescription: 'Marcar a política de permisão como ativa',
924927
isActiveInfo: ' Políticas de autorização inativas não são avaliadas nas decisões',
@@ -1002,7 +1005,7 @@ I18n.translations.pt = {
10021005
spEntityId: 'Serviço',
10031006
statuses: {
10041007
all: 'All tickets',
1005-
'Open': 'Abrir',
1008+
Open: 'Abrir',
10061009
'In Progress': 'Em progresso',
10071010
'On Hold': 'Em espera',
10081011
'Waiting for customer': 'Input pendente',
@@ -1069,8 +1072,9 @@ I18n.translations.pt = {
10691072
minute: 'Minutos',
10701073
all: 'Período completo: de -> até',
10711074
},
1072-
helpLink:
1073-
'https://support.surfconext.nl/dashboard-help-nl#Beschikbaredienstenactiveren-Statistieken',
1075+
helpLink: 'https://support.surfconext.nl/dashboard-help-nl#Beschikbaredienstenactiveren-Statistieken',
1076+
stats_down_description:
1077+
'The statistics backend is currently not available. We are working hard to fix the problem. Please contact <a href="mailto:support@surfconext.nl">support@surfconext.nl</a> to request statistics.',
10741078
},
10751079
chart: {
10761080
title: 'Logins e utilizadores por dia',
@@ -1271,7 +1275,7 @@ I18n.translations.pt = {
12711275
title: 'SURF Secure ID Step up',
12721276
info: 'In order to perform this action it is required to add a second factor to your authentication. When you proceed you will redirected to add this second factor and then you will return here again.',
12731277
cancel: 'Cancel',
1274-
go: 'Proceed'
1278+
go: 'Proceed',
12751279
},
12761280
mfa_panel: {
12771281
title: 'MFA',
@@ -1280,7 +1284,7 @@ I18n.translations.pt = {
12801284
subtitle2:
12811285
'You can either choose <span>Generic multi-factor (REFEDS MFA)</span> which is industry standardized or you can choose <span>Multi-factor on ADFS or Azure AD</span> which is specific for Microsoft products.',
12821286
subtitle3:
1283-
'By choosing a MFA value you can add additional protection to your service by adding a second factor to the user\'s login at your own IdP. If your IdP does not support a second factor, but you would like to add it to this service then consider using SURFSecureID.',
1287+
"By choosing a MFA value you can add additional protection to your service by adding a second factor to the user's login at your own IdP. If your IdP does not support a second factor, but you would like to add it to this service then consider using SURFSecureID.",
12841288
authn_context_level: 'MFA Setting',
12851289
defaultAuthnContextLevel: 'Do not force MFA at my IdP for this service',
12861290
multipleauthn: 'Multi-factor on ADFS or Azure AD',
@@ -1289,12 +1293,13 @@ I18n.translations.pt = {
12891293
validate_names_external: 'eduID validated name by an external (non institutional) source',
12901294
affiliation_student: 'eduID require student affiliation',
12911295
mfa: 'Generic multi-factor (REFEDS MFA)',
1292-
transparent_authn_context: "Transparent Authn context",
1293-
mobileonefactorcontract: "Mobile one factor",
1296+
transparent_authn_context: 'Transparent Authn context',
1297+
mobileonefactorcontract: 'Mobile one factor',
12941298
multipleauthn_short: 'MFA Microsoft',
12951299
mfa_short: 'MFA Generic',
12961300
mobileonefactorunregistered: 'Mobile one unregistered',
12971301
password: 'Wachtwoord',
1298-
not_allowed: "You can not change the MFA for this service. Please contact <a href=\"mailto:support@surfconext.nl\">support@surfconext.nl</a> if you want to change the MFA for this service."
1302+
not_allowed:
1303+
'You can not change the MFA for this service. Please contact <a href="mailto:support@surfconext.nl">support@surfconext.nl</a> if you want to change the MFA for this service.',
12991304
},
13001305
}

dashboard-gui/src/javascripts/models/current_user.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class CurrentUser {
2121
this.manageConsentEnabled = rawUser.manageConsentEnabled
2222
this.oidcEnabled = rawUser.oidcEnabled
2323
this.jiraDown = rawUser.jiraDown
24+
this.statisticsDown = rawUser.statisticsDown
2425
this.hideTabs = rawUser.hideTabs
2526
this.supportedLanguages = rawUser.supportedLanguages
2627
this.organization = rawUser.organization

dashboard-gui/src/javascripts/pages/stats.jsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,30 @@ class Stats extends React.Component {
407407
}
408408
}
409409

410+
renderStatsDown = () => {
411+
return (
412+
<div className="container">
413+
<div className="l-main stats">
414+
<div className="stats-down-banner">
415+
<p dangerouslySetInnerHTML={{ __html: I18n.t('stats.stats_down_description') }} />
416+
</div>
417+
</div>
418+
</div>
419+
)
420+
}
421+
410422
render() {
411423
const { from, to, scale, allSp, data, displayDetailPerSP, loaded, sp, maximumTo, serviceProvidersDict } = this.state
424+
const currentUser = this.context.currentUser
425+
const statisticsDown = currentUser.statisticsDown
426+
if (statisticsDown) {
427+
return this.renderStatsDown()
428+
}
429+
const idp = currentUser.getCurrentIdp()
412430
const fullView = this.props.view === 'full'
413431
const spSelected = sp !== this.allServiceProviderOption.value
414432
const noResult = (data.length === 1 && data[0] === 'no_results') || (loaded && data.length === 0)
415433
const results = loaded && data.length > 0 && !noResult
416-
const idp = this.context.currentUser.getCurrentIdp()
417434
const identityProvidersDict = {}
418435
identityProvidersDict[idp.id] =
419436
I18n.locale === 'en'

dashboard-gui/src/stylesheets/modules/stats.sass

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
div.stats
2+
.stats-down-banner
3+
padding: 15px
4+
background-color: ivory
25
div.header
36
display: flex
47
i.fa

dashboard-server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<parent>
2020
<groupId>org.openconext</groupId>
2121
<artifactId>dashboard</artifactId>
22-
<version>13.0.11</version>
22+
<version>13.0.12-SNAPSHOT</version>
2323
<relativePath>../pom.xml</relativePath>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>

dashboard-server/src/main/java/dashboard/ShibbolethSecurityConfig.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ public class ShibbolethSecurityConfig extends WebSecurityConfigurerAdapter {
8181
@Value("${dashboard.feature.jiraDown}")
8282
private boolean jiraDown;
8383

84+
@Value("${dashboard.feature.statisticsDown}")
85+
private boolean statisticsDown;
86+
8487
@Value("${dashboard.hide_tabs}")
8588
private String hideTabs;
8689

@@ -139,7 +142,7 @@ protected void configure(HttpSecurity http) throws Exception {
139142
new ShibbolethPreAuthenticatedProcessingFilter(authenticationManagerBean(), manage, sab, jiraClient,
140143
dashboardAdmin, dashboardViewer, dashboardSuperUser, adminSufConextIdpRole,
141144
viewerSurfConextIdpRole, isManageConsentEnabled, isOidcEnabled, dashboardStepupEnabled, jiraDown, hideTabs, supportedLanguages, organization,
142-
defaultLoa, loaLevels, authnContextLevels),
145+
defaultLoa, loaLevels, authnContextLevels, statisticsDown),
143146
AbstractPreAuthenticatedProcessingFilter.class
144147
)
145148
.addFilterAfter(new EnsureAccessToIdpFilter(manage), ShibbolethPreAuthenticatedProcessingFilter.class)

dashboard-server/src/main/java/dashboard/domain/CoinUser.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public class CoinUser implements UserDetails {
6060
private List<String> loaLevels;
6161
private List<String> authnContextLevels;
6262
private Set<String> invitationRequestEntities = new HashSet<>();
63+
private boolean statisticsDown;
6364

6465
@Override
6566
@JsonIgnore
@@ -391,4 +392,12 @@ public boolean isJiraDown() {
391392
public void setJiraDown(boolean jiraDown) {
392393
this.jiraDown = jiraDown;
393394
}
395+
396+
public void setStatisticsDown(boolean statisticsDown) {
397+
this.statisticsDown = statisticsDown;
398+
}
399+
400+
public boolean isStatisticsDown() {
401+
return statisticsDown;
402+
}
394403
}

0 commit comments

Comments
 (0)