【DataSophon】DataSophon1.2.1 ranger usersync整合

 目录

一、简介

二、实现步骤

2.1 ranger-usersync包下载编译

2.2 构建压缩包

2.3 编辑元数据文件

2.4 修改源码

三、重新安装


一、简介


如下是DDP1.2.1默认有的rangerAdmin, 我们需要将rangerusersync整合进来 ,实现将Linux机器上的用户和组信息同步到RangerAdmin的数据库中进行管理。


二、实现步骤


2.1 ranger-usersync包下载编译


ranger官网tar包下载

https://ranger.apache.org/download.html

自己编译 或者网上下载

参考文章:

Apache Ranger - Download Apache Ranger?

Ranger安装和使用-CSDN博客

https://juejin.cn/post/6844904159930482696

https://zhuanlan.zhihu.com/p/562012618

权限管理Ranger详解_大数据权限管理利器 - ranger-CSDN博客

2.2 构建压缩包


将ranger-usersync安装包集成到ranger组件中重新打包,如下是ranger admin包和ranger-usersync包。

# 解压ranger组件原有包
tar -zxvf ranger-2.1.0.tar.gz
cd ranger-2.1.0# 将编译好的的sync安装包解压到当前目录
tar -zxvf ranger-2.1.0-usersync.tar.gz ./
cd ranger-2.1.0-usersync
vim ranger_usersync.sh
#!/bin/bash# 获取脚本当前目录
current_path=$(dirname "$0")# 使用说明
usage="Usage: $0 {start|stop|status|restart}"start(){echo "ranger userSync start"sh "$current_path/ranger-usersync" startif [ $? -eq 0 ]; thenecho "ranger userSync start success"elseecho "ranger userSync start failed"exit 1fi
}stop(){echo "ranger userSync stop"sh "$current_path/ranger-usersync" stopif [ $? -eq 0 ]; thenecho "ranger userSync stop success"elseecho "ranger userSync stop failed"exit 1fi
}status(){process_name="UnixAuthenticationService"# 使用 pgrep 命令检测进程是否存在pgrep -f "$process_name" > /dev/nullif [ $? -eq 0 ]; thenecho "进程 $process_name 存在"exit 0elseecho "进程 $process_name 不存在"exit 1fi
}restart(){echo "ranger userSync restart"sh "$current_path/ranger-usersync" restartif [ $? -eq 0 ]; thenecho "ranger userSync restart success"elseecho "ranger userSync restart failed"exit 1fi
}# 处理参数
startStop=$1case $startStop instart)start;;stop)stop;;status)status;;restart)restart;;*)echo "$usage"exit 1;;
esacecho "End $startStop ranger userSync"

打包

tar -zcvf ranger-2.1.0.tar.gz ranger-2.1.0
md5sum ranger-2.1.0.tar.gz
echo '756fa828e02d8f890ca2165d237ef487' > ranger-2.1.0.tar.gz.md5
cp ranger-2.1.0.tar.gz ranger-2.1.0.tar.gz.md5 /opt/datasophon/DDP/packages/

2.3 编辑元数据文件


ranger安装配置文件

vim /opt/datasophon/DDP/packages/datasophon-manager-1.2.1/conf/meta/DDP-1.2.1/RANGER/service_ddl.json
{"name": "RANGER","label": "Ranger","description": "权限控制框架","version": "2.1.0","sortNum": 10,"dependencies":[],"packageName": "ranger-2.1.0.tar.gz","decompressPackageName": "ranger-2.1.0","roles": [{"name": "RangerAdmin","label": "RangerAdmin","roleType": "master","cardinality": "1","logFile": "/var/log/ranger/admin/ranger-admin-${host}-root.log","jmxPort": 6081,"sortNum": 1,"startRunner": {"timeout": "60","program": "bin/ranger_admin.sh","args": ["start"]},"stopRunner": {"timeout": "600","program": "bin/ranger_admin.sh","args": ["stop"]},"statusRunner": {"timeout": "60","program": "bin/ranger_admin.sh","args": ["status"]},"externalLink": {"name": "RangerAdmin Ui","label": "RangerAdmin Ui","url": "http://${host}:6080"}},{"name": "RangerUsersync","label": "RangerUsersync","roleType": "master","runAs": {"user": "root","group": "root"},"cardinality": "1","logFile": "ranger-2.1.0-usersync/logs/usersync-${host}-ranger.log","jmxPort": "","sortNum": 2,"startRunner": {"timeout": "60","program": "ranger-2.1.0-usersync/ranger_usersync.sh","args": ["start"]},"stopRunner": {"timeout": "600","program": "ranger-2.1.0-usersync/ranger_usersync.sh","args": ["stop"]},"statusRunner": {"timeout": "60","program": "ranger-2.1.0-usersync/ranger_usersync.sh","args": ["status"]},"restartRunner": {"timeout": "60","program": "ranger-2.1.0-usersync/ranger_usersync.sh","args": ["restart"]}}],"configWriter": {"generators": [{"filename": "install.properties","configFormat": "custom","templateName": "ranger-install.ftl","outputDirectory": "","includeParams": ["rootPassword","dbHost","database","rangerUser","rangerPassword","rangerAdminUrl","enableHDFSPlugin","enableHIVEPlugin","enableHBASEPlugin","spnegoPrincipal","spnegoKeytab","adminPrincipal","adminKeytab","hadoopHome","rangerHome"]},{"filename": "install.properties1","configFormat": "custom","templateName": "ranger-usersync-install.ftl","outputDirectory": "ranger-2.1.0-usersync","includeParams": ["rangerAdminUrl","adminPrincipal","adminKeytab","hadoopHome","syncInterval"]}]},"parameters": [{"name": "rootPassword","label": "数据库root用户密码","description": "","required": true,"configType": "map","type": "input","value": "","configurableInWizard": true,"hidden": false,"defaultValue": "123456"},{"name": "dbHost","label": "数据库地址","description": "","required": true,"configType": "map","type": "input","value": "","configurableInWizard": true,"hidden": false,"defaultValue": "${apiHost}"},{"name": "database","label": "数据库名","description": "","required": true,"configType": "map","type": "input","value": "","configurableInWizard": true,"hidden": false,"defaultValue": "ranger"},{"name": "rangerUser","label": "Ranger数据库用户","description": "","required": true,"configType": "map","type": "input","value": "","configurableInWizard": true,"hidden": false,"defaultValue": "ranger"},{"name": "rangerPassword","label": "Ranger数据库密码","description": "","required": true,"configType": "map","type": "input","value": "","configurableInWizard": true,"hidden": false,"defaultValue": "ranger"},{"name": "rangerAdminUrl","label": "Ranger访问地址","description": "","required": true,"configType": "map","type": "input","value": "","configurableInWizard": true,"hidden": false,"defaultValue": "${rangerAdminUrl}"},{"name": "enableHDFSPlugin","label": "启用HDFS Ranger插件","description": "","required": true,"type": "switch","value": false,"configurableInWizard": true,"hidden": false,"defaultValue": false},{"name": "enableHIVEPlugin","label": "启用Hive Ranger插件","description": "","required": true,"type": "switch","value": false,"configurableInWizard": true,"hidden": false,"defaultValue": false},{"name": "enableHBASEPlugin","label": "启用Hbase Ranger插件","description": "","required": true,"type": "switch","value": false,"configurableInWizard": true,"hidden": false,"defaultValue": false},{"name": "enableKerberos","label": "开启Kerberos认证","description": "开启Kerberos认证","required": false,"type": "switch","value": false,"configurableInWizard": true,"hidden": true,"defaultValue": false},{"name": "spnegoPrincipal","label": "Spnego Principal","description": "","configWithKerberos": true,"required": false,"configType": "map","type": "input","value": "HTTP/${host}@HADOOP.COM","configurableInWizard": true,"hidden": true,"defaultValue": "HTTP/${host}@HADOOP.COM"},{"name": "spnegoKeytab","label": "Spnego Keytab","description": "","configWithKerberos": true,"required": false,"configType": "map","type": "input","value": "/etc/security/keytab/spnego.service.keytab","configurableInWizard": true,"hidden": true,"defaultValue": "/etc/security/keytab/spnego.service.keytab"},{"name": "adminPrincipal","label": "Ranger Admin Principal","description": "","configWithKerberos": true,"required": false,"configType": "map","type": "input","value": "rangeradmin/${host}@HADOOP.COM","configurableInWizard": true,"hidden": true,"defaultValue": "rangeradmin/${host}@HADOOP.COM"},{"name": "adminKeytab","label": "Ranger Admin Keytab","description": "","configWithKerberos": true,"required": false,"configType": "map","type": "input","value": "/etc/security/keytab/rangeradmin.keytab","configurableInWizard": true,"hidden": true,"defaultValue": "/etc/security/keytab/rangeradmin.keytab"},{"name": "hadoopHome","label": "HADOOP_HOME","description": "","configWithKerberos": true,"required": true,"configType": "map","type": "input","value": "${HADOOP_HOME}","configurableInWizard": true,"hidden": true,"defaultValue": "${HADOOP_HOME}"},{"name": "rangerHome","label": "RANGER_HOME","description": "","required": true,"configType": "map","type": "input","value": "${RANGER_HOME}","configurableInWizard": true,"hidden": false,"defaultValue": "${RANGER_HOME}"},{"name": "syncInterval","label": "SYNC_INTERVAL","description": "userSync同步间隔时间,单位(分钟)","required": true,"configType": "map","type": "input","value": "1","configurableInWizard": true,"hidden": false,"defaultValue": "1"}]
}

各worker元数据文件,已部署的路径:

vim /opt/datasophon/datasophon-worker/conf/templates/ranger-usersync-install.ftl

ranger配置文件 install.properties ,使用了 SYNC_SOURCE = unix

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.# The base path for the usersync process
ranger_base_dir = /etc/ranger#
# The following URL should be the base URL for connecting to the policy manager web application
# For example:
#
#  POLICY_MGR_URL = http://policymanager.xasecure.net:6080
#
POLICY_MGR_URL = ${rangerAdminUrl}# sync source,  only unix and ldap are supported at present
# defaults to unix
SYNC_SOURCE = unix#
# Minimum Unix User-id to start SYNC.
# This should avoid creating UNIX system-level users in the Policy Manager
#
MIN_UNIX_USER_ID_TO_SYNC = 500# Minimum Unix Group-id to start SYNC.
# This should avoid creating UNIX system-level users in the Policy Manager
#
MIN_UNIX_GROUP_ID_TO_SYNC = 500# sync interval in minutes
# user, groups would be synced again at the end of each sync interval
# defaults to 5   if SYNC_SOURCE is unix
# defaults to 360 if SYNC_SOURCE is ldap
SYNC_INTERVAL = ${syncInterval}#User and group for the usersync process
unix_user=ranger
unix_group=ranger#change password of rangerusersync user. Please note that this password should be as per rangerusersync user in ranger
rangerUsersync_password=admin123#Set to run in kerberos environment
usersync_principal=<#if adminPrincipal??>${adminPrincipal}</#if>
usersync_keytab=<#if adminKeytab??>${adminKeytab}</#if>
hadoop_conf=${hadoopHome}/etc/hadoop/conf
#
# The file where all credential is kept in cryptic format
#
CRED_KEYSTORE_FILENAME=/etc/ranger/usersync/conf/rangerusersync.jceks# SSL Authentication
AUTH_SSL_ENABLED=false
AUTH_SSL_KEYSTORE_FILE=/etc/ranger/usersync/conf/cert/unixauthservice.jks
AUTH_SSL_KEYSTORE_PASSWORD=UnIx529p
AUTH_SSL_TRUSTSTORE_FILE=
AUTH_SSL_TRUSTSTORE_PASSWORD=# ---------------------------------------------------------------
# The following properties are relevant only if SYNC_SOURCE = ldap
# ---------------------------------------------------------------# The below properties ROLE_ASSIGNMENT_LIST_DELIMITER, USERS_GROUPS_ASSIGNMENT_LIST_DELIMITER, USERNAME_GROUPNAME_ASSIGNMENT_LIST_DELIMITER,
#and GROUP_BASED_ROLE_ASSIGNMENT_RULES can be used to assign role to LDAP synced users and groups
#NOTE all the delimiters should have different values and the delimiters should not contain characters that are allowed in userName or GroupName# default value ROLE_ASSIGNMENT_LIST_DELIMITER = &
ROLE_ASSIGNMENT_LIST_DELIMITER = &#default value USERS_GROUPS_ASSIGNMENT_LIST_DELIMITER = :
USERS_GROUPS_ASSIGNMENT_LIST_DELIMITER = :#default value USERNAME_GROUPNAME_ASSIGNMENT_LIST_DELIMITER = ,
USERNAME_GROUPNAME_ASSIGNMENT_LIST_DELIMITER = ,# with above mentioned delimiters a sample value would be ROLE_SYS_ADMIN:u:userName1,userName2&ROLE_SYS_ADMIN:g:groupName1,groupName2&ROLE_KEY_ADMIN:u:userName&ROLE_KEY_ADMIN:g:groupName&ROLE_USER:u:userName3,userName4&ROLE_USER:g:groupName3
#&ROLE_ADMIN_AUDITOR:u:userName&ROLE_KEY_ADMIN_AUDITOR:u:userName&ROLE_KEY_ADMIN_AUDITOR:g:groupName&ROLE_ADMIN_AUDITOR:g:groupName
GROUP_BASED_ROLE_ASSIGNMENT_RULES =# URL of source ldap
# a sample value would be:  ldap://ldap.example.com:389
# Must specify a value if SYNC_SOURCE is ldap
SYNC_LDAP_URL =# ldap bind dn used to connect to ldap and query for users and groups
# a sample value would be cn=admin,ou=users,dc=hadoop,dc=apache,dc=org
# Must specify a value if SYNC_SOURCE is ldap
SYNC_LDAP_BIND_DN =# ldap bind password for the bind dn specified above
# please ensure read access to this file  is limited to root, to protect the password
# Must specify a value if SYNC_SOURCE is ldap
# unless anonymous search is allowed by the directory on users and group
SYNC_LDAP_BIND_PASSWORD =# ldap delta sync flag used to periodically sync users and groups based on the updates in the server
# please customize the value to suit your deployment
# default value is set to true when is SYNC_SOURCE is ldap
SYNC_LDAP_DELTASYNC =# search base for users and groups
# sample value would be dc=hadoop,dc=apache,dc=org
SYNC_LDAP_SEARCH_BASE =# search base for users
# sample value would be ou=users,dc=hadoop,dc=apache,dc=org
# overrides value specified in SYNC_LDAP_SEARCH_BASE
SYNC_LDAP_USER_SEARCH_BASE = # search scope for the users, only base, one and sub are supported values
# please customize the value to suit your deployment
# default value: sub
SYNC_LDAP_USER_SEARCH_SCOPE = sub# objectclass to identify user entries
# please customize the value to suit your deployment
# default value: person
SYNC_LDAP_USER_OBJECT_CLASS = person# optional additional filter constraining the users selected for syncing
# a sample value would be (dept=eng)
# please customize the value to suit your deployment
# default value is empty
SYNC_LDAP_USER_SEARCH_FILTER =# attribute from user entry that would be treated as user name
# please customize the value to suit your deployment
# default value: cn
SYNC_LDAP_USER_NAME_ATTRIBUTE = cn# attribute from user entry whose values would be treated as
# group values to be pushed into Policy Manager database
# You could provide multiple attribute names separated by comma
# default value: memberof, ismemberof
SYNC_LDAP_USER_GROUP_NAME_ATTRIBUTE = memberof,ismemberof
#
# UserSync - Case Conversion Flags
# possible values:  none, lower, upper
SYNC_LDAP_USERNAME_CASE_CONVERSION=lower
SYNC_LDAP_GROUPNAME_CASE_CONVERSION=lower#user sync log path
logdir=logs
#/var/log/ranger/usersync# PID DIR PATH
USERSYNC_PID_DIR_PATH=/var/run/ranger# do we want to do ldapsearch to find groups instead of relying on user entry attributes
# valid values: true, false
# any value other than true would be treated as false
# default value: false
SYNC_GROUP_SEARCH_ENABLED=# do we want to do ldapsearch to find groups instead of relying on user entry attributes and
# sync memberships of those groups
# valid values: true, false
# any value other than true would be treated as false
# default value: false
SYNC_GROUP_USER_MAP_SYNC_ENABLED=# search base for groups
# sample value would be ou=groups,dc=hadoop,dc=apache,dc=org
# overrides value specified in SYNC_LDAP_SEARCH_BASE,  SYNC_LDAP_USER_SEARCH_BASE
# if a value is not specified, takes the value of  SYNC_LDAP_SEARCH_BASE
# if  SYNC_LDAP_SEARCH_BASE is also not specified, takes the value of SYNC_LDAP_USER_SEARCH_BASE
SYNC_GROUP_SEARCH_BASE=# search scope for the groups, only base, one and sub are supported values
# please customize the value to suit your deployment
# default value: sub
SYNC_GROUP_SEARCH_SCOPE=# objectclass to identify group entries
# please customize the value to suit your deployment
# default value: groupofnames
SYNC_GROUP_OBJECT_CLASS=# optional additional filter constraining the groups selected for syncing
# a sample value would be (dept=eng)
# please customize the value to suit your deployment
# default value is empty
SYNC_LDAP_GROUP_SEARCH_FILTER=# attribute from group entry that would be treated as group name
# please customize the value to suit your deployment
# default value: cn
SYNC_GROUP_NAME_ATTRIBUTE=# attribute from group entry that is list of members
# please customize the value to suit your deployment
# default value: member
SYNC_GROUP_MEMBER_ATTRIBUTE_NAME=# do we want to use paged results control during ldapsearch for user entries
# valid values: true, false
# any value other than true would be treated as false
# default value: true
# if the value is false, typical AD would not return more than 1000 entries
SYNC_PAGED_RESULTS_ENABLED=# page size for paged results control
# search results would be returned page by page with the specified number of entries per page
# default value: 500
SYNC_PAGED_RESULTS_SIZE=
#LDAP context referral could be ignore or follow
SYNC_LDAP_REFERRAL = ignore# if you want to enable or disable jvm metrics for usersync process
# valid values: true, false
# any value other than true would be treated as false
# default value: false
# if the value is false, jvm metrics is not created
JVM_METRICS_ENABLED=# filename of jvm metrics created for usersync process
# default value: ranger_usersync_metric.json
JVM_METRICS_FILENAME=#file directory for jvm metrics
# default value : logdir
JVM_METRICS_FILEPATH=#frequency for jvm metrics to be updated
# default value : 10000 milliseconds
JVM_METRICS_FREQUENCY_TIME_IN_MILLIS=

2.4 修改源码


com.datasophon.worker.strategy.RangerAdminHandlerStrategy

/**  Licensed to the Apache Software Foundation (ASF) under one or more*  contributor license agreements.  See the NOTICE file distributed with*  this work for additional information regarding copyright ownership.*  The ASF licenses this file to You under the Apache License, Version 2.0*  (the "License"); you may not use this file except in compliance with*  the License.  You may obtain a copy of the License at**     http://www.apache.org/licenses/LICENSE-2.0**  Unless required by applicable law or agreed to in writing, software*  distributed under the License is distributed on an "AS IS" BASIS,*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.*  See the License for the specific language governing permissions and*  limitations under the License.*/package com.datasophon.worker.strategy;import cn.hutool.core.io.FileUtil;
import com.datasophon.common.Constants;
import com.datasophon.common.cache.CacheUtils;
import com.datasophon.common.command.ServiceRoleOperateCommand;
import com.datasophon.common.enums.CommandType;
import com.datasophon.common.utils.ExecResult;
import com.datasophon.common.utils.ShellUtils;
import com.datasophon.worker.handler.ServiceHandler;
import com.datasophon.worker.utils.KerberosUtils;import java.util.ArrayList;public class RangerAdminHandlerStrategy extends AbstractHandlerStrategy implements ServiceRoleStrategy {public RangerAdminHandlerStrategy(String serviceName, String serviceRoleName) {super(serviceName, serviceRoleName);}@Overridepublic ExecResult handler(ServiceRoleOperateCommand command) {String workPath = Constants.INSTALL_PATH + Constants.SLASH + command.getDecompressPackageName();ExecResult startResult = new ExecResult();ServiceHandler serviceHandler = new ServiceHandler(command.getServiceName(), command.getServiceRoleName());if (command.getEnableKerberos()) {logger.info("start to get ranger keytab file");String hostname = CacheUtils.getString(Constants.HOSTNAME);KerberosUtils.createKeytabDir();if (!FileUtil.exist("/etc/security/keytab/spnego.service.keytab")) {KerberosUtils.downloadKeytabFromMaster("HTTP/" + hostname, "spnego.service.keytab");}if (!FileUtil.exist("/etc/security/keytab/rangeradmin.keytab")) {KerberosUtils.downloadKeytabFromMaster("rangeradmin/" + hostname, "rangeradmin.keytab");}}if (command.getCommandType().equals(CommandType.INSTALL_SERVICE) && command.getServiceRoleName().equals("RangerUsersync")) {ShellUtils.exceShell("mv " + workPath + "/ranger-2.1.0-usersync/install.properties1 " + workPath + "/ranger-2.1.0-usersync/install.properties");ShellUtils.exceShell("chmod 755 " + workPath + "/ranger-2.1.0-usersync/install.properties");logger.info("setup ranger user sync");ArrayList<String> commands = new ArrayList<>();commands.add("sh");commands.add("./setup.sh");ExecResult execResult = ShellUtils.execWithStatus(workPath + "/ranger-2.1.0-usersync", commands, 300L, logger);if (execResult.getExecResult()) {logger.info("setup ranger user sync success");} else {logger.info("setup ranger user sync failed");return execResult;}ShellUtils.exceShell("sed -i '/<name>ranger\\.usersync\\.enabled<\\/name>/{n;s/<value>false<\\/value>/<value>true<\\/value>/}' "+ workPath +"/ranger-2.1.0-usersync/conf/ranger-ugsync-site.xml");startResult = serviceHandler.start(command.getStartRunner(), command.getStatusRunner(),command.getDecompressPackageName(), command.getRunAs());} else {startResult = serviceHandler.start(command.getStartRunner(), command.getStatusRunner(),command.getDecompressPackageName(), command.getRunAs());}return startResult;}}

com.datasophon.worker.strategy.ServiceRoleStrategyContext

map.put("RangerUsersync", new RangerAdminHandlerStrategy("RANGER", "RangerUsersync"));

datasophon-worker jar包更新

mv datasophon-worker-1.2.1.jar      /opt/datasophon/datasophon-worker/lib/


三、重新安装


添加ranger服务

分配服务Master角色

服务配置

选择"settings"我们可以看到linux 上的用户已同步成功。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/42823.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Java锁升级:无锁 → 偏向锁 → 轻量级锁 → 重量级锁

说明 JDK1.6为了减少获得锁和释放锁所带来的性能消耗&#xff0c;引入了“偏向锁”和“轻量级锁”&#xff0c;所以在JDK1.6里锁一共有四种状态&#xff0c;无锁状态&#xff0c;偏向锁状态&#xff0c;轻量级锁状态和重量级锁状态&#xff0c;它会随着竞争情况逐渐升级。锁可以…

资源分享—2021版三调符号库

汇总整理平台软件支持过程中客户项目提供的各类资源&#xff08;包括但不限于符号库、地图模板等&#xff09;&#xff0c;在客户允许情况下进行集团内分享。 本次分享新版国土空间规划【三调符号库&#xff08;2021版&#xff09;】&#xff0c;提供SuperMap格式符号库下载。 …

都2024年了,你的网站还敢用http访问?

在科技日新月异的今天&#xff0c;互联网已经成为我们生活中不可或缺的一部分。然而&#xff0c;在这个数据安全和隐私保护越来越受到重视的时代&#xff0c;我们不得不重新审视那些看似熟悉的技术标准&#xff0c;比如HTTP&#xff08;超文本传输协议&#xff09;。2024年&…

【c++】C++ IO流

本专栏内容为&#xff1a;C学习专栏&#xff0c;分为初阶和进阶两部分。 通过本专栏的深入学习&#xff0c;你可以了解并掌握C。 &#x1f493;博主csdn个人主页&#xff1a;小小unicorn ⏩专栏分类&#xff1a;C &#x1f69a;代码仓库&#xff1a;小小unicorn的代码仓库&…

加密与安全_ 解读非对称密钥解决密钥配送问题的四个方案

文章目录 Pre对称密钥的死穴 - 经典的密钥配送问题什么是非对称密钥非对称密钥解决密钥配送问题的四个方案共享密钥密钥分配中心&#xff08;KDC&#xff09;Diffie-Hellman 密钥交换体系公钥密码体系RSA算法 Pre 对称密钥的死穴 - 经典的密钥配送问题 假设 Alice 和 Bob 两个人…

B端界面:英文换成了中文,怎么就成了卖家秀和买家秀呢?

首先看看AI给我的回答。 为什么英文B端界面换成了中文 就成了卖家秀和买家秀呢&#xff1f; 这可能是因为平台希望吸引更多的中国卖家和买家。使用中文界面可以方便中国用户的操作和沟通&#xff0c;同时也能更好地满足他们的需求。卖家秀和买家秀可能是平台为了促进交流和展示…

HTML5实现我的音乐网站源码

文章目录 作者&#xff1a;[xcLeigh](https://blog.csdn.net/weixin_43151418) 1.设计来源1.1 界面效果1.2 轮播图界面1.3 音乐播放界面1.4 视频播放界面 2.效果和源码2.1 动态效果2.2 源代码 源码下载万套模板&#xff0c;程序开发&#xff0c;在线开发&#xff0c;在线沟通 作…

Python28-9 XGBoost算法

XGBoost&#xff08;eXtreme Gradient Boosting&#xff0c;其正确拼写应该是 "Extreme Gradient Boosting"&#xff0c;而XGBoost 的作者在命名时故意使用了不规范的拼写&#xff0c;将“eXtreme”中的“X”大写&#xff0c;以突出其极限性能和效率&#xff09;是一…

概论(二)随机变量

1.名词解释 1.1 样本空间 一次具体实验中所有可能出现的结果&#xff0c;构成一个样本空间。 1.2 随机变量 把结果抽象成数值&#xff0c;结果和数值的对应关系就形成了随机变量X。例如把抛一次硬币的结果&#xff0c;正面记为1&#xff0c;反面记为0。有变量相对应的就有自…

基于字典学习的地震数据降噪(MATLAB R2021B)

稀疏表示基于研究者们提出了许多变换基函数的方法逐渐成型&#xff0c;比如小波域&#xff0c;曲波域&#xff0c;dreamlet 域等&#xff0c;其原理是利用地震信号在变换域内的稀疏性和可分离性以去除噪声。继 Donoho发表非线性去噪方法-小波阈值萎缩方法&#xff0c;在后续的研…

HackTheBox--Headless

Headless测试过程 1 信息收集 NMAP端口扫描 nmap -sSCV 10.10.11.85000端口测试 检查页面功能&#xff0c;请求 For questions 功能&#xff0c;跳转到 /support 目录 目录扫描 发现 /dashboard 目录 访问 /dashboard 目录&#xff0c;显示未认证&#xff0c;如果通过认证…

MySQL之备份与恢复和MySQL用户工具(一)

备份与恢复 备份脚本化 为备份写一些脚本是标准做法。展示一个示例程序&#xff0c;其中必定有很多辅助内容&#xff0c;这只会增加篇幅&#xff0c;在这里我们更愿意列举一些典型的备份脚本功能&#xff0c;展示一些Perl脚本的代码片段。你可以把这些当作可重用的代码块&…

图解 RocketMQ 架构

写在前面 Kafka、RocketMQ都是很出名的中间件&#xff0c;上次我们讲解了Kafka&#xff0c;这次我们来讲讲RocketMQ的原理。 基本架构图 解析 RocketMQ 总共可以分成四个模块 NameServer&#xff1a;提供服务发现和路由功能&#xff0c;管理各种元数据信息。Broker&#xf…

基于最大相邻夹角的边缘点提取(matlab)

1、背景介绍 边缘点是指点云数据中代表物体或场景几何形状突变的那些点。在三维点云中&#xff0c;边缘点通常标志着不同表面或物体的分界&#xff0c;或者是物体表面上的不规则性&#xff0c;如裂缝、棱角、突起等。点云边缘检测的作用非常重要&#xff0c;最常见是进行特征点…

php校园二手交易网站-计算机毕业设计源码041148

目 录 摘要 1 绪论 1.1 研究背景 1.2国内外研究现状 1.3论文结构与章节安排 2 校园二手交易网站系统分析 2.1 可行性分析 2.2 系统流程分析 2.2.1 数据流程 3.3.2 业务流程 2.3 系统功能分析 2.3.1 功能性分析 2.3.2 非功能性分析 2.4 系统用例分析 2.5本章小结…

基于AOP的数据字典实现:实现前端下拉框的可配置更新

作者&#xff1a;后端小肥肠 创作不易&#xff0c;未经允许严禁转载。 目录 1. 前言 2. 数据字典 2.1. 数据字典简介 2.2. 数据字典如何管理各模块的下拉框 3. 数据字典核心内容解读 3.1. 表结构 3.2. 核心代码 3.2.1. 根据实体类名称获取下属数据字典 3.2.2. 数据字…

回顾 DTC 2024 大会——聚焦数据技术创新:揭秘下一代纯实时搜索引擎 INFINI Pizza

2024 年 4 月 12 日至 13 日&#xff0c;备受瞩目的第十三届“数据技术嘉年华”&#xff08;DTC2024&#xff09;在北京新云南皇冠假日酒店盛大开幕。本次大会由中国 DBA 联盟&#xff08;ACDU&#xff09;与墨天轮社区联合主办&#xff0c;以“智能云原生一体化——DB 与 AI 协…

在先企业字号被申请注册成商标!

今天一网友联系普推商标知产老杨&#xff0c;说自己注册的商标被某公司无效宣告了&#xff0c;去年联系老杨时&#xff0c;当时就给说这个商标名称存在风险&#xff0c;与别人的字号权存在高度近似&#xff0c;而且是同行业同地区在后面注册的。 十几年前某公司先成功注册成字号…

Ubuntu 安装CGAL

一、什么是CGAL CGAL&#xff08;Computational Geometry Algorithms Library&#xff09;是一个广泛使用的开源库&#xff0c;主要用于计算几何算法的实现。该库提供了一系列高效、可靠和易于使用的几何算法和数据结构&#xff0c;适用于各种应用领域。以下是 CGAL 的主要功能…

JD-GUI下载和使用

JD-GUI是专门查看jar包的&#xff0c;包括source.jar和doc.jar。JD-GUI可以把.class文件反编译为可编辑的.java文件&#xff0c;有图形化界面。 github下载地址&#xff1a;https://github.com/java-decompiler/jd-gui/releases 下载windows版本的zip包&#xff0c;如下图&…