FRED client

A Java EPP client for FRED (Free Registry for ENUM and Domains)

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

io.github.novotnyradek
ArtifactId

ArtifactId

fred-client
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

jar
Description

Description

FRED client
A Java EPP client for FRED (Free Registry for ENUM and Domains)
Project URL

Project URL

https://github.com/novotnyradek/fred-client
Source Code Management

Source Code Management

https://github.com/novotnyradek/fred-client

Download fred-client

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.novotnyradek/fred-client/ -->
<dependency>
    <groupId>io.github.novotnyradek</groupId>
    <artifactId>fred-client</artifactId>
    <version>0.2</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.novotnyradek/fred-client/
implementation 'io.github.novotnyradek:fred-client:0.2'
// https://jarcasting.com/artifacts/io.github.novotnyradek/fred-client/
implementation ("io.github.novotnyradek:fred-client:0.2")
'io.github.novotnyradek:fred-client:jar:0.2'
<dependency org="io.github.novotnyradek" name="fred-client" rev="0.2">
  <artifact name="fred-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.novotnyradek', module='fred-client', version='0.2')
)
libraryDependencies += "io.github.novotnyradek" % "fred-client" % "0.2"
[io.github.novotnyradek/fred-client "0.2"]

Dependencies

compile (8)

Group / Artifact Type Version
org.apache.maven.plugins : maven-gpg-plugin jar 1.6
org.apache.maven.plugins : maven-source-plugin jar 3.0.1
org.codehaus.mojo : jaxb2-maven-plugin jar 2.3.1
org.slf4j : slf4j-api jar 1.5.6
org.slf4j : slf4j-log4j12 jar 1.5.6
log4j : log4j jar 1.2.14
net.sf.dozer : dozer jar 5.3.1
commons-logging : commons-logging jar 1.2

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

FRED

fred-client

A Java EPP client for FRED (Free Registry for ENUM and Domains)

FRED is open-source software for running a domain and ENUM Registry, developed by CZ.NIC, the .CZ and 0.2.4.e164.arpa domain Registry.

Documentation for the whole FRED project is available on-line, visit https://fred.nic.cz/documentation.

NIC.CZ

Client was tested by CZ.NIC, the national registry of .cz domain.

Build Status Maven Central License Javadocs

Version: 2.41

Changes

2.41
  • Released to Central repository.
  • Change version to be same as FRED system for compatibility.
  • Change groupId and package names to official one.
0.3.1
  • Add ability to change registrar password via login request.
  • Remove varargs from constructors to keep clean design.
  • Change postal info data for update.
  • Change version number to correct one.
0.3.0
  • Add option turn on validation of responses and requests separately.
  • Add support for multithread systems.
  • Other small improvements and fixes.
0.2.2
  • RELEASED to central repository.
  • More mapping tests.
  • Created poll responses pojos for contact, keyset and nsset update.
  • Regenerated class diagram.
0.2.1
  • Generated class diagram.
  • Changed schemas to accept object update poll message.
0.2.1
  • Created remaining methods (without object update poll message yet).
  • Possibility to configure client from outside, via properties file, see Settings section.
  • Possibility to turn off validation of requests and responses (via properties file).
  • Speed improvements, sharing one connection to client.
  • And much more.
0.1.0
  • Removed clientTransactionId attribute from constructors. Can be set using setClientTransactionId method on any request, otherwise will be generated automatically.
  • First version.
  • Possibility to connect to epp.demo.regtest.nic.cz from main method or your application.

Commands

  • Session management commands
    • Login
    • Logout
  • Query commands
    • Check
    • Info
    • Update
    • Polling
  • Transform commands
    • Create
    • Transfer
    • Delete
    • Renew domain
  • Custom commands
    • Credit info
    • Send authInfo
    • Test nsset
    • Listing

Installation

Add as maven dependency to your project.

<dependency>
    <groupId>cz.active24.client.fred</groupId>
    <artifactId>fred-client</artifactId>
    <version>2.41</version>
</dependency>

Settings

Customize fred-client.properties file. You have to provide properties file when initiating client.

###############################################################################
#                     FRED Client Configuration File                          #
###############################################################################
# This is an example of configuration.
#
# Connection settings
# Open instance registrar account
# The client identifier
apiKey.id = REG-FRED_B
# The client’s plain-text password
apiKey.secret = passwd

# Server name
host = epp.demo.regtest.nic.cz
# Server port
port = 700
# Socket timeout (miliseconds)
timeout = 20000

# SSL Properties
# Path to Java keystore with private and public certificate
certificate.file = conf/fred.jks
# Java keystore password
certificate.secret = changeit
# Other settings
keystore.instance = JKS
sslsocket.instance = TLSv1.2
keymanager.instance = SunX509

# Enable/disable the validation of messages (true enabled, false disabled) - for requests and responses
schema.validation.request = true
schema.validation.response = false

Creating your own java keystore file

Step 1 - Convert the certificate and private key to PKCS 12

openssl pkcs12 -export -in Cert_openinstance.pem -inkey privatekey_openinstance.pem -out private_key.p12 -password pass:changeit

Step 2 - Import the certificate to the keystore

keytool -importkeystore -srcstorepass changeit -deststorepass changeit -destkeystore fred.jks -srckeystore private_key.p12 -srcstoretype PKCS12

Step 3 - Get server certificate

Note: works only for open instance environment - on production instance you'll get certificate from CZ.NIC.

openssl s_client -connect epp.demo.regtest.nic.cz:443 2>/dev/null </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > server.pem

Step 4 - import downloaded certificate to keystore

keytool -import -alias server -file server.pem -storepass changeit -keystore fred.jks

Usage

  • Add as Maven dependency (or use .jar) to your project. Create instance of FredClient class, properties file as parameter.
  • Feel free to call any command, no need to call login separately, because:
    • Every command checks for connection via hello EPP command,
    • if connection is not established, it creates new ssl connection to server,
    • proceeds login EPP command and try to login,
    • proceeds command you wanted.
  • If you keep your current instance of FredClient class, it reuses created connection.

Enjoy!

Developed with support of

active24.cz

Versions

Version
0.2