JAVA_시큐어_코딩_가이드

View Comments

향후 플젝 코딩전 필히 정독후 진행 하여

오픈 전,오픈 후 보안성심의 ,모의해킹에 시간을 허비하는 일이 없도록 합시다


(3판)_JAVA_시큐어_코딩_가이드.pdf

 

Comments (+add yours?)

Tracbacks (+view to the desc.)

리눅스 SVN 서버 설치 ~ Eclipse SVN 연동

View Comments

                                

프로젝트 형상관리를 위한

SVN(subversion) 설치방법 ~ eclipse를 통한 접속테스트 방법

 

* 기존에 svn이 설치 되어 있다면 문제 발생할 수 있으니 기존 svn을 삭제 후 install을 해야함

 

1. 설치 및 저장소 지정

1.1 설치 명령어 실행

#yum –y install subversion

 

1.2 Repository 생성

#mkdir /home/mwSVN  -- 해당 경로가 루트 저장소

#cd /home/mwSVN

 

1.3 svn 접속 시 사용되는 저장소 지정

#svnadmin create --fs-type fsfs /home/mwSVN/[저장소명]

 

2. 접속권한 설정

2.1 svnserve.conf 파일 설정

#cd /home/mwSVN/[저장소 명] /conf

#vi svnserve.conf

해당 부분 주석제거.

### This file controls the configuration of the svnserve daemon, if you

### use it to allow access to this repository.  (If you only allow

### access through http: and/or file: URLs, then this file is

### irrelevant.)

 

### Visit http://subversion.tigris.org/ for more information.

 

[general]

### These options control access to the repository for unauthenticated

### and authenticated users.  Valid values are "write", "read",

### and "none".  The sample settings below are the defaults.

anon-access = read    --익명 사용자 읽기 여부

auth-access = write    --인증 사용자 쓰기 여부

### The password-db option controls the location of the password

### database file.  Unless you specify a path starting with a /,

### the file's location is relative to the directory containing

### this configuration file.

### If SASL is enabled (see below), this file will NOT be used.

### Uncomment the line below to use the default password file.

password-db = passwd   --실행 시 계정 목록 불러오기

### The authz-db option controls the location of the authorization

### rules for path-based access control.  Unless you specify a path

### starting with a /, the file's location is relative to the the

### directory containing this file.  If you don't specify an

### authz-db, no path-based access control is done.

### Uncomment the line below to use the default authorization file.

authz-db = authz  --실행 시 계정 권한 체크

### This option specifies the authentication realm of the repository.

### If two repositories have the same authentication realm, they should

### have the same password database, and vice versa.  The default realm

### is repository's uuid.

### realm = MW First Repository

 

[sasl]

### This option specifies whether you want to use the Cyrus SASL

### library for authentication. Default is false.

### This section will be ignored if svnserve is not built with Cyrus

 

 

2.2 svn 접속을 위한 계정 추가

#cd /home/mwSVN/[저장소 명] /conf

#vi passwd

### This file is an example password file for svnserve.

### Its format is similar to that of svnserve.conf. As shown in the

### example below it contains one section labelled [users].

### The name and password for each user follow, one account per line.

 

[users]

# harry = harryssecret

# sally = sallyssecret

mkgil = mkgil0415  -- 아이디=패스워드

 

계정추가는 passwd 파일을 설정하면 된다.

 

2.3 사용자 권한 지정

### This file is an example authorization file for svnserve.

### Its format is identical to that of mod_authz_svn authorization

### files.

### As shown below each section defines authorizations for the path and

### (optional) repository specified by the section name.

### The authorizations follow. An authorization line can refer to:

###  - a single user,

###  - a group of users defined in a special [groups] section,

###  - an alias defined in a special [aliases] section,

###  - all authenticated users, using the '$authenticated' token,

###  - only anonymous users, using the '$anonymous' token,

###  - anyone, using the '*' wildcard.

###

### A match can be inverted by prefixing the rule with '~'. Rules can

### grant read ('r') access, read-write ('rw') access, or no access

### ('').

 

[aliases]

# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average

 

[groups]

# harry_and_sally = harry,sally

# harry_sally_and_joe = harry,sally,&joe

 

# [/foo/bar]

# harry = rw

# &joe = r

# * =

 

# [repository:/baz/fuz]

# @harry_and_sally = rw

# * = r

 

[/]

mkgil=rw

*=r

 

3. SVN 서버 실행

3.1 SVN 서버 동작 확인

#ps –ef | grep svnserver

 

3.2 SVN 서버 시작

#svnserve -d -r  /home/mwSVN/[저장소명]

 

3.3 SVN 서버 중지

# kill -9 [PID]

 

 

4. Eclipse – SVN 연동 방법

1. Eclipse 메뉴바 Help > Eclipse Marketplace 클릭

2. SVN 입력 > 검색 > INSTALL 버튼 클릭

 

3. 체크 > Next… > Next > … 설치 완료 > Eclipse 재시작

 

 

4. 이클립스 재 시작 후 뜨는 SVN Kit 설치

5. perspective 창 클릭

 

 

6. popup창에서 SVN Repository Explorinng 선택

7. New Repository Location 아이콘 클릭

 

 

8. URL 입력 후 passwd 파일에서 설정했던 ID, PWD 입력 > FINISH 클릭


à 소스 commit 결과

/home/mwSVN/[저장소명]/db/revs/0  경로에 소스가 형상관리 됨



5. 다중 저장소 설정 방법

1. 루트 저장소 생성

# mkdir /data/[루트 저장소 명]

 

2. 루트 저장소 아래에 개별 저장소 생성

(여러 프로젝트를 같은 디렉토리 레벨로 생성하여 관리하기 위함)

# svnadmin create –fs-type fsfs /data/svnrepo/[저장소명1]

# svnadmin create –fs-type fsfs /data/svnrepo/[저장소명2]

 

3. 각각의 저장소의 conf 디렉토리 및 설정파일 변경

각각의 저장소마다 셋팅값을 설정해야 한다는 번거로움이 있지만,

다른 셋팅값을 줌으로써 사용자를 달리 지정할 수 있다.

 

4. 루트저장소 명으로 서버 시작

# svnserve –d –r /data/[루트 저장소 명]

 

5. Eclipse에서 svn repository 추가

1) SVN Repository Exploring 에서  [저장소명1]의 repository location 생성


2) 그 다음 [저장소명2]부터는 Advanced로 생성해야 충돌을 막을 수 있다.




à [멀티 프로젝트 선택을 위한 옵션 설정] . 다음 부분을 참고했다.


  1. eclipse에서 프로젝트를 생성한다.
  2. commit 하고자 하는 프로젝트를 선택하고 오른쪽 마우스를 클릭한 후에 TEAM > Share Project 선택한다.
  3. commit 하고자 하는 SVN 저장소를 선택한다.
  4. 멀티 프로젝트 선택을 위한 옵션 설정

1.     Simple Mode에서 Advanced Mode 선택


2.     Use specified name 선택해서 프로젝트 이름을 입력

·        SVN상에 표기할 프로젝트 이름

3.     Project Repository Layout Use multiple projects layout with the specified root name 선택

·        최상위 SVN 저장소에서 구분을 해주는(폴더처럼) 이름을 넣어 준다.


4.     마지막으로 Use Subversion recommanded layout('trunk', 'branches' and 'tags') 선택한다.


·        부분을 선택해야지만 멀티 프로젝트별로 trunk / branches / tags 관리 있다.

 

 

Comments (+add yours?)

Tracbacks (+view to the desc.)

AIX 메모리 사용률 확인

View Comments

AIX에서 메모리 사용량 확인하는 명령어 svmon 간략 한 파라미터

#svmon -O summary=basic,unit=auto

-> 메모리 전체 사용량을 MB 단위로 확인

#svmon -Pu -t 10 | grep -p Pid | grep '^.*[0-9]'

-> 실제 메모리를 사용하는 프로세스를 크기 순서로 10개 조회

#ps aux | head -1; ps aux | sort -m +3 | head

-> 가장 많은 메모리를 점유하는 프로세스 찾기


Comments (+add yours?)

Tracbacks (+view to the desc.)

Java Decompiler - 이클립스 플러그인 포함

View Comments

주소 - http://java.decompiler.free.fr/jd-eclipse/update

해당 사이트에 가면 GUI 버전과 이클립스 플러그인 버전이 있다.

자세한 내용은 해당 사이트 참조

Comments (+add yours?)

Tracbacks (+view to the desc.)

유닉스 유틸리티를 윈도우에서 사용하기

View Comments

http://unxutils.sourceforge.net/


1. 위 링크를 방문해서 UnxUtils.zip 을 다운로드

2. 내 PC의 특정 경로에 압축 해제.

3. PATH 환경변수에 에 2번의 경로를 등록.

4. 이제 cmd.exe 에서 tail tar grep awk 같은 유닉스 유틸리티를 쓸 수 있음.


개인적으로는 wintail 보다는 tail 이 더 손에 익어서 애용하고 있음.



Comments (+add yours?)

Tracbacks (+view to the desc.)

Newer Entries Older Entries