diff --git a/otoroshi/javascript/src/components/JwtVerifier.js b/otoroshi/javascript/src/components/JwtVerifier.js index d8ba33c0f9..edd804feb2 100644 --- a/otoroshi/javascript/src/components/JwtVerifier.js +++ b/otoroshi/javascript/src/components/JwtVerifier.js @@ -200,7 +200,10 @@ export class AlgoSettings extends Component { { label: 'JWK Set (only for verification)', value: 'JWKSAlgoSettings' }, { label: 'RSASSA-PKCS1 + SHA from KeyPair', value: 'RSAKPAlgoSettings' }, { label: 'ECDSA + SHA from KeyPair', value: 'ESKPAlgoSettings' }, - { label: 'Otoroshi KeyPair from token kid (only for verification)', value: 'KidAlgoSettings' }, + { + label: 'Otoroshi KeyPair from token kid (only for verification)', + value: 'KidAlgoSettings', + }, ]} help="What kind of algorithm you want to use to verify/sign your JWT token with" /> @@ -533,7 +536,13 @@ export class JwtVerifier extends Component { />
{/* **************************************************************************************************** */} - + this.changeValue(name, v)} /> diff --git a/otoroshi/javascript/src/components/inputs/Table.js b/otoroshi/javascript/src/components/inputs/Table.js index 08e1611a9c..2acc9eed5a 100644 --- a/otoroshi/javascript/src/components/inputs/Table.js +++ b/otoroshi/javascript/src/components/inputs/Table.js @@ -303,54 +303,53 @@ export class Table extends Component { return

Something went wrong !!!

; } const windowWidth = window.innerWidth; - const columns = this.props.columns - .map((c) => { - return { - Header: c.title, - id: c.title, - headerStyle: c.style, - width: c.style && c.style.width ? c.style.width : undefined, - style: { ...c.style, height: 30 }, - sortable: !c.notSortable, - filterable: !c.notFilterable, - accessor: (d) => (c.content ? c.content(d) : d), - Filter: (d) => ( - d.onChange(e.target.value)} - placeholder="Search ..." - /> - ), - Cell: (r) => { - const value = r.value; - const original = r.original; - return c.cell ? ( - c.cell(value, original, this) - ) : ( -
{ - if (this.props.rowNavigation) { - if (e.metaKey) { - if (this.props.itemUrl) { - const a = document.createElement('a'); - a.setAttribute('target', '_blank'); - a.setAttribute('href', this.props.itemUrl(original)); - a.click(); - } - } else { - this.gotoItem(e, original); + const columns = this.props.columns.map((c) => { + return { + Header: c.title, + id: c.title, + headerStyle: c.style, + width: c.style && c.style.width ? c.style.width : undefined, + style: { ...c.style, height: 30 }, + sortable: !c.notSortable, + filterable: !c.notFilterable, + accessor: (d) => (c.content ? c.content(d) : d), + Filter: (d) => ( + d.onChange(e.target.value)} + placeholder="Search ..." + /> + ), + Cell: (r) => { + const value = r.value; + const original = r.original; + return c.cell ? ( + c.cell(value, original, this) + ) : ( +
{ + if (this.props.rowNavigation) { + if (e.metaKey) { + if (this.props.itemUrl) { + const a = document.createElement('a'); + a.setAttribute('target', '_blank'); + a.setAttribute('href', this.props.itemUrl(original)); + a.click(); } + } else { + this.gotoItem(e, original); } - }} - style={{ cursor: 'pointer', width: '100%' }}> - {c.wrappedCell ? c.wrappedCell(value, original, this) : value} -
- ); - }, - }; - }); + } + }} + style={{ cursor: 'pointer', width: '100%' }}> + {c.wrappedCell ? c.wrappedCell(value, original, this) : value} +
+ ); + }, + }; + }); if (this.props.showActions) { columns.push({ Header: 'Actions', diff --git a/otoroshi/javascript/src/pages/CertificatesPage.js b/otoroshi/javascript/src/pages/CertificatesPage.js index 2b57c1fe32..0bcd374856 100644 --- a/otoroshi/javascript/src/pages/CertificatesPage.js +++ b/otoroshi/javascript/src/pages/CertificatesPage.js @@ -15,18 +15,57 @@ import moment from 'moment'; import faker from 'faker'; const RevocationReason = { - VALID: { value: 'VALID', label: 'Valid - The certificate is not revoked' }, - UNSPECIFIED: { value: 'UNSPECIFIED', label: 'Unspecified - Can be used to revoke certificates for reasons other than the specific codes.' }, - KEY_COMPROMISE: { value: 'KEY_COMPROMISE', label: 'KeyCompromise - It is known or suspected that the subject\'s private key or other aspects have been compromised.' }, - CA_COMPROMISE: { value: 'CA_COMPROMISE', label: 'CACompromise - It is known or suspected that the subject\'s private key or other aspects have been compromised.' }, - AFFILIATION_CHANGED : { value: 'AFFILIATION_CHANGED', label: 'AffiliationChanged - The subject\'s name or other information in the certificate has been modified but there is no cause to suspect that the private key has been compromised.' }, - SUPERSEDED : { value: 'SUPERSEDED', label: 'Superseded - The certificate has been superseded but there is no cause to suspect that the private key has been compromised' }, - CESSATION_OF_OPERATION : { value: 'CESSATION_OF_OPERATION', label: 'CessationOfOperation - The certificate is no longer needed for the purpose for which it was issued but there is no cause to suspect that the private key has been compromised' }, - CERTIFICATE_HOLD : { value: 'CERTIFICATE_HOLD', label: 'CertificateHold - The certificate is temporarily revoked but there is no cause to suspect that the private kye has been compromised' }, - REMOVE_FROM_CRL : { value: 'REMOVE_FROM_CRL', label: 'RemoveFromCRL - The certificate has been unrevoked' }, - PRIVILEGE_WITH_DRAWN : { value: 'PRIVILEGE_WITH_DRAWN', label: 'PrivilegeWithdrawn - The certificate was revoked because a privilege contained within that certificate has been withdrawn' }, - AA_COMPROMISE : { value: 'AA_COMPROMISE', label: 'AACompromise - It is known or suspected that aspects of the AA validated in the attribute certificate, have been compromised' } -} + VALID: { value: 'VALID', label: 'Valid - The certificate is not revoked' }, + UNSPECIFIED: { + value: 'UNSPECIFIED', + label: + 'Unspecified - Can be used to revoke certificates for reasons other than the specific codes.', + }, + KEY_COMPROMISE: { + value: 'KEY_COMPROMISE', + label: + "KeyCompromise - It is known or suspected that the subject's private key or other aspects have been compromised.", + }, + CA_COMPROMISE: { + value: 'CA_COMPROMISE', + label: + "CACompromise - It is known or suspected that the subject's private key or other aspects have been compromised.", + }, + AFFILIATION_CHANGED: { + value: 'AFFILIATION_CHANGED', + label: + "AffiliationChanged - The subject's name or other information in the certificate has been modified but there is no cause to suspect that the private key has been compromised.", + }, + SUPERSEDED: { + value: 'SUPERSEDED', + label: + 'Superseded - The certificate has been superseded but there is no cause to suspect that the private key has been compromised', + }, + CESSATION_OF_OPERATION: { + value: 'CESSATION_OF_OPERATION', + label: + 'CessationOfOperation - The certificate is no longer needed for the purpose for which it was issued but there is no cause to suspect that the private key has been compromised', + }, + CERTIFICATE_HOLD: { + value: 'CERTIFICATE_HOLD', + label: + 'CertificateHold - The certificate is temporarily revoked but there is no cause to suspect that the private kye has been compromised', + }, + REMOVE_FROM_CRL: { + value: 'REMOVE_FROM_CRL', + label: 'RemoveFromCRL - The certificate has been unrevoked', + }, + PRIVILEGE_WITH_DRAWN: { + value: 'PRIVILEGE_WITH_DRAWN', + label: + 'PrivilegeWithdrawn - The certificate was revoked because a privilege contained within that certificate has been withdrawn', + }, + AA_COMPROMISE: { + value: 'AA_COMPROMISE', + label: + 'AACompromise - It is known or suspected that aspects of the AA validated in the attribute certificate, have been compromised', + }, +}; class CertificateInfos extends Component { state = { @@ -285,7 +324,12 @@ class CertificateValid extends Component { if (payload.error) { this.setState({ loading: false, valid: false, error: payload.error }); } else { - this.setState({ valid: payload.valid, loading: false, error: null, revoked: cert.revoked }); + this.setState({ + valid: payload.valid, + loading: false, + error: null, + revoked: cert.revoked, + }); } }) .catch((e) => { @@ -322,18 +366,24 @@ class CertificateValid extends Component {