#JSONRPC
Explore tagged Tumblr posts
Text
Integration with Odoo: Using API KEY in Postman
Learn how to master Integration with Odoo using API keys and Postman! This comprehensive tutorial covers everything from creating API keys in Odoo 18.0 to making JSON-RPC requests. Level up your Odoo integration skills! #Odoo #API #Postman #Integration #JSONRPC #Developers
This tutorial explains Integration with Odoo, specifically Using API KEY within Postman. Therefore, you will learn how to connect to your Odoo instance and interact with its data using secure API calls. Consequently, this method provides a robust way to integrate external applications with Odoo. What is Odoo’s JSON-RPC API? Odoo, as a comprehensive suite of business applications, provides a…
0 notes
Text
been making a little rpc library to try and simplify doing network things because http sucks ass and websockets are just tubes. i have it generating code for clients and just as i get the http stuff working, i find that the rust crate jsonrpsee has a lot of what i wanted in the first place, but doesn't have any sort of compatibility with any other web framework, which is needed if you dont want to uploads files using base64 like a jackass
so now i have a dilemma. i could keep working on my home-grown solution that i have, which plays really nicely with other frameworks and allows any sort of encoding (like you could use some binary encoding instead of being forced to use json) and will let me expand in interesting ways in the future
or, i could switch to a big, tested, existing library that is built on industry standards and write my own integration to make it work on the web framework i want it on
the latter means less code/effort (i think), but the former gives me me a lot more options and lets me write stuff my own way (i could even make my rpc library support jsonrpc as a transport tbh). i'm genuinely stuck on this now, as both paths seem really even to me
#lizabeth talkabeth#part of me is leaning towards sticking with my own because i like it#but idk if it's worth building all of this just to find out that it wasn't worth it#it's not like dropping it now would be a bad thing#i've learnt a lot with#rustlang#proc-macros#but if i keep going and realise it wasn't worth building all the way i'll be really frustrated
1 note
·
View note
Text
New ES6 JavaScript Monero library (JSON-RPC now, fundamental crypto soon™)
New ES6 JavaScript Monero library (JSON-RPC now, fundamental crypto soon™)
[ad_1]

New ES6 JavaScript Monero library (JSON-RPC now, fundamental crypto soon™)
[ad_2] View Reddit by sneurlax – View Source
View On WordPress
0 notes
Text
Call JSON RPC to Web Controller in Odoo
JSON (Javascript object notation) is a data-interchange format. It is easy to read and write, also for machines, it is easy to parse and generate. RPC is the remote procedure call protocol, JSON-RPC is RPC which is encoded with JSON. It is similar to XML-RPC. The difference is that JSON-RPC does not require a response to sending data to the server.
Read Original Content: Call JSON RPC to Web Controller in Odoo
0 notes
Text
ZabbixAPI6.4をPowerShellでmaintenance.updateオブジェクトを利用し、メンテナンス対象ホストを複数更新するスクリプトはどの様に書けば良いですか?ただしhostidsパラメーターは非推奨になったので、hostsパラメーターまたはgroupsパラメーターを利用して下さい。
以下は、PowerShellで複数のホストを対象とする ZabbixAPIのmaintenance.updateオブジェクトを利用するスクリプトの例です。 hostsパラメーターを使用しています。
# Zabbix APIの接続情報 $zabbixUrl = "https://example.com/zabbix/api_jsonrpc.php" $zabbixUser = "admin" $zabbixPass = "password" # メンテナンスのIDと更新情報 $maintenanceId = "3" $maintenanceUpdate = @{ name = "Updated maintenance name" active_since = "1647532800" active_till = "1647619200" groupids = @() hostids = @(1, 2, 3) # 更新したいホストIDを指定 timeperiods = @{ timeperiod_type = 0 start_date = "1647532800" start_time = "00:00:00" period = "3600" } } # Zabbix APIに接続して認証トークンを取得 $authParams = @{ jsonrpc = "2.0" method = "user.login" params = @{ user = $zabbixUser password = $zabbixPass } id = 1 } $authResult = Invoke-RestMethod -Uri $zabbixUrl -Method Post -Body ($authParams | ConvertTo-Json) -ContentType "application/json-rpc" $authToken = $authResult.result # maintenance.updateオブジェクトを実行してメンテナンスを更新 $updateParams = @{ jsonrpc = "2.0" method = "maintenance.update" params = @{ maintenanceid = $maintenanceId update = $maintenanceUpdate } auth = $authToken id = 1 } $updateResult = Invoke-RestMethod -Uri $zabbixUrl -Method Post -Body ($updateParams | ConvertTo-Json) -ContentType "application/json-rpc" $updateResult.result
このスクリプトでは、Zabbix APIに接続して認証トークンを取得し、 maintenance.updateオブジェクトを実行してメンテナンスを更新しています。 更新するメンテナンスのIDや更新情報は、 それぞれ$maintenanceIdと$maintenanceUpdate変数に設定されています。
更新情報の中で、hostsパラメーターに対して、 更新したいホストIDを配列で指定しています。 ホストIDの配列は、hostids = @(1, 2, 3) のように、カンマ区切りで指定することができます。
0 notes
Note
reached end of output text
reached end of output text.The function returns a string which displays a summary of all the events related to the particular message. The summary may contain additional information, so be sure to read through the source code of your message first before attempting to decode it or to use the following code:import string; import random from '../jsonrpc' ; def read_message ( message ): # for each message, this is its message, not its value. we will try to read each value (except the first and second ) from each of the # one that is printed or written. if message['first'] == ' ' : # This must be a case where no one has the same message as the one we try to read, otherwise try 'fool ' .format(message['first']).decodeToString("%m") - end / ' + message['second'] + "" .format(message['second']).decodeToString("&") + "" + messages['second'] + "" .format(message['second']).fill(text, message['first']))As you can see, we read in all the messages, write in the message's first argument, and then add text to the end of each text, in return.Example: Reaching end of message output textWhen trying to read a JSON response from its console, you may notice messages with various content added which appear before the end of the character you've used. By default, JSON responses contain only parts of a single character (such as a "a") and must contain a single, unquoted character that only contains the following character:{ "a": "A", "b": "b" }, { "a": 2, "b": 1, "b": 0, "e": "e" }If you try to read JSON a string containing a different "a" character than the first character before it, you'll see an error of 'Invalid character'.The function returns a string which displays a summary of all the events related to the particular message. The summary may contain additional information, so be sure to read through the source code of your message first before attempting to decode it or to use the following code.import jsonrpc; class Event ( object ): pass def update_message (): # create the message object using the provided argument list (default: None) def read_message_from1 ( message
1 note
·
View note
Text
In this article we discuss in detail the installation and configuration of FreeIPA Server on Rocky Linux 9 / AlmaLinux 9 system. FreeIPA is popular and widely used identity management solution useful in management of user authentication, creation and enforcement of policies, identity stores, and authorization policies in a Linux domain. FreeIPA aims at eliminating the overhead for Linux Administrators working in medium to large scale Linux powered infrastructures. Some of the advanced features of FreeIPA are; Support for large groups of Linux machines Has native integration with Windows Active Directory Advanced features of Linux operating system environments Full multi master replication for higher redundancy and scalability Provision of extensible management interfaces (Web UI, CLI, XMLRPC and JSONRPC API) and Python SDK Key Benefits of using FreeIPA Central Authentication Management – Centralized management of users, machines, and services within large Linux/Unix enterprise environments. Fine-grained Access Control: Provides a clear method of defining access control policies to govern user identities and delegation of administrative tasks. One Time Password (OTP): Provides a popular method for achieving two-factor authentication (2FA). Direct Connect to Active Directory: You can retrieve information from Active Directory (AD) and join a domain or realm in a standard way. Active Directory Cross-Realm Trust: As System Administrator, you can establish cross-forest Kerberos trusts with Microsoft Active Directory. This allows external Active Directory (AD) users convenient access to resources in the Identity Management domain. Integrated Public Key Infrastructure (PKI) Service: This provides PKI services that sign and publish certificates for hosts and services, Certificate Revocation List (CRL) and OCSP services for software validating the published certificate, and an API to request, show, and find certificates. Ensure this installation is done on a freshly install Rocky Linux 9 / AlmaLinux 9 system to since IPA services ports could conflict with other Linux services. Step 1: Update system, set hostname, timezone Update your Rocky Linux / AlmaLinux 8 server: sudo yum -y update sudo reboot Once rebooted, set correct system hostname. sudo hostnamectl set-hostname ipa.example.com The host name must be a fully qualified domain name, such as ipa.example.com. Once set also configure system timezone to match your region: sudo timedatectl set-timezone Africa/Nairobi Confirm your timezone settings: $ timedatectl Local time: Wed 2022-07-27 21:44:27 EAT Universal time: Wed 2022-07-27 18:44:27 UTC RTC time: Wed 2022-07-27 18:44:27 Time zone: Africa/Nairobi (EAT, +0300) System clock synchronized: yes NTP service: active RTC in local TZ: no Step 2: Check FreeIPA server installation pre-reqs Key FreeIPA server components are: MIT Kerberos KDC – Provides Single-Sign-on authentication solution 389 Directory Server – Main data store and provides a full multi-master LDAPv3 directory infrastructure. ISC Bind DNS server – Bind is the default Domain name resolution service in FreeIPA. Dogtag Certificate System – This component provides CA & RA used for certificate management functions. NTP Server – For time synchronization across fleet of nodes joined to the domain Web UI / CLI Interface– Used to centrally manage access control, the delegation of administrative tasks and other network administration tasks. Minimum hardware requirements when installing FreeIPA Server on Rocky Linux 9 / AlmaLinux 9: 4GB RAM 2 vCPUs FQDN – It must be resolvable from DNS server configured in the system Minimum of 10 GB Disk space availability Use commands shared below to check CPU, Memory and disk space on your Rocky Linux 9 / AlmaLinux 9 instance. # CPU Cores $ grep -c ^processor /proc/cpuinfo
4 # Memory check $ free -h # Disk space $ lsblk -fp Add FreeIPA Server IP address and its DNS name inside the /etc/hosts file: $ sudo vi /etc/hosts 172.20.30.252 ipa.example.com Validate your IP settings: $ hostname --ip-address 172.20.30.252 Verify the reverse DNS configuration (PTR records) is set correctly in your DNS Server using dig command: $ dig +short -x Step 3: Install FreeIPA server on Rocky Linux 9 / AlmaLinux 9 Next we perform the installation of FreeIPA packages on Rocky Linux 9 / AlmaLinux 9 server. No extra RPM repository is required, all the packages and dependencies are available in default OS default repositories. Install all FreeIPA server and client packages with the following commands: sudo dnf -y install freeipa-server freeipa-server-dns freeipa-client Run FreeIPA server installer FreeIPA server configurations is done using the ipa-server-install command line tool. The installer script will create a log file at /var/log/ipaserver-install.log: sudo ipa-server-install The script prompts for several required settings and offers recommended default values in brackets. To accept a default value, press Enter. To provide a custom value, enter the required value. For Non-interactive installation for IdM without DNS: sudo ipa-server-install --realm EXAMPLE.COM \ --ds-password DM_password \ --admin-password admin_password \ --unattended # OR sudo ipa-server-install \ --domain example.com \ --realm EXAMPLE.COM \ --ds-password DM_password \ --admin-password admin_password The minimum required options for non-interactive installation are: --realm to provide the Kerberos realm name --ds-password to provide the password for the Directory Manager (DM), the Directory Server super user --admin-password to provide the password for admin, the IdM administrator --unattended to let the installation process select default options for the host name and domain name Non-interactive installation for IdM with integrated DNS: sudo ipa-server-install --domain example.com --realm EXAMPLE.COM \ --reverse-zone=30.20.172.in-addr.arpa. \ --no-forwarders \ --no-ntp \ --setup-dns \ --ds-password StrongDMPassw0rd \ --admin-password StrongDMPassw0rd \ --unattended Interactive installation of FreeIPA server See below for complete prompts you’ll get during installation and expected responses: $ sudo ipa-server-install The log file for this installation can be found in /var/log/ipaserver-install.log ============================================================================== This program will set up the IPA Server. Version 4.9.8 This includes: * Configure a stand-alone CA (dogtag) for certificate management * Configure the NTP client (chronyd) * Create and configure an instance of Directory Server * Create and configure a Kerberos Key Distribution Center (KDC) * Configure Apache (httpd) * Configure SID generation * Configure the KDC to enable PKINIT To accept the default shown in brackets, press the Enter key. Do you want to configure integrated DNS (BIND)? [no]: yes Enter the fully qualified domain name of the computer on which you're setting up server software. Using the form . Example: master.example.com. Server host name [ipa.example.com]: ipa.example.com The domain name has been determined based on the host name. Please confirm the domain name [example.com]: example.com The kerberos protocol requires a Realm name to be defined. This is typically the domain name converted to uppercase. Please provide a realm name [EXAMPLE.COM]: EXAMPLE.COM Certain directory server operations require an administrative user. This user is referred to as the Directory Manager and has full access to the Directory for system management tasks and will be added to the instance of directory server created for IPA. The password must be at least 8 characters long. Directory Manager password:
Password (confirm): The IPA server requires an administrative user, named 'admin'. This user is a regular system account used for IPA server administration. IPA admin password: Password (confirm): Do you want to configure chrony with NTP server or pool address? [no]: yes Enter NTP source server addresses separated by comma, or press Enter to skip: 0.de.pool.ntp.org,1.de.pool.ntp.org Enter a NTP source pool address, or press Enter to skip: The IPA Master Server will be configured with: Hostname: ipa.example.com IP address(es): 172.20.30.252 Domain name: example.com Realm name: EXAMPLE.COM The CA will be configured with: Subject DN: CN=Certificate Authority,O=EXAMPLE.COM Subject base: O=EXAMPLE.COM Chaining: self-signed NTP server: 0.de.pool.ntp.org NTP server: 1.de.pool.ntp.org Continue to configure the system with these values? [no]: yes The following operations may take some minutes to complete. Please wait until the prompt is returned. Disabled p11-kit-proxy Synchronizing time Configuration of chrony was changed by installer. Attempting to sync time with chronyc. Process chronyc waitsync failed to sync time! Unable to sync time with chrony server, assuming the time is in sync. Please check that 123 UDP port is opened, and any time server is on network. Warning: IPA was unable to sync time with chrony! Time synchronization is required for IPA to work correctly Configuring directory server (dirsrv). Estimated time: 30 seconds [1/41]: creating directory server instance [2/41]: tune ldbm plugin ..... If your FreeIPA server installation on Rocky Linux 9 / AlmaLinux 9 was successful, expect output similar to this: ...... Sudoers I/O plugin version 1.8.29 Client hostname: ipa.example.com Realm: EXAMPLE.COM DNS Domain: example.com IPA Server: ipa.example.com BaseDN: dc=example,dc=com Configured sudoers in /etc/authselect/user-nsswitch.conf Configured /etc/sssd/sssd.conf Systemwide CA database updated. Adding SSH public key from /etc/ssh/ssh_host_ecdsa_key.pub Adding SSH public key from /etc/ssh/ssh_host_ed25519_key.pub Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub Could not update DNS SSHFP records. SSSD enabled Configured /etc/openldap/ldap.conf Configured /etc/ssh/ssh_config Configured /etc/ssh/sshd_config Configuring example.com as NIS domain. Client configuration complete. The ipa-client-install command was successful Please add records in this file to your DNS system: /tmp/ipa.system.records.hh7e7u2h.db ============================================================================== Setup complete Next steps: 1. You must make sure these network ports are open: TCP Ports: * 80, 443: HTTP/HTTPS * 389, 636: LDAP/LDAPS * 88, 464: kerberos UDP Ports: * 88, 464: kerberos * 123: ntp 2. You can now obtain a kerberos ticket using the command: 'kinit admin' This ticket will allow you to use the IPA tools (e.g., ipa user-add) and the web user interface. Be sure to back up the CA certificates stored in /root/cacert.p12 These files are required to create replicas. The password for these files is the Directory Manager password The ipa-server-install command was successful Open FreeIPA service ports on the firewall A list of FreeIPA service ports are as listed in the following table: Let’s open the ports on the firewall using firewall-cmd: sudo firewall-cmd --add-service=dns,ntp,freeipa-ldap,freeipa-ldaps --permanent Then reload firewalld configuration for the change to take effect immediately: sudo firewall-cmd --reload List allowed services on the firewall: $ sudo firewall-cmd --list-all public (active) target: default icmp-block-inversion: no interfaces: ens18 sources: services: cockpit dhcpv6-client dns freeipa-ldap freeipa-ldaps ntp ssh .... Step 4: Access FreeIPA Management Dashboard After installation FreeIPA Server web-based administration console can be accessed using the server hostname on https:
https://ipa.example.com Ignore SSL warning by clicking “Advanced” > “Proceed to ipa.example.com (unsafe)“ Login with admin username and password set during installation. Upon successful login you’re presented with an interface that has such a look: Step 5: Secure FreeIPA With Let’s Encrypt SSL After installation we recommend using secure SSL on your FreeIPA Server. If running on a public instance follow our guide in the next link: Secure FreeIPA Server With Let’s Encrypt SSL Certificate Step 6: Manage FreeIPA using CLI Interface The ipa command can be used to perform all FreeIPA server operations. But first, get admin user Kerberos ticket: $ kinit admin Password for [email protected]: Time validity of assigned ticket can be checked using klist: $ klist Ticket cache: KCM:0 Default principal: [email protected] Valid starting Expires Service principal 07/27/2022 17:42:38 07/28/2022 21:49:26 krbtgt/[email protected] Set user’s default shell to /bin/bash. $ ipa config-mod --defaultshell=/bin/bash Maximum username length: 32 Home directory base: /home Default shell: /bin/bash Default users group: ipausers Default e-mail domain: example.com Search time limit: 2 Search size limit: 100 User search fields: uid,givenname,sn,telephonenumber,ou,title Group search fields: cn,description Enable migration mode: FALSE Certificate Subject base: O=EXAMPLE.COM Password Expiration Notification (days): 4 Password plugin features: AllowNThash, KDC:Disable Last Success SELinux user map order: guest_u:s0$xguest_u:s0$user_u:s0$staff_u:s0-s0:c0.c1023$unconfined_u:s0-s0:c0.c1023 Default SELinux user: unconfined_u:s0-s0:c0.c1023 Default PAC types: MS-PAC, nfs:NONE IPA masters: ipa.example.com IPA CA servers: ipa.example.com IPA CA renewal master: ipa.example.com IPA master capable of PKINIT: ipa.example.com Test by adding a user account and listing accounts present: $ ipa user-add test --first=Test --last=User [email protected] --password Password: Enter Password again to verify: ------------------- Added user "test" ------------------- User login: test First name: Test Last name: User Full name: Test User Display name: Test User Initials: TU Home directory: /home/test GECOS: Test User Login shell: /bin/bash Principal name: [email protected] Principal alias: [email protected] User password expiration: 20210802153038Z Email address: [email protected] UID: 1201400001 GID: 1201400001 Password: True Member of groups: ipausers Kerberos keys available: True To list user accounts added, run: $ ipa user-find --------------- 2 users matched --------------- User login: admin Last name: Administrator Home directory: /home/admin Login shell: /bin/bash Principal alias: [email protected] UID: 1201400000 GID: 1201400000 Account disabled: False User login: test First name: Test Last name: User Home directory: /home/test Login shell: /bin/bash Principal name: [email protected] Principal alias: [email protected] Email address: [email protected] UID: 1201400001 GID: 1201400001 Account disabled: False ---------------------------- Number of entries returned 2 ---------------------------- Try to login as testuser. On your first log in, you’ll be asked to change your password: $ ssh test@localhost Password: Password expired. Change your password now. Current Password: New password: Retype new password: Activate the web console with: systemctl enable --now cockpit.socket [test1@ipa ~]$ id uid=1201400003(test1) gid=1201400003(test1) groups=1201400003(test1) cont If you want to modify user password expiry period refer to the following guide: Change FreeIPA user maximum password expiry lifetime > 90 days You can play with the interface to understand placement of various FreeIPA management functions.
In the guides to follow we cover usage examples – how FreeIPA server can help in Infrastructure-wide user, groups, hosts and policy management. Stay connected for updates.
0 notes
Text
hardhatのconsoleの使い方
npx hardhat nodeでもブロックチェーンを作れるけど、npx hardhat consoleでも対話型のコンソール&blockchainが作れるっぽい。npx hardhat consoleを開いている状態はblockchainが維持されるから、localhost:8545に接続して、コントラクトをデプロイしたら、cosoleから見られるのかなと思った。gethは、コンソールに接続するネットワークも指定できたからそういうことも可能かもしれない。consoleでは下記のようなコマンドが使える。
config
await ethers.getSigner()
await ethers.provider.getBlockNumber()
await ethers.provider.listAccounts()
(await ethers.getSigner()).address
(await ethers.getSigner()).populateTransaction(txrq)
await (await ethers.getSigner()).sendTransaction(txrq)
npx hardhat nodeとnpx hardhat consoleを一緒に実行してもエラーにならない。両方とも、127.0.0.1:8545になってる。同じなのかな。両方閉じたら、リセットされるのかな?ちょっと確認してみよう。
とりあえず、consoleをrestartしたら、blockchainはリセットされた。
nodeを実行してないと、console実行中でもcurlで接続できない。node実行中だと、下記になる。
curl 127.0.0.1:8545
{"jsonrpc":"2.0","id":null,"error":{"code":-32700,"message":"Parse error: Unexpected end of JSON input"}}
consoleとnodeは別で、外部接続にはnode実行が必要なのかも。
npx hardhat run scripts/deploy_hoge.ts --network localhost
上記でコントラクトをデプロイしたけど、consoleの方はblockNumberは0のままだった。
とりあえずやっぱり別物なんだなあ。consoleにnodeで実行中のchainを接続できるのかな?
npx hardhat --network localhost console
上記で接続できた。
0 notes
Text
Useful analysis of sharded general public chain Close to ecological DApp deployment and interaction logic
The logical geometry of creating a DApp on the shard public chain NEAR? Analyze the logic process behind DApp deployment and blockchain conversation with source program code practice. Original title: "Close to Application and Blockchain Interaction Analysis" Compiled by: Ni Sen NEAR is really a next-generation general public chain project that uses sharding to boost blockchain scalability and focuses on performance and user experience. It really is committed to providing a system that can market the large-scale usage of Dapp. This short article explores the logical process behind Dapp deployment and interaction with the blockchain by creating a sample project and combining source code analysis. Create a deployment Dapp 1st develop a simple Dapp. Environmental installation Before performing the next steps, make sure you have installed npm, node, near-shell, and develop tools such as for example gulp. Create project What's create-near-app create-near-app is really a template device used to quickly generate the basic framework of a project. It currently works with react templates and indigenous templates. Use create-near-app to produce a simple project framework myapp in today's directory: npx create-near-app --vanilla myapp The picture below shows a basic project that was successfully created. Among them, hide is responsible for storing main code, assembly can be used to shop contract code, and neardev can be used to store some accounts configurations. Create account and authorize Following the project is established, unless you have a NEAR account, first go to the wallet to create an account, and execute near login in the project directory to authorize the account based on the operation steps. At this time, the corresponding accounts file will be created in the neardev folder. Next, create a merchant account for the agreement: near create_accounts myappaccount --masterAccount=hashquark --initialBalance 2 Change the contract name in conceal/config.js to the name of the agreement you just created: Package and begin After installing dependencies and starting the project with npm install && npm start, you can go to the local port 5000 to open the web site. After logging in to the wallet and completing the authorization, it will come back to the home page to display the welcome consumer (as proven in the amount below). Process analysis The following will combine source code analysis to explore the process logic of the above steps. Contract compilation What's wasm WebAssembly, also called wasm, is an experimental low-end programming language applied to your client in the internet browser. Wasmer is a wasm runtime atmosphere in addition to the internet browser. NEAR's smart agreement virtual machine is implemented predicated on wasmer, and its own smart contract also needs to be compiled right into a wasm file. NEAR smart agreements currently support composing in AssemblyScript or Rust. When building the project, the smart agreement will eventually be compiled into a wasm file and kept in the out directory. You can view the related logic in the gulp configuration file: Contract deployment NEAR tool introduction ChainLink near-shell is a command series tool used to interact with the near protocol, based on nearlib. nearlib is a Javascript SDK that interacts with the near protocol. Once you execute npm begin to begin the project, it will first execute close to deploy to deploy the contract. The near deploy command is a near-shell order. The main code is demonstrated below: As you can see, near deploy executes nearlib's deployContract method through the account under the neardev folder, which calls signAndSendTransaction to send the transaction for deploying the agreement:  It isn't difficult to note that the core of the deployment contract would be to construct the transaction with agreement data, indication it with the account, and then send the signed deal to the node. Sending a deal essentially encodes the info and sends a JsonRpc request with a method named "broadcast_tx_commit" to the node. The decision relationship diagram of contract deployment is as follows: Next, how will the node handle JsonRpc requests? Node processing deployment request What is nearcore nearcore can be an official node execution of the near protocol, written in Corrosion. The execution of nearcore uses the actix framework for concurrent and asynchronous digesting. Actix will be ??an Actor-based concurrency design that exchanges information for parallel processing through message passing. When the nearcore node starts, it will begin an http service to process the RPC request of the node; ViewClientActor, ClientActor and PeerManagerActor are also started at the same time to respond to different events: As is seen from the body below, the http assistance mainly makes use of JsonRpcHandler to procedure each request. The primary processing functions of JsonRpcHandler are as follows, when we get a request with a method named "broadcast_tx_commit", we will call the send_tx_commit solution to process:

The core of the send_tx_commit method would be to send a NetworkClientMessages message of the Transaction type to the ClientActor to which it really is bound. In ClientActor, you can see that the message is processed by process_tx: In the course of action_tx method, it'll first check if the transaction is one of the shard it is in: If so, check the validity of the transaction and determine whether you're an active validator, and when it isn't a dynamic validator, you may be handled by another validator. If not, it'll be handled by other nodes. After that, the transactions in the memory pool will undoubtedly be stored on the blockchain through consensus, in order that our contract may also exist on the blockchain. The aforementioned process can refer to the next diagram: The contract calls the view method Following the smart contract is deployed, what goes on when the contract technique is called? Contract view technique and change method The methods of the NEAR smart contract could be split into the view method and the change method. The watch method does not change the state of the blockchain, as the change technique is the opposite, so user authorization is normally required. In myapp/primary.js, the nearlib technique will be called first to produce a reference to the close to node and instantiate the contract technique. In the myapp task, the view technique you want to call will be specified when instantiating-welcome. When instantiating the contract, utilize the loadContract method to generate a contract object: When generating the agreement object, bind the accounts, contract title and specific interface through the structure method: Then, within the processing function right after login, the welcome method defined in the contract is named, and the effect is displayed in the page. When the welcome method is called, the viewFunction bound at instantiation is executed. It can be seen that calling the welcome approach to the contract essentially sends a JsonRpc request with the technique name "query" to the node, the parameter path is "call/$contractId/$methodName", and data may be the methodName parameter. The aforementioned process can refer to the following figure: Node processing watch method Like the aforementioned near processing "broadcast_tx_commit", processing the "query" RPC request will call the query approach to JsonRpcHandler. The core of the query method is to send a Query message to the ViewClientActor bound by JsonRpcHandler for processing. The core of ViewClientActor's processing of Query messages: first query the fragment information where the query content is situated, if that's the case, call its own query (including calling the virtual machine execution method, etc.), or even, path it to additional nodes for processing. The above process can refer to the next diagram: Summary This article analyzes how the Dapp initiates a demand and how the Close to node processes the request through the procedure by creating, deploying, and invoking a straightforward NEAR smart agreement. I am hoping that by elaborating on this process, it could be enlightened to visitors and NEAR technology enthusiasts.
0 notes
Text
300+ TOP Web2py Framework Interview Questions and Answers
Web2py Framework Interview Questions for freshers experienced :-
1. What is Web2py Framework? Web2py is an open source web application framework. It is written in the Python programming language. It allows web developers to design and develop dynamic web application. 2. How can we Install Web2py in different operating system? We can install Web2fy in different operating system by using following code: Operation System Command Unix and Linux python web2py.py OS X open web2py.app Windows web2py.exe 3. What are the protocols supports in Web2py? Web2py supports various protocols like: XML, JSON, RSS, CSV, XMLRPC, JSONRPC, AMFRPC, and SOAP. 4. How to write a hello world program in Web2py? We can write a hello world program by using following code: def hello(): return 'Hello World' 5. Who is the author of Web2py? Massimo Di Pierro developed the author of Web2py. 6. What is the stable version of Web2py? Web2py stable version is 2.14.6 which is released on May 10, 2016. 7. How can we represent MVC (Model-View-Controller) in Web2py? In Web2fy, we can represent MVC (Model-View-Controller) as follows- Model: It includes the logic of application data. It is used to database connections by configuring storage.sqlite files. "db.py" is the model: db = DAL('sqlite://storage.sqlite') db.define_table(employee, Field('name'), Field('phone')) View: View displays the output after the associated controller function is executed. It renders the variables in the dictionary, which is in the form of HTML. It uses {{ and }} delimiters to include the file. {{extend 'layout.html'}}
Manage My Employees
{{=grid}
Controller: It helps to access the functions and modules. It acts as intimidator between Model and View.
def employees():
grid = SQLFORM.grid(db.contact, user_signature = False)
return locals(
8. What are the application components of web2py ?
Web2fy consists of the following components.
Models: It represents data and database tables.
Views: It helps rendering the display of the data.
Controllers: It describes the application logic and workflow.
Languages: describe how to translate strings in the application into various supported languages.
Static files: Do not require processing (e.g. images, CSS style sheets etc).
ABOUT and README: It provide details of the project.
Errors: It stores error reports generated by the application.
Sessions: It stores information related to each particular user.
Databases: It store SQLite databases and additional table information.
Cache: It store cached application items.
Modules: Modules are other optional Python modules.
Private: It includes files are accessed by the controllers but not directly by the developer.
Uploads: Files are accessed by the models but not directly by the developer.
9. What are the databases and their drivers support by Web2py?
Web2py supports following databases and their drivers.
Databases Drivers
SQLite sqlite3 or pysqlite2 or zxJDBC (on Jython)
PostgreSQL psycopg2 or pg8000 or zxJDBC (on Jython)
MySQL pymysql or MySQLdb
Oracle cx_Oracle
MSSQL pyodbc or pypyodbc
FireBird kinterbasdb or fdb or pyodbc
DB2 pyodbc
Informix informixdb
Ingres ingresdbi
Cubrid cubriddb
10. What are the crud Methods of Web2py?
Web2fy crud methods are :
Methods description
crud.tables() It returns a list of tables which is defined in the database.
crud.create(db.tablename) It returns a create form for the table tablename.
crud.read(db.tablename, id) It returns a read-only form for tablename and record id.
crud.delete(db.tablename, id) It is used to deletes the record
crud.select(db.tablename, query) It returns a list of records selected from the table
crud.search(db.tablename) Returns a tuple (form, records) where form is a search form
Web2py Framework Interview Questions
11. Which class is used to send email in Web2py Framework?
In Web2fy Framework, gluon.tools.Mail class is used to send email. The mailer can be defined with this class.
from gluon.tools import Mail
mail = Mail()
mail.settings.server = 'smtp.example.com:25'
mail.settings.sender = '[email protected]'
mail.settings.login = 'username:password'
12. What is the default port of Web2py?
Web2py default port is 8000.
13. What is Postbacks?
A better pattern in web2py is to submit forms to the same action, which generates them. This mechanism is called as “postback” which is the main feature of web2py. In short, self-submission is achieved in postback.
14. How can we create a model?
We can create a model by using following code :
db.define_table('company', Field('name', notnull = True, unique = True), format = '%(name)s')
db.define_table(
'contact',
Field('name', notnull = True),
Field('company', 'reference company'),
Field('picture', 'upload'),
Field('email', requires = IS_EMAIL()),
Field('phone_number', requires = IS_MATCH('+')),
Field('address'),
format = '%(name)s'
)
db.define_table(
'log',
Field('body', 'text', notnull = True),
Field('posted_on', 'datetime'),
Field('contact', 'reference contact')
)
15. Describe the workflow of Web2py?
Web2py workflow are given below :
The web server manages HTTP requests simultaneously in its own thread.
The HTTP request header is passed to the dispatcher.
The dispatcher manages the application requests and map the PATH_INFO in the URL of the function call. Every function call is represented in the URL.
All the requests for files included in the static folder are managed directly, and large file are streamed to the client.
Requests for anything but a static file are mapped into an action.
If the request header contains a session cookie for the app, the session object is retrieved; or else, a session id is created.
If the action returns a value as string, this is returned to the client.
If the action returns an iterable, it is used to loop and stream the data to the client.
16. What are the features of Web2py?
Web2py features are:
It is easy to learn.
It is portable.
It has standard library that supports many task.
17. What is the I/O functions in Web2py?
There are various I/O functions in Web2py that are given below.
open(): It helps to open a file or document
write(): It helps to write a string in file or document
read(): It helps to read the content in existing file
close(): This method closes the file object.
18. What is CRON in Web2py?
In Web2py, CRON gives the ability to run the task within the specified interval of the time.
19. What is RBAC in Web2py?
In Web2py, RBAC stands for Role Based Access Control. It is an approach to restricting system access to authorized used.
20. Which method is used to send an email in Web2py?
In Web2py, mail.send() method is used to send an email.
21. What are the protocols used in Web2py?
There are various protocols used in Web2py:
XML
JSON
RSS
CVC
SOAP etc.
22. Does Web2py support multiple database?
Yes, Web2py supports multiple database.
23. What is the use of DAL object?
DAL object is used to represents a database connection.
Example: db = DAL('sqlite://storage.sqlite')
24. How can we disable all the table in Web2py?
In Web2py, Migration is used to disable all the table.
Example:
db = DAL(..., migrate_enabled=False)
25. Is it possible to skip the GUI and start Web2py directory?
Yes, by using command line.
Example: python web2py.py -a 'your password' -i 127.0.0.1 -p 8000
26. What is the process to send SMS?
The following code is used to send SMS:
from gluon.contrib.sms_utils
import SMSCODES, sms_email
email = sms_email('1 (111) 111-1111','T-Mobile USA (abc)')
mail.send(to = email, subject = 'test', message = 'test')
27. In which language Web2py was written?
Web2py was written in Python language.
28. What is Nginx?
Nigix is a free, open-source web server. It is used to configure file.
29. How can we delete the records?
We can delete the records by using following code:
crud.delete(db.tablename, id)
30. Which tag is used to escape python code embedded in HTML?
Web2py uses {{…}} tag to escape python code embedded in HTML. Web2py Questions and Answers Pdf Download Read the full article
0 notes
Text
Ethereum Baru Saja Lolos dari Serangan Hacker Terkejam di Dunia!
Laporan terbaru Parity Technologies menunjukkan bahwa lebih dari 5.000 perangkat yang dijalankan Ethereum berada dalam bahaya serangan berbahaya tingkat tinggi – perusahaan mengumumkan berita itu di Twitter beberapa saat yang lalu.
Jaringan Ethereum mendapat bahaya
Baru-baru ini, Parity Technologies menerima laporan bahwa mulai bulan Desember 2018, para peretas mulai melakukan pemindaian besar-besaran terhadap jaringan Ethereum untuk mencari celah keamanan yang serius. Mereka menemukan satu, dan ini sudah membahayakan sekitar 5.000 perangkat. Parity adalah platform berbasis Ethereum yang populer, dan lebih dari setahun yang lalu platform ini telah mengalami kesulitan yang mengakibatkan hilangnya dana besar – sekitar 514.000 ETH dimasukkan dalam karantina. Ukuran yang memungkinkan pengambilan dana yang tidak bebas ditolak selama pemungutan suara pada bulan April 2018. Situasi saat ini menjadi jelas pada 3 Februari, ketika perusahaan menerima beberapa pemberitahuan peringatan.
Kerusakan Node ETH besar-besaran masih dapat dihindari
Butuh beberapa jam bagi Parity untuk membuat tambalan supaya bug menghilangkan dari Node. Namun, node ETH masih bekerja pada versi perangkat lunak yang tidak dilindungi. Tim Parity mendesak semua node untuk menginstal versi perangkat lunak yang ditingkatkan sesegera mungkin.

Di antara platform yang terpengaruh adalah yang berjalan di JSONRPC: MyEtherWallet, MyCrypto, dan Infura. Read the full article
0 notes
Text
В сети Ethereum обнаружена уязвимость

Работа платформы Виталика Бутерина оказалась под угрозой, пользователей попросили обновить программное обеспечение Разработчики блокчейн-стартапа Parity Technologies обнаружили ошибку в сети криптовалюты Ethereum. Хакеры могли нарушить работу всей экосистемы, под угрозой оказались сервисы, использующие протокол JSONRPC: MyEtherWallet, MyCrypto, Infura и другие. https://twitter.com/ParityTech/status/1092072449607372800 Эксперты пояснили, что неполадка уже исправлена, ей не успели воспользоваться злоумышленники, а средства пользователей находятся в безопасности. Для уменьшения риска нарушений в работе сети и потери доступа к децентрализованным приложениям специалисты порекомендовали как можно быстрее обновить ноды с помощью новой версии ПО. В декабре 2018 г. хакеры начали атаковать блокчейн Ethereum: они массово сканируют сеть криптовалюты в поисках уязвимого оборудования для майнинга и электронных кошельков. Под угрозой находится около 4700 устройств. Источник: РБК Read the full article
0 notes
Text
2 new repositories joined the Monero Ecosystem project: python-monerorpc and monero-wallet-java!
[ad_1]

[Python-monerorpc](https://github.com/monero-ecosystem/python-monerorpc), an improved version of python-jsonrpc for Monero and [monero-wallet-java](https://github.com/monero-ecosystem/monero-java-rpc), a Java interface for managing the Monero wallet, [just joined](https://github.com/monero-ecosystem/meta/pull/13) the Monero Ecosystem family! New tools to play with for our developers!
View On WordPress
0 notes
Text
The World’s First ERC-20 and Bitcoin Atomic Swap Has Taken Place
The World’s First ERC-20 and Bitcoin Atomic Swap Has Taken Place
At the December 7, 2018, TenX Summit, a group of developers showcased an industry first: an atomic swap between a non-native asset, TenX’s PAY token, and a native asset, bitcoin.
By non-native, the team is referring to an asset/coin that is not the base currency for the network. For Ethereum, for example, the native asset is ether, while any token that is built on the protocol is considered a non-native asset.
CoBloX, a TenX research and development lab, is responsible for the achievement. Demonstrating their work to a tightly packed audience of summit goers, the team used the Lightning Network and their proprietary software COMIT to swap 10 PAY for 71,240 satoshis. The team published a blog post on December 12, 2018, to confirm the news and satify what it calls “the gossip factory” of he-said-she-said following the summit.
In the post, the team delves into their process, explaining outright that this swap was not as simple as the first-ever ether and bitcoin atomic swap they tested nearly six months ago. Whereas this swap’s hashed time lock contract (HTLC) only required a single use smart contract, the PAY to bitcoin swap took an extra step.
Reason being, the PAY token itself is managed with an additional smart contract known as the transfer ownership function. Because of this, the HTLC had to be separated into two transactions: one to deploy the swap contract and another as a transfer call for the PAY tokens.
“Unfortunately, we couldn’t figure out how to combine these two steps. The ERC20 transfer function uses msg.sender for authentication. However, calling transfer from a contract deployment sets msg.sender to the address of the yet-to-be-deployed contract which obviously has no tokens,” the blog post reads.
Having used the Lightning Network Daemon (LND) implementation for the swap, the team continues to explain in the blog post that the swap is a one-way ticket. They could only execute the trade by starting with the ERC-20 token and going through Lightning — not the other way around.
“An atomic swap cannot always be expressed through this model of invoices and payments. In LND, which is what we used for our PoC, receiving a payment requires an invoice which requires knowledge of the secret. As a result, we were only able to do ERC20 to Lightning and not the other way around.”
The technical milestone is the latest in CoBloX’s technical successes. As mentioned previously, the team also completed the world’s first ether and bitcoin swap. The young lab’s GitHub also features a couple of Rust clients for a Bitcoin Core interface and a JsonRPC API plug-in, as well as a tool for testing blockchain applications.
COMIT, the software used in the ERC-20 swap, is also open-source. With a focus on blockchain interoperability, COMIT is meant to act as a bridge between networks to facilitate cross-chain asset swaps. In addition to the work that has been done with Ethereum and its ERC-20 tokens, the team plans to expand its use with additional features and currencies down the road.
Original Source https://ift.tt/2PyDsUN
0 notes
Text
Today’s guide will be on the installation and configuration of FreeIPA Server on Rocky Linux 8 system. FreeIPA is an open source solution that provide a unified and centralized way to manage authentication, policies, identity stores, and authorization policies in a Linux-based domain. The solution is created to reduce the overhead for Linux Administrators in management of different systems and services individually in the Infrastructure. With FreeIPA Identity Management solution, System Administrators can set different access levels for users by using host-based access control, delegation, and other rules. FreeIPA is one of the few centralized policy, identity, and authorization free to use software solutions fit for enterprise use. This software solution has some advanced features and support for: Large groups of Linux machines Native integration with Windows Active Directory Advanced features of Linux operating system environments Full multi master replication for higher redundancy and scalability Provision of extensible management interfaces (Web UI, CLI, XMLRPC and JSONRPC API) and Python SDK In this short article we’ll be performing the installation and configuration of FreeIPA on Rocky Linux 8. We’re performing this setup on a freshly installed Rocky Linux 8 server. As IPA services ports could conflict with other Linux services, it is recommended to perform the installation on a new system. Key Benefits of using FreeIPA Central Authentication Management – Centralized management of users, machines, and services within large Linux/Unix enterprise environments. Fine-grained Access Control: Provides a clear method of defining access control policies to govern user identities and delegation of administrative tasks. One Time Password (OTP): Provides a popular method for achieving two-factor authentication (2FA). Direct Connect to Active Directory: You can retrieve information from Active Directory (AD) and join a domain or realm in a standard way. Active Directory Cross-Realm Trust: As System Administrator, you can establish cross-forest Kerberos trusts with Microsoft Active Directory. This allows external Active Directory (AD) users convenient access to resources in the Identity Management domain. Integrated Public Key Infrastructure (PKI) Service: This provides PKI services that sign and publish certificates for hosts and services, Certificate Revocation List (CRL) and OCSP services for software validating the published certificate, and an API to request, show, and find certificates. Step 1: Set hostname, Timezone, Update System Let’s start with correct configuration of the system hostname. sudo hostnamectl set-hostname idm.example.com The host name must be a fully qualified domain name, such as idm.example.com. Once the hostname has been configured set system timezone to match your region: sudo timedatectl set-timezone Africa/Nairobi sudo timedatectl set-local-rtc 0 Confirm your settings: $ timedatectl Local time: Fri 2021-07-16 21:28:38 EAT Universal time: Fri 2021-07-16 18:28:38 UTC RTC time: Fri 2021-07-16 18:28:38 Time zone: Africa/Nairobi (EAT, +0300) System clock synchronized: yes NTP service: active RTC in local TZ: no Step 2: Check FreeIPA installation requirements FreeIPA server comprises of the following key components as its building blocks MIT Kerberos KDC – Provides Single-Sign-on authentication solution 389 Directory Server – Main data store and provides a full multi-master LDAPv3 directory infrastructure. Dogtag Certificate System – This component provides CA & RA used for certificate management functions. ISC Bind DNS server – Bind is the default Domain name resolution service in FreeIPA. Web UI / CLI Interface– Used to centrally manage access control, the delegation of administrative tasks and other network administration tasks. NTP Server – For time synchronization across fleet of nodes joined to the domain
Here are the minimum hardware requirements for installing FreeIPA Server on Rocky Linux 8: Minimum 4GB memory Minimum of 2 vCPUs A fully qualified domain name used as idM domain – should be resolvable from DNS server configured in the system Minimum of 10 GB Disk space availability You can check the hardware requirements by using the commands below: # CPU Cores $ lcpu # Memory check $ free -h # Disk space $ lsblk -fp Edit /etc/hosts file and add server’s IP address and matching hostnam: $ sudo vi /etc/hosts 192.168.10.6 idm.example.com Confirm that all the requirement are met then proceed to install FreeIPA Server on Rocky Linux 8. Confirm that the hostname does not resolve to the loopback address, but only to the system’s public IP address. dig +short server.idm.example.com A Verify the reverse DNS configuration (PTR records) is set correctly in your DNS Server using dig command: $ dig +short -x Below is a list of ports used by IPA IdM to communicate with the services: Additionally, ports 8080, 8443, and 749 must be free as they are used internally. Step 3: Install FreeIPA Server on Rocky Linux 8 Next we perform the installation of FreeIPA packages on Rocky Linux 8 server. No extra RPM repository is required, all the packages and dependencies are available in default OS default repositories. Upgrade and reboot the system sudo yum -y update sudo reboot In EL8 based systems,the packages necessary for installing FreeIPA server are shipped in a module stream called the DL1 stream. You’ll need to enable the stream before performing packages installation from the stream. You can use the following command to list modules that contain IdM packages. $ sudo yum module list idm Rocky Linux 8 - AppStream 23 MB/s | 7.8 MB 00:00 Rocky Linux 8 - BaseOS 8.0 MB/s | 3.5 MB 00:00 Rocky Linux 8 - Extras 21 kB/s | 3.8 kB 00:00 Rocky Linux 8 - AppStream Name Stream Profiles Summary idm DL1 adtrust, client, common [d], dns, server The Red Hat Enterprise Linux Identity Management system module idm client [d] common [d] RHEL IdM long term support client module Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled As seen from the output DL1 is the system Identity Management module. More information on the module can be checked using the command: sudo dnf module info idm:DL1 Enable the idm:DL1 stream: sudo yum module enable idm:DL1 Example output: Rocky Linux 8 - AppStream 8.6 MB/s | 8.0 MB 00:00 Rocky Linux 8 - BaseOS 15 MB/s | 4.5 MB 00:00 Rocky Linux 8 - Extras 18 kB/s | 3.8 kB 00:00 Dependencies resolved. ================================================================================================================================================================== Package Architecture Version Repository Size ================================================================================================================================================================== Enabling module streams: 389-ds 1.4
httpd 2.4 idm DL1 pki-core 10.6 pki-deps 10.6 Transaction Summary ================================================================================================================================================================== Is this ok [y/N]: y Complete! Switch to the RPMs delivered through the idm:DL1 stream: sudo yum distro-sync Choose one of the following options, depending on your IdM requirements: Installing IdM server without an integrated DNS: sudo yum module install idm:DL1/server Installing FreeIPA server with an integrated DNS: sudo yum module install idm:DL1/dns Installing FreeIPA server that has a trust agreement with Active Directory: sudo yum module install idm:DL1/adtrust For multiple profiles, e.g dns and adtrust profiles: sudo yum module install idm:DL1/dns,adtrust For FreeIPA client sudo yum module install idm:DL1/client Run FreeIPA Server installer We can now run the ipa-server-install utility. The installer script will create a log file at /var/log/ipaserver-install.log: sudo ipa-server-install The script prompts for several required settings and offers recommended default values in brackets. To accept a default value, press Enter. To provide a custom value, enter the required value. For Non-interactive installation for IdM without DNS: sudo ipa-server-install --realm EXAMPLE.COM \ --ds-password DM_password \ --admin-password admin_password \ --unattended # OR sudo ipa-server-install \ --domain example.com \ --realm EXAMPLE.COM \ --ds-password DM_password \ --admin-password admin_password The minimum required options for non-interactive installation are: --realm to provide the Kerberos realm name --ds-password to provide the password for the Directory Manager (DM), the Directory Server super user --admin-password to provide the password for admin, the IdM administrator --unattended to let the installation process select default options for the host name and domain name Non-interactive installation for IdM with integrated DNS: sudo ipa-server-install --domain example.com --realm EXAMPLE.COM \ --reverse-zone=10.168.192.in-addr.arpa. \ --no-forwarders \ --no-ntp \ --setup-dns \ --ds-password DM_password \ --admin-password admin_password \ --unattended Interactive installation Here is the extraction from my installation: $ sudo ipa-server-install The log file for this installation can be found in /var/log/ipaserver-install.log ============================================================================== This program will set up the IPA Server. Version 4.9.2 This includes: * Configure a stand-alone CA (dogtag) for certificate management * Configure the NTP client (chronyd) * Create and configure an instance of Directory Server * Create and configure a Kerberos Key Distribution Center (KDC) * Configure Apache (httpd) * Configure the KDC to enable PKINIT To accept the default shown in brackets, press the Enter key. Do you want to configure integrated DNS (BIND)? [no]: no Enter the fully qualified domain name of the computer on which you're setting up server software. Using the form . Example: master.example.com. Server host name [idm.example.com]: idm.example.com The domain name has been determined based on the host name. Please confirm the domain name [example.com]: example.com The kerberos protocol requires a Realm name to be defined. This is typically the domain name converted to uppercase. Please provide a realm name [EXAMPLE.COM]: EXAMPLE.COM Certain directory server operations require an administrative user. This user is referred to as the Directory Manager and has full access
to the Directory for system management tasks and will be added to the instance of directory server created for IPA. The password must be at least 8 characters long. Directory Manager password: Password (confirm): The IPA server requires an administrative user, named 'admin'. This user is a regular system account used for IPA server administration. IPA admin password: Password (confirm): Do you want to configure chrony with NTP server or pool address? [no]: yes Enter NTP source server addresses separated by comma, or press Enter to skip: 0.de.pool.ntp.org,1.de.pool.ntp.org Enter a NTP source pool address, or press Enter to skip: The IPA Master Server will be configured with: Hostname: idm.example.com IP address(es): 192.168.10.6 Domain name: example.com Realm name: EXAMPLE.COM The CA will be configured with: Subject DN: CN=Certificate Authority,O=EXAMPLE.COM Subject base: O=EXAMPLE.COM Chaining: self-signed NTP server: 0.de.pool.ntp.org NTP server: 1.de.pool.ntp.org Continue to configure the system with these values? [no]: yes The following operations may take some minutes to complete. Please wait until the prompt is returned. Disabled p11-kit-proxy Synchronizing time Configuration of chrony was changed by installer. Attempting to sync time with chronyc. Process chronyc waitsync failed to sync time! Unable to sync time with chrony server, assuming the time is in sync. Please check that 123 UDP port is opened, and any time server is on network. Warning: IPA was unable to sync time with chrony! Time synchronization is required for IPA to work correctly Configuring directory server (dirsrv). Estimated time: 30 seconds [1/41]: creating directory server instance [2/41]: tune ldbm plugin ..... Successful installation command output: ...... Sudoers I/O plugin version 1.8.29 Client hostname: idm.example.com Realm: EXAMPLE.COM DNS Domain: example.com IPA Server: idm.example.com BaseDN: dc=example,dc=com Configured sudoers in /etc/authselect/user-nsswitch.conf Configured /etc/sssd/sssd.conf Systemwide CA database updated. Adding SSH public key from /etc/ssh/ssh_host_ecdsa_key.pub Adding SSH public key from /etc/ssh/ssh_host_ed25519_key.pub Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub Could not update DNS SSHFP records. SSSD enabled Configured /etc/openldap/ldap.conf Configured /etc/ssh/ssh_config Configured /etc/ssh/sshd_config Configuring example.com as NIS domain. Client configuration complete. The ipa-client-install command was successful Please add records in this file to your DNS system: /tmp/ipa.system.records.hh7e7u2h.db ============================================================================== Setup complete Next steps: 1. You must make sure these network ports are open: TCP Ports: * 80, 443: HTTP/HTTPS * 389, 636: LDAP/LDAPS * 88, 464: kerberos UDP Ports: * 88, 464: kerberos * 123: ntp 2. You can now obtain a kerberos ticket using the command: 'kinit admin' This ticket will allow you to use the IPA tools (e.g., ipa user-add) and the web user interface. Be sure to back up the CA certificates stored in /root/cacert.p12 These files are required to create replicas. The password for these files is the Directory Manager password The ipa-server-install command was successful If you have firewalld running then allow the the following services and ports in the default zone: # Without integrated DNS sudo firewall-cmd --permanent --add-service=ntp,freeipa-4 # With DNS sudo firewall-cmd --permanent --add-service=ntp,dns,freeipa-4 Then reload firewalld configuration for the change to take effect immediately: sudo firewall-cmd --reload sudo firewall-cmd --list-all Step 4: Access FreeIPA Management Dashboard After installation FreeIPA Server web-based administration console can be accessed using the server hostname on https: https://idm.example.com
Ignore SSL warning by clicking “Advanced” > “Proceed to idm.example.com (unsafe)“ Login with admin username and password set during installation. Upon successful login you’re presented with an interface that has such a look: Step 5: Secure FreeIPA Server With Let’s Encrypt SSL Certificate After installation we recommend using secure SSL on your FreeIPA Server. If running on a public instance follow our guide in the next link: Secure FreeIPA Server With Let’s Encrypt SSL Certificate Step 6: Using CLI Interface to Manage FreeIPA Server The ipa command can be used to perform all FreeIPA server operations. But first, get admin user Kerberos ticket: $ sudo kinit admin Password for [email protected]: Check ticket expiry information using klist. $ sudo klist Ticket cache: KCM:0 Default principal: [email protected] Valid starting Expires Service principal 08/02/2021 17:42:38 08/03/2021 17:42:31 krbtgt/[email protected] Set user’s default shell to /bin/bash. $ sudo ipa config-mod --defaultshell=/bin/bash Maximum username length: 32 Home directory base: /home Default shell: /bin/bash Default users group: ipausers Default e-mail domain: example.com Search time limit: 2 Search size limit: 100 User search fields: uid,givenname,sn,telephonenumber,ou,title Group search fields: cn,description Enable migration mode: FALSE Certificate Subject base: O=EXAMPLE.COM Password Expiration Notification (days): 4 Password plugin features: AllowNThash, KDC:Disable Last Success SELinux user map order: guest_u:s0$xguest_u:s0$user_u:s0$staff_u:s0-s0:c0.c1023$unconfined_u:s0-s0:c0.c1023 Default SELinux user: unconfined_u:s0-s0:c0.c1023 Default PAC types: MS-PAC, nfs:NONE IPA masters: ipa.example.com IPA CA servers: ipa.example.com IPA CA renewal master: ipa.example.com IPA master capable of PKINIT: ipa.example.com Test by adding a user account and listing accounts present: $ sudo ipa user-add test --first=Test --last=User \ [email protected] --password Password: Enter Password again to verify: ------------------- Added user "test" ------------------- User login: test First name: Test Last name: User Full name: Test User Display name: Test User Initials: TU Home directory: /home/test GECOS: Test User Login shell: /bin/bash Principal name: [email protected] Principal alias: [email protected] User password expiration: 20210802153038Z Email address: [email protected] UID: 1201400001 GID: 1201400001 Password: True Member of groups: ipausers Kerberos keys available: True To list user accounts added, run: $ sudo ipa user-find --------------- 2 users matched --------------- User login: admin Last name: Administrator Home directory: /home/admin Login shell: /bin/bash Principal alias: [email protected] UID: 1201400000 GID: 1201400000 Account disabled: False User login: test First name: Test Last name: User Home directory: /home/test Login shell: /bin/bash Principal name: [email protected] Principal alias: [email protected] Email address: [email protected] UID: 1201400001 GID: 1201400001 Account disabled: False ---------------------------- Number of entries returned 2 ---------------------------- Try to login as testuser. On your first log in, you’ll be asked to change your password: $ ssh test@localhost Password: Password expired. Change your password now. Current Password: New password: 90 days You can play with the interface to understand placement of various FreeIPA management functions. In the guides to follow we cover usage examples – how FreeIPA server can help in Infrastructure-wide user, groups, hosts and policy management. Stay connected for updates.
0 notes
Text
The World’s First ERC-20 and Bitcoin Atomic Swap Has Taken Place
The World’s First ERC-20 and Bitcoin Atomic Swap Has Taken Place
At the December 7, 2018, TenX Summit, a group of developers showcased an industry first: an atomic swap between a non-native asset, TenX’s PAY token, and a native asset, bitcoin.
By non-native, the team is referring to an asset/coin that is not the base currency for the network. For Ethereum, for example, the native asset is ether, while any token that is built on the protocol is considered a non-native asset.
CoBloX, a TenX research and development lab, is responsible for the achievement. Demonstrating their work to a tightly packed audience of summit goers, the team used the Lightning Network and their proprietary software COMIT to swap 10 PAY for 71,240 satoshis. The team published a blog post on December 12, 2018, to confirm the news and satify what it calls “the gossip factory” of he-said-she-said following the summit.
In the post, the team delves into their process, explaining outright that this swap was not as simple as the first-ever ether and bitcoin atomic swap they tested nearly six months ago. Whereas this swap’s hashed time lock contract (HTLC) only required a single use smart contract, the PAY to bitcoin swap took an extra step.
Reason being, the PAY token itself is managed with an additional smart contract known as the transfer ownership function. Because of this, the HTLC had to be separated into two transactions: one to deploy the swap contract and another as a transfer call for the PAY tokens.
“Unfortunately, we couldn’t figure out how to combine these two steps. The ERC20 transfer function uses msg.sender for authentication. However, calling transfer from a contract deployment sets msg.sender to the address of the yet-to-be-deployed contract which obviously has no tokens,” the blog post reads.
Having used the Lightning Network Daemon (LND) implementation for the swap, the team continues to explain in the blog post that the swap is a one-way ticket. They could only execute the trade by starting with the ERC-20 token and going through Lightning — not the other way around.
“An atomic swap cannot always be expressed through this model of invoices and payments. In LND, which is what we used for our PoC, receiving a payment requires an invoice which requires knowledge of the secret. As a result, we were only able to do ERC20 to Lightning and not the other way around.”
The technical milestone is the latest in CoBloX’s technical successes. As mentioned previously, the team also completed the world’s first ether and bitcoin swap. The young lab’s GitHub also features a couple of Rust clients for a Bitcoin Core interface and a JsonRPC API plug-in, as well as a tool for testing blockchain applications.
COMIT, the software used in the ERC-20 swap, is also open-source. With a focus on blockchain interoperability, COMIT is meant to act as a bridge between networks to facilitate cross-chain asset swaps. In addition to the work that has been done with Ethereum and its ERC-20 tokens, the team plans to expand its use with additional features and currencies down the road.
Original Source https://ift.tt/2PyDsUN
0 notes