Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Network Discovery example


Java Code

The following implementation example of HTTPS for a POMBA Springboot Microservice can be found at https://gerrit.onap.org/r/#/c/74206/, some values may differ, but the following content should be the same.

...

Code Block
languagejava
titleSpringServiceImpl.java
    @Autowired
    private Client jerseySslClient;


OOM Code

For OOM deployment of the Network Discovery Example the following changes were required, https://gerrit.onap.org/r/#/c/74739/ :


applicaiton.properties

Code Block
languagebash
titleapplication.properties
#Enable HTTPS
server.port={{ .Values.config.serverSslPort }}
server.ssl.key-store={{ .Values.config.serverSslKeyStore }}
server.ssl.key-store-password={{ .Values.config.serverSslKeyStorePassword }}
server.ssl.client-auth={{ .Values.config.serverSslClientAuth }}
server.ssl.enabled={{ .Values.config.serverSslEnabled }}
server.ssl.enabled-protocols={{ .Values.config.serverSslEnabledProtocols }}


deployment.yaml: Note: the keystore must also be prvovided in the assigned directory

Code Block
languagebash
titledeployment.yaml
          - mountPath: /opt/app/config/auth/tomcat_keystore
            name: {{ include "common.fullname" . }}-auth-secret
            subPath: tomcat_keystore
            readOnly: true
:
:
          readinessProbe:
            httpGet:
              path: "/"
              scheme: "HTTPS"
:
:

          livenessProbe:
            httpGet:
              path: "/"
              scheme: "HTTPS"
              port: {{ .Values.service.internalPort }}



values.yaml

Code Block
languagebash
titlevalues.yaml
  #Enable HTTPS
  serverSslPort: 8443
  serverSslKeyStore: /opt/app/config/auth/tomcat_keystore
  serverSslKeyStorePassword: password(OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10)
  serverSslClientAuth: want
  serverSslEnabled: true
  serverSslEnabledProtocols: TLSv1.1,TLSv1.2