WEB
posted by 구름너머 2012. 11. 13. 10:38

1.첫번째

http://image.inames.co.kr/upload/1193292118.pdf

2.두번째 

http://cheese.springnote.com/pages/4649569

Applies to: WLS 8.1 / WLS 6.1 - how to generate self-signed SSL certificates [ID 775115.1]

Oracle Weblogic Server / WebLogic Server / 8.1, 6.1
Information in this document applies to any platform

Goal

          What is the procedure to generate self-signed SSL certificates for use with WLS 8.1 and WLS 6.1?  The certificates will
          be used for internal testing; permanent certificates issued by a CA are not required.
          

Solution

          Demo certificates are provided with all of these releases of WLS.  If these demo certificates are not appropriate,
          however, here are some procedures that can be used.
          
          For WLS 8.1:
          There are (at least) 2 approaches to generating your own certificates:
          1) Use self-signed certificates, with you as the certificate authority.
          2) Use WLS's CertGen utility to create certificates signed by the WLS demonstration certificate authority.
          
          Useful references for information about certificates, etc., are:
          - The man page for the keytool utility, which is part of the JDK.  See
          http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/keytool.html
          - The WLS document "Managing WebLogic Security" at http://e-docs/bea.com/wls/docs81/pdf/secmanage.pdf,
          especially Chapter 7.
          - The documentation for the openssl utility at http://www.openssl.org.  openssl can be downloaded from this web site.
          
          Procedure for generating a self-signed certificate for use with WLS 8.1 (option 1):
          
          1) Generate the key pair and self-signed certificate.
          Use keysize 512 if you have an export license (look for SSL/Export in license.bea).
          Use keysize 1024 if you have a domestic license (look for SSL/Domestic in license.bea).
          Pick your own keystore name, alias name, and passwords; these are only examples.
          See also Table 7.1 in "Managing WebLogic Security".
          
          $JAVA_HOME/bin/keytool -genkey -keyalg rsa -keystore mykeystore.jks -alias weblogic -keysize 512 -keypass weblogic
          -storepass weblogic -validity 365
          
          Supply your hostname to the prompt "First and last name" (e.g., myhost.bea.com)
          
          2) Now extract the self-signed certificate into trust.pem
          
          keytool -export -alias weblogic -file trust.pem -keystore mykeystore.jks -storepass weblogic -rfc
          
          3) Import the self-signed certificate (which functions as its own certificate authority) into trust.jks.
          
          keytool -import -alias weblogic -file trust.pem -keystore trust.jks -storepass weblogic
          
          Now you have mykeystore.jks containing your own host-specific certificate and private key, and trust.jks containing
          the trusted certificate.
          
          4) Configure WLS via the console to use this custom identity and custom trust keystores.
          
          Point your browser to http://host:port/console
          Go to servers->myserver->Keystore & SSL->Change
          Choose Custom Identity and Custom Trust and supply mykeystore.jks as the custom identity keystore file name, type JKS,
          pass phrase weblogic.
          Use trust.jks as the customer trust keystore file name, etc.
          Then restart WLS.
          
          The result is a modified <Server> section in your config.xml file that looks approximately like this (with your
          own file names, encrypted passwords, etc.):
          
          <Server CustomIdentityKeyStoreFileName="./certgen/mykeystore.jks"
                  CustomIdentityKeyStorePassPhrase="{3DES}diJlCtIrNaBWwZfoa66Glg=="
                  CustomIdentityKeyStoreType="JKS"
                  CustomTrustKeyStoreFileName="./certgen/mykeystore.jks"
                  CustomTrustKeyStorePassPhrase="{3DES}diJlCtIrNaBWwZfoa66Glg=="
                  CustomTrustKeyStoreType="JKS"
                  KeyStores="CustomIdentityAndCustomTrust"
                  ListenAddress="1.2.3.4" ListenPort="7001" Name="myserver"
                  NativeIOEnabled="true" ReliableDeliveryPolicy="RMDefaultPolicy"
          ServerVersion="8.1.2.0">
                  <SSL Enabled="true" HostnameVerificationIgnored="false"
                      IdentityAndTrustLocations="KeyStores" ListenPort="7002"
                      Name="myserver" ServerPrivateKeyAlias="weblogic"
          ServerPrivateKeyPassPhrase="{3DES}diJlCtIrNaBWwZfoa66Glg=="/>
              </Server>
          
          Note that you must generate a self-signed certificate for each host system (the CN will be different in each
          certificate) unless you disable host name verification (HostnameVerificationIgnored="true" in the config.xml
          file).
          
          Procedure for generating a self-signed certificate for use with WLS 8.1 (option 2):
          
          This procedure is an alternative to option 1.  It uses the demonstration certificate authority.
          
          The following instructions are derived from page 7-6 in "Managing WebLogic Security".  See also
          http://e-docs.bea.com/wls/docs81/admin_ref/utils.html#1184336 for additional details.
          
          1) Copy the needed files into the current directory for easy access.
          
          cp $WL_HOME/server/lib/CertgenCA.der .
          cp $WL_HOME/server/lib/CertgenCAKey.der .
          
          2) Generate a certificate signed by the demonstration CA with domestic key strength.  The common name (CN) is the same
          as the current hostname.  The issuer CA name is CN=CertGenCAB,OU=FOR TESTING
          ONLY,O=MyOrganization,L=MyTown,ST=MyState,C=US.
          The following command must be executed with CLASSPATH set for the WLS 8.1 environment.
          
          java utils.CertGen weblogic mycertfile mykeyfile
          
          The files created are mycertfile.{der,pem} and mykeyfile.{der.pem}
          
          3) Convert CertgenCA.der to .pem format
          
          java utils.der2pem CertgenCA.der
          
          4) Concatenate the 2 certificates to form a chain.
          
          cat mycertfile.pem CertgenCA.pem > certs.pem
          
          5) Create a new keystore, load the private key and certificate chain.
          
          java utils.ImportPrivateKey mykeystore.jks weblogic weblogic weblogic certs.pem mykeyfile.pem
          
          6) List the keystore to make sure it's OK.
          
          keytool -v -list keystore mykeystore.jks
          
          7) Create a separate keystore for the trusted CA certificate.
          
          keytool -import -alias weblogic -file CertgenCA.pem -keystore trust.jks -storepass weblogic
          
          8) Configure WLS 8.1 as previously to use mykeystore.jks and trust.jks.
          
          
          For WLS 6.1:
          
          1) Create a new copy of the configuration file used by openssl and modify it so that the basic constraint is marked
          "critical".
          
          cp $OPENSSL_HOME/bin/openssl.cnf .
          edit openssl.cnf.  In the section [ v3_ca ] uncomment the line
            basicConstraints = critical,CA:true
          and comment the line (about 2 lines down)
            basicConstraints = CA:true
          
          2) Generate a self-signed certificate for use as a root CA and an associated unencrypted private key (i.e., no
          password).  When prompted, supply the hostname as the common name and omit the email address.  For an export
          certificate use rsa:512.  For a domestic certificate use rsa:1024.
          
          openssl req -config ./openssl.cnf -nodes -extensions v3_ca -x509 -newkey rsa:512 -keyout key.pem -out cert.pem -days
          365
          
          You can also supply the answers to the prompted on the command line if wished:
          
          openssl req -config ./openssl.cnf -nodes -extensions v3_ca -x509 -newkey rsa:512 -keyout key.pem -out cert.pem -days
          365 -subj '/C=US/ST=NJ/L=Liberty Corner/O=BEA Systems/OU=Support/CN=<hostname>'
          
          where <hostname> is the hostname.
          
          3) Inspect the generated certificate.
          
          openssl x509 -in cert.pem -noout -text
          
          4) Modify the WLS 6.1 SSL configuration (through the console or by editing the config.xml file).
          
          The resulting config.xml file should look something like this:
          
          <SSL Enabled="true" KeyEncrypted="false" ListenPort="7002"
          Name="myserver"
          ServerCertificateChainFileName="d:/meq/cases.d/492379/cert/cert.pem"
          ServerCertificateFileName="d:/meq/cases.d/492379/cert/cert.pem"
          ServerKeyFileName="d:/meq/cases.d/492379/cert/key.pem" 
          TrustedCAFileName="d:/meq/cases.d/492379/cert/cert.pem"/>
WEB
posted by 구름너머 2012. 11. 9. 09:22

<HTML5이전>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
 <title>헤드 퍼스트 라운지</title>
 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
 <link type="text/css" rel="stylesheet" href="lounge.css">
 <script type="text/javascript" src="lounge.js"></script>
</head>

======================================================================================

<HTML5> 아래처럼 간단해 졌습니다.

<!doctype html>
<html>
<head>
 <title>헤드 퍼스트 라운지</title>
 <meta charset="utf-8">
 <link rel="stylesheet" href="lounge.css">
 <script src="lounge.js"></script>
</head>

 

Validation 검사 :

http://validator.w3.org/

도메인으로나 파일로도 검사가 가능하다.

This document was successfully checked as HTML5!

'WEB' 카테고리의 다른 글

구글 크롬 버전별 다운로드하기  (0) 2012.11.29
WebLogic SSL 설정  (0) 2012.11.13
appengine templete 렌더링시 한글오류 처리  (0) 2012.11.07
google appengine 으로 app 만들고 올리기  (0) 2012.10.19
centOS6.3 설치 외  (0) 2012.10.16
WEB
posted by 구름너머 2012. 11. 7. 11:59

한글 인코딩 관련 참고 블로그 : http://pak2536.tistory.com/35

 

오류 : UnicodeDecodeError: 'ascii' codec can't decode byte 0xc7 in position 0: ordinal not in range(128)

구글 appengine에서 템플릿파일에 대한 렌더링시 한글처리가 잘 안되어서 아래방법으로 성공했습니다.

환경: 윈도우즈7-Chrome

파이썬2.7, 구글웹엔진

1.윈도우즈용 파이썬 설치하기 ==> 2.7
  http://www.python.org/download/
  ==> Python 2.7.3 Windows Installer (Windows binary -- does not include source)

2.윈도우즈용 구글앱엔진 설치하기 ==>
  https://developers.google.com/appengine/downloads

 

1. .py파일을 고친다.

#!/usr/bin/python
# -*- coding: cp949 -*-

.....

    test_str='한글(HANGUL) UTF-8 or CP949 테스트(TEST) 입니다.'
    test_str=unicode(test_str,'cp949')
 
    logging.info('test_str========================>' + test_str)
    logging.info('UNICODE:'+test_str.encode('utf-8'))
    template_values = {'token': token,
                       'me': user,
                       'room_key': room_key,
                       'room_link': room_link,
                       'initiator': initiator,
                       'pc_config': json.dumps(pc_config),
                       'test_str': test_str 
                      }

template = jinja_environment.get_template('templetes/index.html')

self.response.out.write(template.render(template_values))

2. 템플릿의 html파일에서...

<h2><a href="#">Video&nbsp;&nbsp;&nbsp;Guide  Ha {{ test_str }} </a></h2>

 

다른방법이 있으면 좋을텐데 아직 못찾음...ㅠㅠ

==> 다른 방법이 있네요.

     에디터 프로그램에서 HTML파일을 다른이름으로 저장하기에서 서식을 UTF-8 포맷으로 저장하면 한글이 인식되네요.

 

 

한글처리 예.xlsx

 

'WEB' 카테고리의 다른 글

WebLogic SSL 설정  (0) 2012.11.13
HTML5 변경 및 Validator를 이용한 검사  (0) 2012.11.09
google appengine 으로 app 만들고 올리기  (0) 2012.10.19
centOS6.3 설치 외  (0) 2012.10.16
webRTC Demo  (0) 2012.10.15
WEB
posted by 구름너머 2012. 10. 19. 22:02

0.구글계정 및 어플리케이션 계정 만들기

appengine 계정신청시 전화가 옮.-> 음성으로 인증코드 알려줌. 문자가 아니라서 당황함.

 

 

1.윈도우즈용 파이썬 설치하기 ==> 2.7
  http://www.python.org/download/
  ==> Python 2.7.3 Windows Installer (Windows binary -- does not include source)

2.윈도우즈용 구글앱엔진 설치하기 ==> 
  https://developers.google.com/appengine/downloads

 

 

3.새로운 webapp 생성하기

구글앱엔진을 실행 후 FILE-Create New Application 실행한다.

 

어플리케이션 네임은 0번에서 google app engine 계정을 넣어준다.

기억이 안나면 아래 주소에서 확인한다.

https://appengine.google.com/

디렉토리는 개발할 webapp를 위한 폴더이니 마음가는대로 만든다.

포트는 처음에 디폴트 8080이다 위 그림은 두번째 App를 만들려고 하니 자동으로 8081로 되었다. 다른 번호를 선택해도 된다.

생성이 되는 아래처럼...

 

내 계정은 damool98이다.

4. 내 app를 만들자!

편집기를 설치하자 이건 꼭 필요하진 않지만 편리한 듯...

jEdit : http://www.jedit.org

나는 D:/apps로 만들었기 때문에 D:\apps\damool98 이 기본경로가 된다.

여기에 파일 중 app.yaml을 열어 보면 아래처럼 되어있다.

 

 

그 다음은 main.py 파일이다.

 

처음엔 Hello world 만 있었는데 몇 글자 추가해봤다.

수정 후 저장.

5. 내 app를 구동해 보자!

구글 앱 엔진을 띄우고 Run 시키기만 하면 된다.

구동 후 Browse 버튼을 클릭해 본다.

아래 처럼 뜬다. 수정하고 리프래쉬도 해본다.

 

 

6. 어플리케이션을 구글에 업로드 한다.

Google App Engine에서 Deploy 아이콘을 클릭하면 자동으로 올라간다.

UNIX계열은 appcfg.py update 어플리케이션명  이런식으로 올린다.

사이트 주소는 여기 주소에 가서 보면 확인할 수 있다. ==> https://appengine.google.com/

나의 경우는 주소가 이렇게 된다.   application은 10개까지 만들 수 있다고 한다.

 

 

웹서버에 관해 여러가지 설정을 할 수 있다.

최종 확인하면 아래와 같다. 이제 어느곳에서든지 아래 사이트를 접속할 수 있게된다.

일정 트래픽이 넘게 되면 과금이 된다고 하지만 상용서비스가 아니라면 충분히 쓸 수 있겠다.

 

 

한 번 올리고 보니 이해가 된다.ㅠㅠ

 

추가적인 공부는 아래 사이트를 자주 방문해야 할 듯하다.

파이썬 스터디 : http://www.pythonlearn.com/

구글 앱 엔진 : https://developers.google.com/appengine/?hl=ko-KR

'WEB' 카테고리의 다른 글

HTML5 변경 및 Validator를 이용한 검사  (0) 2012.11.09
appengine templete 렌더링시 한글오류 처리  (0) 2012.11.07
centOS6.3 설치 외  (0) 2012.10.16
webRTC Demo  (0) 2012.10.15
HTML5로 만든 시계  (0) 2012.10.10
WEB
posted by 구름너머 2012. 10. 16. 23:46

'WEB' 카테고리의 다른 글

appengine templete 렌더링시 한글오류 처리  (0) 2012.11.07
google appengine 으로 app 만들고 올리기  (0) 2012.10.19
webRTC Demo  (0) 2012.10.15
HTML5로 만든 시계  (0) 2012.10.10
HTML5 강의  (0) 2012.10.09
WEB
posted by 구름너머 2012. 10. 15. 21:47

'WEB' 카테고리의 다른 글

google appengine 으로 app 만들고 올리기  (0) 2012.10.19
centOS6.3 설치 외  (0) 2012.10.16
HTML5로 만든 시계  (0) 2012.10.10
HTML5 강의  (0) 2012.10.09
브라우저, 서버, IDE 다운로드  (0) 2012.10.09
WEB
posted by 구름너머 2012. 10. 10. 18:28

http://raphaeljs.com/polar-clock.html

 

 

:: · /

Demo of Raphaël—JavaScript Vector Library

'WEB' 카테고리의 다른 글

centOS6.3 설치 외  (0) 2012.10.16
webRTC Demo  (0) 2012.10.15
HTML5 강의  (0) 2012.10.09
브라우저, 서버, IDE 다운로드  (0) 2012.10.09
VB Script Functions  (0) 2011.07.29
WEB
posted by 구름너머 2012. 10. 9. 18:16

'WEB' 카테고리의 다른 글

webRTC Demo  (0) 2012.10.15
HTML5로 만든 시계  (0) 2012.10.10
브라우저, 서버, IDE 다운로드  (0) 2012.10.09
VB Script Functions  (0) 2011.07.29
WCAG2.0 발표:웹접근성에서 웹사용성으로  (0) 2010.12.28