Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

417 add support to send invoices by webservices to portuguese at #435

Merged

Conversation

froque
Copy link
Member

@froque froque commented May 24, 2023

fixes #417

When to invoke this service and dealing with retries is left to the client application and not managed by billy.

No custom exceptions are being thrown. All checked exceptions are being wrapped in RuntimeException.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expires: 04/09/2023

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❯ keytool -list -v -storepass saKeyPubPass -keystore billy-portugal/src/main/resources/saPubKey.jks 
Keystore type: JKS
Keystore provider: SUN

Your keystore contains 2 entries

Alias name: sapubkey.prod
Creation date: 06/07/2020
Entry type: trustedCertEntry

Owner: CN=Chave Cifra Publica AT, OU=Sistemas de Informacao, O=Autoridade Tributaria e Aduaneira, L=Lisboa, ST=Lisboa, C=PT
Issuer: CN=DGITA Issuing CA2, DC=ritta, DC=local
Serial number: 2f00001c56506e04bf31e7e8bf000100001c56
Valid from: Tue Jun 23 18:50:12 WEST 2020 until: Fri Jun 23 18:50:12 WEST 2023
Certificate fingerprints:
	 SHA1: AE:88:CA:F0:68:56:6F:15:EC:6A:85:84:17:D9:9D:56:7B:DE:8A:77
	 SHA256: DE:FD:74:C1:64:F1:ED:71:76:E7:EE:1E:F9:14:58:5D:7E:71:51:69:10:30:05:41:5E:B9:4C:7E:EB:29:F4:C3
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3

Extensions: 

#1: ObjectId: 1.2.840.113549.1.9.15 Criticality=false
0000: 30 35 30 0E 06 08 2A 86   48 86 F7 0D 03 02 02 02  050...*.H.......
0010: 00 80 30 0E 06 08 2A 86   48 86 F7 0D 03 04 02 02  ..0...*.H.......
0020: 00 80 30 07 06 05 2B 0E   03 02 07 30 0A 06 08 2A  ..0...+....0...*
0030: 86 48 86 F7 0D 03 07                               .H.....


#2: ObjectId: 1.3.6.1.4.1.311.21.10 Criticality=false
0000: 30 0E 30 0C 06 0A 2B 06   01 04 01 82 37 0A 03 04  0.0...+.....7...


#3: ObjectId: 1.3.6.1.4.1.311.21.7 Criticality=false
0000: 30 2E 06 26 2B 06 01 04   01 82 37 15 08 82 8D 9D  0..&+.....7.....
0010: 39 82 8E EC 2A 84 FD 93   13 82 F6 D5 6E 82 99 BF  9...*.......n...
0020: 73 52 83 99 91 25 82 A5   AD 7A 02 01 64 02 01 1A  sR...%...z..d...


#4: ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false
AuthorityInfoAccess [
  [
   accessMethod: caIssuers
   accessLocation: URIName: ldap:///CN=DGITA%20Issuing%20CA2,CN=AIA,CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=ritta,DC=local?cACertificate?base?objectClass=certificationAuthority
]
]

#5: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: C4 4B 73 8D D5 60 96 7B   BE A2 7B 7D 25 F0 B7 E2  .Ks..`......%...
0010: 35 6F FC 1E                                        5o..
]
]

#6: ObjectId: 2.5.29.31 Criticality=false
CRLDistributionPoints [
  [DistributionPoint:
     [URIName: ldap:///CN=DGITA%20Issuing%20CA2,CN=SW500210,CN=CDP,CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=ritta,DC=local?certificateRevocationList?base?objectClass=cRLDistributionPoint]
]]

#7: ObjectId: 2.5.29.37 Criticality=false
ExtendedKeyUsages [
  1.3.6.1.4.1.311.10.3.4
]

#8: ObjectId: 2.5.29.15 Criticality=false
KeyUsage [
  Key_Encipherment
  Data_Encipherment
]

#9: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: ED B3 BA 8C AE E7 F0 C0   FE 61 D0 73 28 3A 1F 38  .........a.s(:.8
0010: F3 4D FC 3F                                        .M.?
]
]



*******************************************
*******************************************


Alias name: sapubkey.testes
Creation date: 14/02/2020
Entry type: trustedCertEntry

Owner: CN=Teste SA Acesso, OU=NAGC, O=Autoridade Tributaria e Aduaneira, L=Lisboa, ST=Lisboa, C=PT
Issuer: CN=DGITA Issuing CA1, DC=ritta, DC=local
Serial number: 120000212d7c5a904a244efabb00030000212d
Valid from: Wed Sep 25 15:25:51 WEST 2019 until: Thu Sep 24 15:25:51 WEST 2020
Certificate fingerprints:
	 SHA1: 3A:D2:04:24:0B:B7:18:07:D7:01:E1:1A:2D:BF:BA:6D:B9:D8:3D:9B
	 SHA256: 81:02:EB:A5:0A:10:19:C5:6D:E1:47:6F:90:43:89:49:B4:A3:65:87:77:8F:C5:3C:1F:78:06:F5:67:26:04:F2
Signature algorithm name: SHA256withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3

Extensions: 

#1: ObjectId: 1.3.6.1.4.1.311.21.10 Criticality=false
0000: 30 18 30 0A 06 08 2B 06   01 05 05 07 03 01 30 0A  0.0...+.......0.
0010: 06 08 2B 06 01 05 05 07   03 02                    ..+.......


#2: ObjectId: 1.3.6.1.4.1.311.21.7 Criticality=false
0000: 30 2E 06 26 2B 06 01 04   01 82 37 15 08 82 8D 9D  0..&+.....7.....
0010: 39 82 8E EC 2A 84 FD 93   13 82 F6 D5 6E 82 99 BF  9...*.......n...
0020: 73 52 86 E9 D1 3B 81 A2   BA 0D 02 01 64 02 01 72  sR...;......d..r


#3: ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false
AuthorityInfoAccess [
  [
   accessMethod: caIssuers
   accessLocation: URIName: ldap:///CN=DGITA%20Issuing%20CA1,CN=AIA,CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=ritta,DC=local?cACertificate?base?objectClass=certificationAuthority
]
]

#4: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 31 93 9D CE 6A E2 D1 EE   C1 A7 9D F4 AD A9 74 8C  1...j.........t.
0010: 40 FC FC C2                                        @...
]
]

#5: ObjectId: 2.5.29.31 Criticality=false
CRLDistributionPoints [
  [DistributionPoint:
     [URIName: ldap:///CN=DGITA%20Issuing%20CA1(1),CN=SW500212,CN=CDP,CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=ritta,DC=local?certificateRevocationList?base?objectClass=cRLDistributionPoint]
]]

#6: ObjectId: 2.5.29.37 Criticality=false
ExtendedKeyUsages [
  serverAuth
  clientAuth
]

#7: ObjectId: 2.5.29.15 Criticality=false
KeyUsage [
  DigitalSignature
  Key_Encipherment
]

#8: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 91 C5 41 53 8B 83 AC D8   85 96 93 DC BB F8 1D 1D  ..AS............
0010: E9 92 08 92                                        ....
]
]



*******************************************
*******************************************

@froque froque marked this pull request as ready for review June 19, 2023 10:34
@froque froque force-pushed the 417-add-support-to-send-invoices-by-webservices-to-portuguese-at branch from 607f918 to 01783b0 Compare June 19, 2023 11:12
@froque froque requested a review from thenmaster June 19, 2023 11:13
Supports registerInvoice and deleteInvoice
All other operations are not yet supported.

Added exclusions to bypass errors:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.5.0:jar (attach-javadocs) on project billy-portugal: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1
[ERROR] error: module org.apache.commons.io reads package javax.activation from both java.activation and jakarta.activation
(...)
Allows for easier integration of other SOAP services provided by AT
@froque froque force-pushed the 417-add-support-to-send-invoices-by-webservices-to-portuguese-at branch from 01783b0 to 8ecb9b2 Compare June 19, 2023 11:26
@froque froque merged commit 93c52c5 into master Jun 19, 2023
1 check passed
@froque froque deleted the 417-add-support-to-send-invoices-by-webservices-to-portuguese-at branch September 27, 2023 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support to send invoices by webservices to Portuguese AT
2 participants