Skip to content
Snippets Groups Projects
Commit a32efecf authored by yangalicace1's avatar yangalicace1
Browse files

Deployed d8872a4c to develop in public with MkDocs 1.6.1 and mike 2.1.3

parent 515eb87e
No related branches found
No related tags found
No related merge requests found
Showing
with 3 additions and 7901 deletions
......@@ -864,7 +864,7 @@ Most of the specifications can be as specified in the <a href="#112-oracle-virtu
<li>Size: 60GB (at least)</li>
<li><strong>Type</strong>: VMDK</li>
</ul>
<p><img alt="Screenshot_from_2024-10-21_18-13-43" src="./images/deployment_guide/01_vagrant_box.jpg" /></p>
<p><img alt="Screenshottt_from_2024-10-21_18-13-43" src="../../images/deployment_guide/01_vagrant_box.jpg" /></p>
<p>Also, before initiating the VM and installing the OS, we'll need to:</p>
<ul>
<li>Disable Floppy in the 'Boot Order'</li>
......@@ -897,7 +897,7 @@ At Network Adapt 1, the following port-forwarding rule must be set.</p>
</tr>
</tbody>
</table>
<p><img alt="Screenshot_from_2023-07-10_18-25-18" src="./images/deployment_guide/02_vagrant_box.jpg" /></p>
<p><img alt="Screenshot_from_2023-07-10_18-25-18" src="./doc/images/deployment_guide/02_vagrant_box.jpg" /></p>
<h3><u>Installing the OS</h3>
<p></u></p>
<p>For a Vagrant Box, it is generally suggested that the ISO's server version is used, as it is intended to be used via SSH, and any web GUI is expected to be forwarded to the host.</p>
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -24,56 +24,4 @@
<loc>https://tfs.etsi.org/develop/development_guide/development_guide/</loc>
<lastmod>2024-10-21</lastmod>
</url>
<url>
<loc>https://tfs.etsi.org/develop/testing/postman/</loc>
<lastmod>2024-10-21</lastmod>
</url>
<url>
<loc>https://tfs.etsi.org/develop/testing/robotframework/</loc>
<lastmod>2024-10-21</lastmod>
</url>
<url>
<loc>https://tfs.etsi.org/develop/testing/testplan/</loc>
<lastmod>2024-10-21</lastmod>
</url>
<url>
<loc>https://tfs.etsi.org/develop/testing/testplan/api_access_control_policy/</loc>
<lastmod>2024-10-21</lastmod>
</url>
<url>
<loc>https://tfs.etsi.org/develop/testing/testplan/api_auditing_service/</loc>
<lastmod>2024-10-21</lastmod>
</url>
<url>
<loc>https://tfs.etsi.org/develop/testing/testplan/api_discover_service/</loc>
<lastmod>2024-10-21</lastmod>
</url>
<url>
<loc>https://tfs.etsi.org/develop/testing/testplan/api_events_service/</loc>
<lastmod>2024-10-21</lastmod>
</url>
<url>
<loc>https://tfs.etsi.org/develop/testing/testplan/api_invoker_management/</loc>
<lastmod>2024-10-21</lastmod>
</url>
<url>
<loc>https://tfs.etsi.org/develop/testing/testplan/api_logging_service/</loc>
<lastmod>2024-10-21</lastmod>
</url>
<url>
<loc>https://tfs.etsi.org/develop/testing/testplan/api_provider_management/</loc>
<lastmod>2024-10-21</lastmod>
</url>
<url>
<loc>https://tfs.etsi.org/develop/testing/testplan/api_publish_service/</loc>
<lastmod>2024-10-21</lastmod>
</url>
<url>
<loc>https://tfs.etsi.org/develop/testing/testplan/api_security_service/</loc>
<lastmod>2024-10-21</lastmod>
</url>
<url>
<loc>https://tfs.etsi.org/develop/testing/testplan/common_operations/</loc>
<lastmod>2024-10-21</lastmod>
</url>
</urlset>
\ No newline at end of file
No preview for this file type
This diff is collapsed.
{
"id": "872bffef-37ef-4a25-afa8-6a61de256f4b",
"name": "CAPIF",
"values": [
{
"key": "CAPIF_HOSTNAME",
"value": "capifcore",
"type": "default",
"enabled": true
},
{
"key": "CAPIF_PORT",
"value": "8080",
"type": "default",
"enabled": true
},
{
"key": "REGISTER_HOSTNAME",
"value": "localhost",
"type": "default",
"enabled": true
},
{
"key": "REGISTER_PORT",
"value": "8084",
"type": "default",
"enabled": true
},
{
"key": "USERNAME",
"value": "ProviderONE",
"type": "default",
"enabled": true
},
{
"key": "PASSWORD",
"value": "pass",
"type": "default",
"enabled": true
},
{
"key": "CALLBACK_IP",
"value": "host.docker.internal",
"type": "default",
"enabled": true
},
{
"key": "CALLBACK_PORT",
"value": "8087",
"type": "default",
"enabled": true
},
{
"key": "ADMIN_USER",
"value": "admin",
"type": "default",
"enabled": true
},
{
"key": "ADMIN_PASSWORD",
"value": "password123",
"type": "default",
"enabled": true
},
{
"key": "ADMIN_TOKEN",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "REFRESH_TOKEN",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "USER_NAME",
"value": "custom_user",
"type": "default",
"enabled": true
},
{
"key": "USER_PASSWORD",
"value": "user_pass",
"type": "default",
"enabled": true
},
{
"key": "USER_UUID",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "ONBOARDING_URL",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "PUBLISH_URL",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "ONBOARDING_URL_INVOKER",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "DISCOVER_URL",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "SECURITY_URL",
"value": "",
"type": "default",
"enabled": true
},
{
"key": "CA_ROOT",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "ACCESS_TOKEN",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "APF_KEY",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "AMF_KEY",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "AEF_KEY",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "PROVIDER_ID",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "AEF_ID",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "AEF_CERT",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "APF_ID",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "APF_CERT",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "AMF_ID",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "AMF_CERT",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "INVOKER_KEY",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "INVOKER_ID",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "INVOKER_CERT",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "API_ID",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "API_NAME",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "IPV4ADDR",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "PORT",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "URI",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "API_SERVICE_ID",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "API_AEF_ID",
"value": "",
"type": "any",
"enabled": true
},
{
"key": "NETAPP_SERVICE_TOKEN",
"value": "",
"type": "any",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2024-06-26T11:17:13.183Z",
"_postman_exported_using": "Postman/11.2.13"
}
\ No newline at end of file
from flask import Flask, jsonify, request
from flask_jwt_extended import jwt_required, JWTManager, get_jwt_identity, get_jwt
import ssl
from werkzeug import serving
import socket, ssl
import OpenSSL
from OpenSSL import crypto
import jwt
import pyone
app = Flask(__name__)
jwt_flask = JWTManager(app)
with open("Responses/cert_server.pem", "rb") as cert_file:
cert= cert_file.read()
crtObj = crypto.load_certificate(crypto.FILETYPE_PEM, cert)
pubKeyObject = crtObj.get_pubkey()
pubKeyString = crypto.dump_publickey(crypto.FILETYPE_PEM,pubKeyObject)
app.config['JWT_ALGORITHM'] = 'RS256'
app.config['JWT_PUBLIC_KEY'] = pubKeyString
@app.route("/hello", methods=["POST"])
@jwt_required()
def hello():
request_data = request.get_json()
user_name = request_data['name']
return jsonify(f"Hello: {user_name}, welcome to CAPIF.")
if __name__ == '__main__':
serving.run_simple("0.0.0.0", 8088, app)
This diff is collapsed.
{
"name": "node-server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"body-parser": "^1.18.3",
"express": "^4.16.3",
"shelljs": "^0.8.2"
}
}
\ No newline at end of file
// Change this variable if another host is used for CAPIF
const CAPIF_HOSTNAME = 'capifcore';
const express = require('express'),
app = express(),
fs = require('fs'),
shell = require('shelljs'),
folderPath = './Responses/',
bodyParser = require('body-parser'),
path = require('path');
const { exec } = require('child_process');
// Create the folder path in case it doesn't exist
shell.mkdir('-p', folderPath);
// Change the limits according to your response size
app.use(bodyParser.json({limit: '50mb', extended: true}));
app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }));
var opensslCommand = ''
if (CAPIF_HOSTNAME.includes(':')){
opensslCommand = `openssl s_client -connect ${CAPIF_HOSTNAME} | openssl x509 -text > ./Responses/cert_server.pem`;
}
else{
opensslCommand = `openssl s_client -connect ${CAPIF_HOSTNAME}:443 | openssl x509 -text > ./Responses/cert_server.pem`;
}
exec(opensslCommand, (error, stdout, stderr) => {
if (error) {
console.error(`Error generating CSR: ${stderr}`);
}
});
fs.writeFileSync('./Responses/client_cert.crt', '');
fs.writeFileSync('./Responses/client_key.key', '');
app.get('/', (req, res) => res.send('Hello, I write data to file. Send them requests!'));
app.post('/generate_csr', (req, res) => {
console.log(req.body);
const csrFilePath = 'Responses/'+req.body.apiProvFuncRole+'_csr.pem';
const privateKeyFilePath = 'Responses/'+req.body.apiProvFuncRole+'_key.key';
const subjectInfo = {
country: 'ES',
state: 'Madrid',
locality: 'Madrid',
organization: 'Telefonica I+D',
organizationalUnit: 'IT Department',
emailAddress: 'admin@example.com',
};
const opensslCommand = `openssl req -newkey rsa:2048 -nodes -keyout ${privateKeyFilePath} -out ${csrFilePath} -subj "/C=${subjectInfo.country}/ST=${subjectInfo.state}/L=${subjectInfo.locality}/O=${subjectInfo.organization}/OU=${subjectInfo.organizationalUnit}/emailAddress=${subjectInfo.emailAddress}"`;
exec(opensslCommand, (error, stdout, stderr) => {
if (error) {
console.error(`Error generating CSR: ${stderr}`);
} else {
console.log('CSR generated successfully:');
fs.readFile(csrFilePath, 'utf8', (readError, csrContent) => {
if (readError) {
console.error(`Error reading CSR: ${readError}`);
res.status(500).send('Error reading CSR');
} else {
console.log('CSR read successfully:');
// Send the CSR content in the response
fs.readFile(privateKeyFilePath, 'utf8', (readError, keyContent) => {
if (readError) {
console.error(`Error reading KEY: ${readError}`);
res.status(500).send('Error reading KEY');
} else {
console.log('KEY read successfully:');
// Send the CSR content in the response
fs.unlink(csrFilePath, (err) => {
if (err) {
console.error(`Error deleting file: ${err.message}`);
}
});
fs.unlink(privateKeyFilePath, (err) => {
if (err) {
console.error(`Error deleting file: ${err.message}`);
}
});
res.send({csr: csrContent, key: keyContent});
}
});
}
});
}
});
});
app.post('/generate_csr_invoker', (req, res) => {
console.log(req.body);
const csrFilePath = 'Responses/invoker_csr.pem';
const privateKeyFilePath = 'Responses/invoker_key.key';
const subjectInfo = {
country: 'ES',
state: 'Madrid',
locality: 'Madrid',
organization: 'Telefonica I+D',
organizationalUnit: 'IT Department',
emailAddress: 'admin@example.com',
};
const opensslCommand = `openssl req -newkey rsa:2048 -nodes -keyout ${privateKeyFilePath} -out ${csrFilePath} -subj "/C=${subjectInfo.country}/ST=${subjectInfo.state}/L=${subjectInfo.locality}/O=${subjectInfo.organization}/OU=${subjectInfo.organizationalUnit}/emailAddress=${subjectInfo.emailAddress}"`;
exec(opensslCommand, (error, stdout, stderr) => {
if (error) {
console.error(`Error generating CSR: ${stderr}`);
} else {
console.log('CSR generated successfully:');
fs.readFile(csrFilePath, 'utf8', (readError, csrContent) => {
if (readError) {
console.error(`Error reading CSR: ${readError}`);
res.status(500).send('Error reading CSR');
} else {
console.log('CSR read successfuly:');
// Send the CSR content in the response
fs.readFile(privateKeyFilePath, 'utf8', (readError, keyContent) => {
if (readError) {
console.error(`Error reading KEY: ${readError}`);
res.status(500).send('Error reading KEY');
} else {
console.log('KEY read successfully:');
// Send the CSR content in the response
fs.unlink(csrFilePath, (err) => {
if (err) {
console.error(`Error deleting file: ${err.message}`);
}
});
fs.unlink(privateKeyFilePath, (err) => {
if (err) {
console.error(`Error deleting file: ${err.message}`);
}
});
res.send({csr: csrContent, key: keyContent});
}
});
}
});
}
});
});
app.post('/write_cert', (req, res) => {
let extension = 'crt',
fsMode = 'writeFile',
filename = "client_cert",
filePath = `${path.join(folderPath, filename)}.${extension}`,
options = {encoding: 'binary'};
fs[fsMode](filePath, req.body.cert, options, (err) => {
if (err) {
console.log(err);
res.send('Error');
}
});
extension = 'key';
filename = "client_key";
filePath = `${path.join(folderPath, filename)}.${extension}`;
fs[fsMode](filePath, req.body.key, options, (err) => {
if (err) {
console.log(err);
res.send('Error');
}
else {
res.send('Success');
}
});
});
app.post('/write_ca', (req, res) => {
let extension = 'pem',
fsMode = 'writeFile',
filename = "ca_cert",
filePath = `${path.join(folderPath, filename)}.${extension}`,
options = {encoding: 'binary'};
fs[fsMode](filePath, req.body.ca_root, options, (err) => {
if (err) {
console.log(err);
res.send('Error');
}
else {
res.send('Success');
}
});
});
app.listen(3000, () => {
console.log('ResponsesToFile App is listening now! Send them requests my way!');
console.log(`Data is being stored at location: ${path.join(process.cwd(), folderPath)}`);
});
\ No newline at end of file
This diff is collapsed.
public/develop/testing/robotframework/robot_log_example.png

154 KiB

public/develop/testing/robotframework/robot_report_example.png

179 KiB

This diff is collapsed.
{
"apiName": "service_1",
"aefProfiles": [
{
"aefId": "string",
"versions": [
{
"apiVersion": "v1",
"expiry": "2021-11-30T10:32:02.004Z",
"resources": [
{
"resourceName": "string",
"commType": "REQUEST_RESPONSE",
"uri": "string",
"custOpName": "string",
"operations": [
"GET"
],
"description": "string"
}
],
"custOperations": [
{
"commType": "REQUEST_RESPONSE",
"custOpName": "string",
"operations": [
"GET"
],
"description": "string"
}
]
}
],
"protocol": "HTTP_1_1",
"dataFormat": "JSON",
"securityMethods": ["PSK"],
"interfaceDescriptions": [
{
"ipv4Addr": "string",
"port": 65535,
"securityMethods": ["PSK"]
},
{
"ipv4Addr": "string",
"port": 65535,
"securityMethods": ["PSK"]
}
]
},
{
"aefId": "string",
"versions": [
{
"apiVersion": "v1",
"expiry": "2021-11-30T10:32:02.004Z",
"resources": [
{
"resourceName": "string",
"commType": "REQUEST_RESPONSE",
"uri": "string",
"custOpName": "string",
"operations": [
"GET"
],
"description": "string"
}
],
"custOperations": [
{
"commType": "REQUEST_RESPONSE",
"custOpName": "string",
"operations": [
"GET"
],
"description": "string"
}
]
}
],
"protocol": "HTTP_1_1",
"dataFormat": "JSON",
"securityMethods": ["PSK"],
"interfaceDescriptions": [
{
"ipv4Addr": "string",
"port": 65535,
"securityMethods": ["PSK"]
},
{
"ipv4Addr": "string",
"port": 65535,
"securityMethods": ["PSK"]
}
]
}
],
"description": "string",
"supportedFeatures": "fffff",
"shareableInfo": {
"isShareable": true,
"capifProvDoms": [
"string"
]
},
"serviceAPICategory": "string",
"apiSuppFeats": "fffff",
"pubApiPath": {
"ccfIds": [
"string"
]
},
"ccfId": "string"
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
{
"eventFilters": [
{
"aefIds": ["aefIds", "aefIds"],
"apiIds": ["apiIds", "apiIds"],
"apiInvokerIds": ["apiInvokerIds", "apiInvokerIds"]
},
{
"aefIds": ["aefIds", "aefIds"],
"apiIds": ["apiIds", "apiIds"],
"apiInvokerIds": ["apiInvokerIds", "apiInvokerIds"]
}
],
"eventReq": {
"grpRepTime": 5,
"immRep": true,
"maxReportNbr": 0,
"monDur": "2000-01-23T04:56:07+00:00",
"partitionCriteria": ["string1", "string2"],
"repPeriod": 6,
"sampRatio": 15
},
"events": ["SERVICE_API_AVAILABLE", "API_INVOKER_ONBOARDED"],
"notificationDestination": "http://robot.testing",
"requestTestNotification": true,
"supportedFeatures": "aaa",
"websockNotifConfig": {
"requestWebsocketUri": true,
"websocketUri": "websocketUri"
}
}
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment